# # patch "app_state.cc" # from [2ab7415b9b328ba09c05c38eaf907e1789552899] # to [7b99d28aa68d7c8b0ffebbd03226821ad1c6c4c8] # # patch "app_state.hh" # from [8339b669b6e590faedebe0ece34e4deb22beddd0] # to [4cc0bd3a2d1ec70e340a7d5dddb5d001b805e107] # # patch "commands.cc" # from [92b493a44352e5475fde789b5f0fca4fbcca2531] # to [330586c70f8ba4d68c62efa45a2e4691698350d2] # # patch "cvs_sync.cc" # from [0d04b99cba77d577e4b7de8b17180e0829e57259] # to [a02c524863495f1130af479826fdf226270fba30] # # patch "monotone.cc" # from [60bd8279b44868228dd4edb2bdd2b5356b08598f] # to [50b014dd7003dfde9e5894dcdb9c80bdfb08375d] # # patch "options.hh" # from [42c36f250184080c4005a60d6ad390082ff347a0] # to [8b2f8f24c50e9e4620ea65d291758c68eb123b9b] # ======================================================================== --- app_state.cc 2ab7415b9b328ba09c05c38eaf907e1789552899 +++ app_state.cc 7b99d28aa68d7c8b0ffebbd03226821ad1c6c4c8 @@ -35,6 +35,7 @@ app_state::app_state() : branch_name(""), db(system_path()), stdhooks(true), rcfiles(true), diffs(false), no_merges(false), set_default(false), verbose(false), search_root("/"), + cvspull_full(), depth(-1), last(-1), diff_format(unified_diff), diff_args_provided(false), use_lca(false), execute(false) { ======================================================================== --- app_state.hh 8339b669b6e590faedebe0ece34e4deb22beddd0 +++ app_state.hh 4cc0bd3a2d1ec70e340a7d5dddb5d001b805e107 @@ -47,6 +47,7 @@ utf8 author; system_path search_root; utf8 sync_since; + bool cvspull_full; std::vector revision_selectors; std::set exclude_patterns; std::vector extra_rcfiles; ======================================================================== --- commands.cc 92b493a44352e5475fde789b5f0fca4fbcca2531 +++ commands.cc 330586c70f8ba4d68c62efa45a2e4691698350d2 @@ -3668,7 +3668,7 @@ // missing: compression level (-z), cvs-branch (-r), since (-D) CMD(cvs_pull, "network", "[CVS-REPOSITORY CVS-MODULE [CVS-BRANCH]]", "(re-)import a module from a remote cvs repository", - OPT_BRANCH_NAME % OPT_SINCE) + OPT_BRANCH_NAME % OPT_SINCE % OPT_FULL) { if (args.size() == 1 || args.size() > 3) throw usage(name); ======================================================================== --- cvs_sync.cc 0d04b99cba77d577e4b7de8b17180e0829e57259 +++ cvs_sync.cc a02c524863495f1130af479826fdf226270fba30 @@ -1395,7 +1395,7 @@ transaction_guard guard(app.db); if (certs.empty()) app.db.get_revision_certs(cvs_cert_name, certs); - repo.process_certs(certs); + if (!app.cvspull_full) repo.process_certs(certs); // initial checkout if (repo.empty()) @@ -1498,23 +1498,30 @@ for (std::set::const_iterator i=edges.begin(); i!=edges.end();++i) { if (last!=edges.end() && i->delta_base.inner()().empty()) - { cvs_manifest old=get_files(*last),new_m=get_files(*i); - for (cvs_manifest::iterator j=old.begin();j!=old.end();++j) - { cvs_manifest::iterator new_iter=new_m.find(j->first); - if (new_iter==new_m.end()) // this file get's removed here - { file_state fs; - fs.since_when=i->time; - cvs_revision_nr rev=j->second->cvs_version; - ++rev; - fs.cvs_version=rev.get_string(); - fs.log_msg=i->changelog; - fs.author=i->author; - fs.dead=true; - L(F("file %s gets removed at %s\n") % j->first % i->revision()); - remember(files[j->first].known_states,fs); + try + { cvs_manifest old=get_files(*last),new_m=get_files(*i); + for (cvs_manifest::iterator j=old.begin();j!=old.end();++j) + { cvs_manifest::iterator new_iter=new_m.find(j->first); + if (new_iter==new_m.end()) // this file get's removed here + { file_state fs; + fs.since_when=i->time; + cvs_revision_nr rev=j->second->cvs_version; + ++rev; + fs.cvs_version=rev.get_string(); + fs.log_msg=i->changelog; + fs.author=i->author; + fs.dead=true; + L(F("file %s gets removed at %s\n") % j->first % i->revision()); + remember(files[j->first].known_states,fs); + } } } - } + catch (informative_failure &e) + { W(F("failed to reconstruct CVS revision structure:\n" + "%s\n" + "I can't figure out which files got removed on %s->%s\n") + % e.what % last->revision() % i->revision()); + } last=i; } if (global_sanity.debug) L(F("%s") % debug()); ======================================================================== --- monotone.cc 60bd8279b44868228dd4edb2bdd2b5356b08598f +++ monotone.cc 50b014dd7003dfde9e5894dcdb9c80bdfb08375d @@ -57,7 +57,8 @@ {"depth", 0, POPT_ARG_LONG, &arglong, OPT_DEPTH, gettext_noop("limit the number of levels of directories to descend"), NULL}, {"last", 0, POPT_ARG_LONG, &arglong, OPT_LAST, gettext_noop("limit the log output to the given number of entries"), NULL}, {"pid-file", 0, POPT_ARG_STRING, &argstr, OPT_PIDFILE, gettext_noop("record process id of server"), NULL}, - {"since", 0, POPT_ARG_STRING, &argstr, OPT_SINCE, "set history start for CVS sync", NULL}, + {"since", 0, POPT_ARG_STRING, &argstr, OPT_SINCE, "set history start for CVS pull", NULL}, + {"full", 0, POPT_ARG_NONE, &argstr, OPT_FULL, "ignore already pulled CVS revisions", NULL}, {"brief", 0, POPT_ARG_NONE, NULL, OPT_BRIEF, gettext_noop("print a brief version of the normal output"), NULL}, {"diffs", 0, POPT_ARG_NONE, NULL, OPT_DIFFS, gettext_noop("print diffs along with logs"), NULL}, {"no-merges", 0, POPT_ARG_NONE, NULL, OPT_NO_MERGES, gettext_noop("skip merges when printing logs"), NULL}, @@ -397,6 +398,10 @@ app.set_since(string(argstr)); break; + case OPT_FULL: + app.cvspull_full=true; + break; + case OPT_BRIEF: global_sanity.set_brief(); break; ======================================================================== --- options.hh 42c36f250184080c4005a60d6ad390082ff347a0 +++ options.hh 8b2f8f24c50e9e4620ea65d291758c68eb123b9b @@ -44,3 +44,4 @@ #define OPT_LCA 35 #define OPT_EXECUTE 36 #define OPT_SINCE 37 +#define OPT_FULL 38