]> git.lyx.org Git - lyx.git/blobdiff - src/vc-backend.C
Reduce Michael's buglist.
[lyx.git] / src / vc-backend.C
index 2d5c8383d6426ea96a0d6651ba088cc4c00b0484..c745b38fb2c2ac2a80e9748c5fade3c1e6411ff3 100644 (file)
@@ -13,7 +13,9 @@
 #include "support/LSubstring.h"
 #include "support/path.h"
 #include "support/filetools.h"
+#include "support/lstrings.h"
 #include "buffer.h"
+#include "BufferView.h"
 #include "LyXView.h"
 #include "lyxfunc.h"
 
@@ -110,7 +112,9 @@ void RCS::scanMaster()
                                vcstatus = UNLOCKED;
                                continue;
                        }
-                       string tmpt, s1, s2;
+                       string tmpt;
+                       string s1;
+                       string s2;
                        do {
                                ifs >> tmpt;
                                s1 = strip(tmpt, ';');
@@ -134,7 +138,6 @@ void RCS::scanMaster()
                                << endl;
                }
        }
-       version_ = "RCS: " + version_;
 }
 
 
@@ -146,7 +149,7 @@ void RCS::registrer(string const & msg)
        cmd += OnlyFilename(owner_->fileName());
        cmd += "\"";
        doVCCommand(cmd, owner_->filepath);
-       owner_->getUser()->owner()->getLyXFunc()->Dispatch("buffer-reload");
+       owner_->getUser()->owner()->getLyXFunc()->dispatch("buffer-reload");
 }
 
 
@@ -154,7 +157,7 @@ void RCS::checkIn(string const & msg)
 {
        doVCCommand("ci -q -u -m\"" + msg + "\" \""
                    + OnlyFilename(owner_->fileName()) + "\"", owner_->filepath);
-       owner_->getUser()->owner()->getLyXFunc()->Dispatch("buffer-reload");
+       owner_->getUser()->owner()->getLyXFunc()->dispatch("buffer-reload");
 }
 
 
@@ -163,7 +166,7 @@ void RCS::checkOut()
        owner_->markLyxClean();
        doVCCommand("co -q -l \""
                    + OnlyFilename(owner_->fileName()) + "\"", owner_->filepath);
-       owner_->getUser()->owner()->getLyXFunc()->Dispatch("buffer-reload");
+       owner_->getUser()->owner()->getLyXFunc()->dispatch("buffer-reload");
 }
 
 
@@ -174,7 +177,7 @@ void RCS::revert()
        // We ignore changes and just reload!
        owner_->markLyxClean();
        owner_->getUser()->owner()
-               ->getLyXFunc()->Dispatch("buffer-reload");
+               ->getLyXFunc()->dispatch("buffer-reload");
 }
 
 
@@ -243,8 +246,7 @@ void CVS::scanMaster()
                        LRegex::SubMatches const & sm = reg.exec(line);
                        //sm[0]; // whole matched string
                        //sm[1]; // filename
-                       version_ = "CVS: ";
-                       version_ += LSubstring(line, sm[2].first,
+                       version_ = LSubstring(line, sm[2].first,
                                              sm[2].second);
                        string file_date = LSubstring(line, sm[3].first,
                                                      sm[3].second);
@@ -276,7 +278,7 @@ void CVS::registrer(string const & msg)
 {
        doVCCommand("cvs -q add -m \"" + msg + "\" \""
                    + OnlyFilename(owner_->fileName()) + "\"", owner_->filepath);
-       owner_->getUser()->owner()->getLyXFunc()->Dispatch("buffer-reload");
+       owner_->getUser()->owner()->getLyXFunc()->dispatch("buffer-reload");
 }
 
 
@@ -285,7 +287,7 @@ void CVS::checkIn(string const & msg)
        doVCCommand("cvs -q commit -m \"" + msg + "\" \""
                    + OnlyFilename(owner_->fileName()) + "\"",
                    owner_->filepath);
-       owner_->getUser()->owner()->getLyXFunc()->Dispatch("buffer-reload");
+       owner_->getUser()->owner()->getLyXFunc()->dispatch("buffer-reload");
 }
 
 
@@ -306,7 +308,7 @@ void CVS::revert()
                    owner_->filepath);
        owner_->markLyxClean();
        owner_->getUser()->owner()
-               ->getLyXFunc()->Dispatch("buffer-reload");
+               ->getLyXFunc()->dispatch("buffer-reload");
 }