# # patch "commands.cc" # from [2af4fc8b0cab396bd389a1c52cb5aea5c78833e8] # to [2923bafee370f9dbbd64184e64f8a36819880c6f] # # patch "cvs_repository.cc" # from [562426cdf624d2c7b72fc379550754fdef93b775] # to [74f67e37133ba97225457ac6d5e1c0ba8205ee8c] # ======================================================================== --- commands.cc 2af4fc8b0cab396bd389a1c52cb5aea5c78833e8 +++ commands.cc 2923bafee370f9dbbd64184e64f8a36819880c6f @@ -3667,7 +3667,8 @@ // missing: compression level (-z), cvs-branch (-r), since (-D) CMD(cvs_pull, "network", "[CVS-REPOSITORY CVS-MODULE]", - "(re-)import a module from a remote cvs repository", OPT_BRANCH_NAME % OPT_SINCE) + "(re-)import a module from a remote cvs repository", + OPT_BRANCH_NAME % OPT_SINCE) { if (args.size() != 2 && args.size() != 0) throw usage(name); @@ -3683,8 +3684,9 @@ } -CMD(cvs_push, "network", "CVS-REPOSITORY CVS-MODULE", - "commit changes in local database to a remote cvs repository", OPT_BRANCH_NAME % OPT_SINCE) +CMD(cvs_push, "network", "[CVS-REPOSITORY CVS-MODULE]", + "commit changes in local database to a remote cvs repository", + OPT_BRANCH_NAME % OPT_REVISION) { if (args.size() != 2 && args.size() != 0) throw usage(name); ======================================================================== --- cvs_repository.cc 562426cdf624d2c7b72fc379550754fdef93b775 +++ cvs_repository.cc 74f67e37133ba97225457ac6d5e1c0ba8205ee8c @@ -1261,16 +1261,31 @@ } } if (children.empty()) return; - if (children.size()>1) - { W(F("several children found for %s:\n") % now.revision); - for (std::set::const_iterator i=children.begin(); + revision_id next; + if (children.size()>1) // && !ap.revision_selectors.size()) + { for (std::vector::const_iterator i=app.revision_selectors.begin(); + i!=app.revision_selectors.end();++i) + { for (std::set::const_iterator j=children.begin(); + j!=children.end();++j) + { if (revision_id(hexenc((*i)()))==*j) + { next=*j; + break; + } + } + } + if (next.inner()().empty()) + { W(F("several children found for %s:\n") % now.revision); + for (std::set::const_iterator i=children.begin(); i!=children.end();++i) - { W(F("%s\n") % *i); + { W(F("%s\n") % *i); + } + W(F("please specify direction using --revision\n")); + return; } - return; } + else next=*children.begin(); bool fail=bool(); - now_iter=commit(now_iter,*children.begin(),fail); + now_iter=commit(now_iter,next,fail); if (!fail) P(F("checked %s into cvs repository") % now.revision);