# # patch "CVS_prot" # from [a6eabc75f6bc8a54a45811938e4c3a94634aea43] # to [af90502abfe61806fd56a3139eecae4783a89cdf] # # patch "app_state.cc" # from [69cee3ceed323e5021fe2aa4d271d8be0850d5d3] # to [a226f00e342535f01e93004071d1b862b7f96620] # # patch "app_state.hh" # from [04df8bc79309e26b8bca5ca0cdb1c9c11535f5cb] # to [f4b83c27cc5fdd60f95f61a25c8b8e7201632f36] # # patch "commands.cc" # from [e87aea4ade348d4840c95f4826c12d92aac0c1d4] # to [5636b9675d751b30ed38c66c8f22b83706e2c514] # # patch "cvs_sync.cc" # from [a4720308cbd0c6955924699b563d00f6767f9b71] # to [0755f4096f6334fb8cd373bccd482fd7aa4bf1f7] # # patch "cvs_sync.hh" # from [1bb9b2b48cf2a04fcd08ad9ac6548197f41c2d5f] # to [984774ce45583507185d7d9c2595a7f1d397c6f9] # # patch "monotone.cc" # from [76f1e3363343e1043753df1d383e69f08fe801ed] # to [0b155bef23dd4bb56e3df24ab062526f01e3c3c8] # # patch "options.hh" # from [0019fe41c45c4c9ff97200718f92dfa48d9dc606] # to [b9f1519c24f27181ba3ca166de7fa5abe77f4ac1] # ======================================================================== --- CVS_prot a6eabc75f6bc8a54a45811938e4c3a94634aea43 +++ CVS_prot af90502abfe61806fd56a3139eecae4783a89cdf @@ -143,3 +143,6 @@ takeover modified, cvs commit changed (conflict), pull (MD5 sum failure) pull, repull, merge, commit, push takeover modified, repull, merge+push (two contents for one revision) + +pull since future (two hours), push/commit, pull again (gives dismonotoneous +time) ======================================================================== --- app_state.cc 69cee3ceed323e5021fe2aa4d271d8be0850d5d3 +++ app_state.cc a226f00e342535f01e93004071d1b862b7f96620 @@ -37,7 +37,7 @@ : branch_name(""), db(system_path()), keys(this), stdhooks(true), rcfiles(true), diffs(false), no_merges(false), set_default(false), verbose(false), search_root("/"), - cvspull_full(), + cvspull_full(), cvspull_besteffort(), depth(-1), last(-1), diff_format(unified_diff), diff_args_provided(false), use_lca(false), execute(false), bind_address(""), bind_port(""), missing(false), unknown(false), ======================================================================== --- app_state.hh 04df8bc79309e26b8bca5ca0cdb1c9c11535f5cb +++ app_state.hh f4b83c27cc5fdd60f95f61a25c8b8e7201632f36 @@ -50,6 +50,7 @@ system_path search_root; utf8 sync_since; bool cvspull_full; + bool cvspull_besteffort; std::vector revision_selectors; std::set exclude_patterns; std::vector extra_rcfiles; ======================================================================== --- commands.cc e87aea4ade348d4840c95f4826c12d92aac0c1d4 +++ commands.cc 5636b9675d751b30ed38c66c8f22b83706e2c514 @@ -3801,7 +3801,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_FULL) + OPT_BRANCH_NAME % OPT_SINCE % OPT_FULL % OPT_BESTEFFORT) { if (args.size() == 1 || args.size() > 3) throw usage(name); ======================================================================== --- cvs_sync.cc a4720308cbd0c6955924699b563d00f6767f9b71 +++ cvs_sync.cc 0755f4096f6334fb8cd373bccd482fd7aa4bf1f7 @@ -1,6 +1,5 @@ -// copyright (C) 2005 Christof Petig -// all rights reserved. -// licensed to the public under the terms of the GNU GPL (>= 2) +// copyright (C) 2005 Christof Petig all rights +// reserved. licensed to the public under the terms of the GNU GPL (>= 2) // see the file COPYING for details #include "cvs_sync.hh" @@ -103,7 +102,7 @@ return result; } -bool cvs_revision_nr::is_parent_of(const cvs_revision_nr &child) const +bool cvs_revision_nr::is_parent_of(const cvs_revision_nr &child,bool direct) const { unsigned cps=child.parts.size(); unsigned ps=parts.size(); if (cps0) return true; // not direct but parent + if (diff+1!=cps) return false; if (parts[diff]+1 != child.parts[diff]) return false; } else // ps < cps @@ -476,6 +476,10 @@ % time_t2human(e->time2) % time_t2human(s2->since_when)); cvs_edge new_edge=*e; MM(boost::lexical_cast(e->time)); + if (s2->since_when-1time && app.cvspull_besteffort) + { W(F("ignoring this edge as requested")); + return; + } I(s2->since_when-1>=e->time); e->time2=s2->since_when-1; new_edge.time=s2->since_when; @@ -568,9 +572,13 @@ MM(s->cvs_version); MM(s2->cvs_version); if (!srev.is_parent_of(s2->cvs_version)) - std::cerr << "Inconsistency "<< file << ": " << s->cvs_version + std::cerr << (srev.is_parent_of(s2->cvs_version,false)?"minor":"major") + << " revision inconsistency "<< file << ": " << s->cvs_version << "->" << s2->cvs_version << "\n" << debug() << '\n'; - I(srev.is_parent_of(s2->cvs_version)); + if (s->cvs_version == s2->cvs_version) + { return; + } + I(srev.is_parent_of(s2->cvs_version) || srev.is_parent_of(s2->cvs_version,false)); if (s->dead) { // this might fail (?) because we issued an Entry somewhere above ======================================================================== --- cvs_sync.hh 1bb9b2b48cf2a04fcd08ad9ac6548197f41c2d5f +++ cvs_sync.hh 984774ce45583507185d7d9c2595a7f1d397c6f9 @@ -21,7 +21,7 @@ void operator++(); std::string get_string() const; bool is_branch() const; - bool is_parent_of(const cvs_revision_nr &child) const; + bool is_parent_of(const cvs_revision_nr &child,bool direct=true) const; bool operator==(const cvs_revision_nr &b) const; bool operator<(const cvs_revision_nr &b) const; }; ======================================================================== --- monotone.cc 76f1e3363343e1043753df1d383e69f08fe801ed +++ monotone.cc 0b155bef23dd4bb56e3df24ab062526f01e3c3c8 @@ -60,6 +60,7 @@ {"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 pull", NULL}, {"full", 0, POPT_ARG_NONE, &argstr, OPT_FULL, "ignore already pulled CVS revisions", NULL}, + {"besteffort", 0, POPT_ARG_NONE, &argstr, OPT_BESTEFFORT, "ignore some time discrepancies", 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}, @@ -417,6 +418,10 @@ app.cvspull_full=true; break; + case OPT_BESTEFFORT: + app.cvspull_besteffort=true; + break; + case OPT_BRIEF: global_sanity.set_brief(); break; ======================================================================== --- options.hh 0019fe41c45c4c9ff97200718f92dfa48d9dc606 +++ options.hh b9f1519c24f27181ba3ca166de7fa5abe77f4ac1 @@ -51,3 +51,4 @@ #define OPT_CONF_DIR 42 #define OPT_SINCE 43 #define OPT_FULL 44 +#define OPT_BESTEFFORT 45