# # # patch "monotone.cc" # from [19e35bb395d585e2ccd72c3fcf70cd9c8091f2b4] # to [36b5e28b3fb1ffa71f09f4847b9aa29e17110c21] # # patch "monotone.hh" # from [a756cb937ea04ab9861c1299e9369c0a017960e8] # to [b16bbdc7edc223093df365f5e76aa0a5986bab35] # # patch "revdat.cc" # from [33575c525f027f85bd9035135c7d9e6a7ef91515] # to [f165d83aa045fd8dd962c73653755c991c17bfcf] # ============================================================ --- monotone.cc 19e35bb395d585e2ccd72c3fcf70cd9c8091f2b4 +++ monotone.cc 36b5e28b3fb1ffa71f09f4847b9aa29e17110c21 @@ -138,10 +138,10 @@ { if (done < 2) { - std::cerr<<"Not spawning, pipes still open!\n"; + //std::cerr<<"Not spawning, pipes still open!\n"; return false; } - std::cerr<<"spawn()\n"; + //std::cerr<<"spawn()\n"; args.insert(args.begin(), Glib::find_program_in_path("monotone")); if (!db.empty()) args.push_back("--db=" + db); @@ -188,11 +188,11 @@ { if (!pid) { - std::cerr<<"Already stopped.\n"; - if (busy) std::cerr<<"\tBut still busy!\n"; + //std::cerr<<"Already stopped.\n"; + //if (busy) std::cerr<<"\tBut still busy!\n"; return false; } - std::cerr<<"kill()\n"; + //std::cerr<<"kill()\n"; #ifdef WIN32 TerminateProcess(pid, 0); #else @@ -557,11 +557,11 @@ } void -monotone::get_manifest(string const & rev, string & out) +monotone::get_manifest_of(string const & rev, string & out) { std::vector args; args.push_back(rev); - command("get_manifest", args); + command("get_manifest_of", args); signal_done.connect(sigc::bind(sigc::ptr_fun(&process_noop), &output_std, &out)); } ============================================================ --- monotone.hh a756cb937ea04ab9861c1299e9369c0a017960e8 +++ monotone.hh b16bbdc7edc223093df365f5e76aa0a5986bab35 @@ -99,7 +99,7 @@ string const & rev2, string & out); void cat(string const & filename, string const & rev, string & out); void get_revision(string const & rev, string & out); - void get_manifest(string const & rev, string & out); + void get_manifest_of(string const & rev, string & out); void add(string const & file); void drop(string const & file); void revert(string const & file); ============================================================ --- revdat.cc 33575c525f027f85bd9035135c7d9e6a7ef91515 +++ revdat.cc f165d83aa045fd8dd962c73653755c991c17bfcf @@ -195,7 +195,7 @@ string res; mtn->get_revision(rev, res); mtn->waitfor(); - std::string rename_from, man; + std::string rename_from; std::set changed; std::map pmap; for (int begin = 0, end = res.find('\n'); begin != res.size(); @@ -205,12 +205,8 @@ int lpos = line.find_first_of("[\""); int rpos = line.find_first_of("]\"", lpos + 1); std::string contents = line.substr(lpos + 1, rpos - lpos - 1); - if (line.find("new_manifest") < lpos) + if (line.find("old_revision") < lpos) { - man = contents; - } - else if (line.find("old_revision") < lpos) - { pvec.push_back(contents); pchanges.push_back(std::vector()); pmap.clear(); @@ -260,15 +256,17 @@ pchanges.back()[pos].state = inventory_item::patched; } } - mtn->get_manifest(man, res); + mtn->get_manifest_of(rev, res); mtn->waitfor(); for (int begin = 0, end = res.find('\n'); begin != res.size(); begin = end + 1, end = res.find('\n', begin)) { std::string line = res.substr(begin, end-begin); - int lpos = line.find_first_of(" \t"); - int rpos = line.find_first_not_of(" \t", lpos); - std::string contents = line.substr(rpos); + if (line.find("file \"") == line.npos) + continue; + int lpos = line.find_first_of("\"")+1; + int rpos = line.find_last_of("\""); + std::string contents = line.substr(lpos, rpos-lpos); if (changed.find(contents) == changed.end()) { inventory_item ii;