# # # patch "mtn_cvs/TODO" # from [f7b1d699b67de2c7f01cd19fe0834bd49b2b02f9] # to [3828bded55fb587e117efcaeaffef0f537fc8116] # # patch "mtn_cvs/cvs_client.cc" # from [7eda53dd96c158ca46a7e16fd8d9bec0dabb957e] # to [5b3548832cd29072c3733a9fb5157c89a72c621c] # # patch "mtn_cvs/cvs_client.hh" # from [788496865cc0bf8573b5faedd6aabf65e494f061] # to [d4fc5e3982d02b5b1e982cc5a9e85af3e3a688d3] # # patch "mtn_cvs/cvs_sync.cc" # from [faa92a8506b60dc94bb90f16a9fec0cce09e8b40] # to [0e9afb0cb2937b13cde55913fa95ec5853d201d3] # ============================================================ --- mtn_cvs/TODO f7b1d699b67de2c7f01cd19fe0834bd49b2b02f9 +++ mtn_cvs/TODO 3828bded55fb587e117efcaeaffef0f537fc8116 @@ -1,5 +1,18 @@ to attributes), make descendants merge n - mode 0777 -> mtn:execute; -kb -> mtn:manual_merge - .cvsignore -> .mtnignore - separate child node mode when committing (can change keywords and move revisions to attributes), make descendants merge nodes +[markus_s] +I'd like to talk about examples, I've just added a graph of the test +importing_cvs_cycle_splitter3 to the CvsImport. It shows a cycle with a +branch start. You can find the appropriate CVS repo in the test suite. +Figure out how you want that represented in monotone! (And yes, such things +occur in the wild.) + +christof: No. The example we came up with is: one programmer developing a +feature A' and not updating but checking in, one creating B' and checking in +without updating. Now after some time they realize that both changes +conflict. So the branch off their development, continue work and later merge +everything together in HEAD again. Now if you look at the tag, they will not +match an existing point in linear history ============================================================ --- mtn_cvs/cvs_client.cc 7eda53dd96c158ca46a7e16fd8d9bec0dabb957e +++ mtn_cvs/cvs_client.cc 5b3548832cd29072c3733a9fb5157c89a72c621c @@ -1054,9 +1054,10 @@ cvs_client::checkout cvs_client::CheckOu I(lresult.size()==7); I(lresult[6].first=="data"); I(lresult[3].first=="new entries line"); + I(lresult[4].first=="mode"); std::string new_revision; parse_entry(lresult[3].second,new_revision,result.keyword_substitution); - result.mode=lresult[4].second; + result.mode=permissions2int(lresult[4].second); result.contents=lresult[6].second; L(FL("file %s revision %s: %d bytes\n") % file % revision % lresult[6].second.size()); @@ -1386,7 +1387,7 @@ std::mapremoved) { writestr("Checkin-time "+time_t2rfc822(when)+"\n"); writestr("Modified "+bname+"\n"); - writestr("u=rw,g=r,o=r\n"); // standard mode + writestr(int2permissions(i->mode)+"\n"); // do _not_ translate this into locale format (e.g. F() ) writestr(boost::lexical_cast(i->new_content.size())+"\n"); writestr(i->new_content); ============================================================ --- mtn_cvs/cvs_client.hh 788496865cc0bf8573b5faedd6aabf65e494f061 +++ mtn_cvs/cvs_client.hh d4fc5e3982d02b5b1e982cc5a9e85af3e3a688d3 @@ -52,12 +52,12 @@ class cvs_client struct checkout { time_t mod_time; std::string contents; - std::string mode; + int mode; // in unix octal form bool dead; std::string keyword_substitution; std::string committemplate; - checkout() : mod_time(-1), dead() {} + checkout() : mod_time(-1), mode(0644), dead() {} }; struct update_callbacks { virtual void operator()(const update &) const=0; @@ -76,11 +76,12 @@ class cvs_client { std::string file; std::string old_revision; // newly_added => "0" std::string keyword_substitution; + int mode; // in unix octal notation // actually these two form a tristate ;-) bool removed; std::string new_content; - commit_arg() : old_revision("0"), removed() {} + commit_arg() : old_revision("0"), mode(0644), removed() {} }; private: ============================================================ --- mtn_cvs/cvs_sync.cc faa92a8506b60dc94bb90f16a9fec0cce09e8b40 +++ mtn_cvs/cvs_sync.cc 0e9afb0cb2937b13cde55913fa95ec5853d201d3 @@ -373,6 +373,7 @@ build_change_set(const cvs_client &c, mt } #warning 2do mode_change // cs.attrs_cleared cs.attrs_set + //if (fn->second.second->?? } } for (cvs_manifest::const_iterator f = newm.begin(); f != newm.end(); ++f)