X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fvc-backend.C;h=8d1d6e298977a1e9b956646772706a1ef23ac28d;hb=d9c0aa81954969f65c72b0b229d08a3548d4e5b1;hp=8c0a29adf3e64044dea4df4d1504cf0bf018ae87;hpb=3660343dc7da7cb40b93448949dca02a579505d5;p=lyx.git diff --git a/src/vc-backend.C b/src/vc-backend.C index 8c0a29adf3..8d1d6e2989 100644 --- a/src/vc-backend.C +++ b/src/vc-backend.C @@ -5,6 +5,7 @@ #endif #include +using std::ifstream; #include "vc-backend.h" #include "debug.h" @@ -222,11 +223,11 @@ void CVS::scanMaster() string tmpf = "/" + OnlyFilename(file_) + "/"; lyxerr[Debug::LYXVC] << "\tlooking for `" << tmpf << "'" << endl; string line; + LRegex reg("/(.*)/(.*)/(.*)/(.*)/(.*)"); while(getline(ifs, line)) { lyxerr[Debug::LYXVC] << "\t line: " << line << endl; if (contains(line, tmpf)) { // Ok extract the fields. - LRegex reg("/(.*)/(.*)/(.*)/(.*)/(.*)"); LRegex::SubMatches const & sm = reg.exec(line); //sm[0]; // whole matched string //sm[1]; // filename @@ -253,14 +254,6 @@ void CVS::scanMaster() locker_ = "Locked"; vcstat = LOCKED; } -#if 0 - for (LRegex::SubMatches::const_iterator cit = sm.begin(); - cit != sm.end(); ++cit) { - if ((*cit).first != string::npos) - lyxerr << string(line, (*cit).first, - (*cit).second) << endl; - } -#endif break; } } @@ -269,19 +262,24 @@ void CVS::scanMaster() void CVS::registrer(string const & msg) { - // cvs add + doVCCommand("cvs -q add -m \"" + msg + "\" \"" + + OnlyFilename(owner_->getFileName()) + "\""); + owner_->getUser()->owner()->getLyXFunc()->Dispatch("buffer-reload"); } void CVS::checkIn(string const & msg) { - // cvs commit + doVCCommand("cvs -q commit -m \"" + msg + "\" \"" + + OnlyFilename(owner_->getFileName()) + "\""); + owner_->getUser()->owner()->getLyXFunc()->Dispatch("buffer-reload"); } void CVS::checkOut() { - // cvs update + // cvs update or perhaps for cvs this should be a noop + lyxerr << "Sorry not implemented." << endl; } @@ -289,7 +287,8 @@ void CVS::revert() { // not sure how to do this... // rm file - // cvs update + // cvs update + lyxerr << "Sorry not implemented." << endl; } @@ -298,9 +297,11 @@ void CVS::undoLast() // merge the current with the previous version // in a reverse patch kind of way, so that the // result is to revert the last changes. + lyxerr << "Sorry not implemented." << endl; } void CVS::getLog(string const &) { + lyxerr << "Sorry not implemented." << endl; }