]> git.lyx.org Git - features.git/commitdiff
scan log also for svn check-in of VCS
authorPavel Sanda <sanda@lyx.org>
Tue, 22 Jul 2008 10:17:24 +0000 (10:17 +0000)
committerPavel Sanda <sanda@lyx.org>
Tue, 22 Jul 2008 10:17:24 +0000 (10:17 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25796 a592a061-630c-0410-9148-cb99ea01b6c8

src/VCBackend.cpp

index ff722f0d1976e86c6dfc0ba7e571105368ba0eb3..abe23df406aafa7b3c1c3c2f383e688363cf2bbc 100644 (file)
@@ -443,16 +443,31 @@ void SVN::scanMaster()
 
 void SVN::registrer(string const & msg)
 {
-       doVCCommand("svn -q add " + quoteName(onlyFilename(owner_->absFileName())),
+       doVCCommand("svn add -q " + quoteName(onlyFilename(owner_->absFileName())),
                    FileName(owner_->filePath()));
 }
 
 
 void SVN::checkIn(string const & msg)
 {
-       doVCCommand("svn -q commit -m \"" + msg + "\" "
-                   + quoteName(onlyFilename(owner_->absFileName())),
+       FileName tmpf = FileName::tempName("lyxvcout");
+       if (tmpf.empty()){
+               LYXERR(Debug::LYXVC, "Could not generate logfile " << tmpf);
+               return;
+       }
+
+       doVCCommand("svn commit -q -m \"" + msg + "\" "
+                   + quoteName(onlyFilename(owner_->absFileName()))
+                   + " 2> " + tmpf.toFilesystemEncoding(),
                    FileName(owner_->filePath()));
+
+       string res = scanLogFile(tmpf);
+       if (!res.empty())
+               frontend::Alert::error(_("Revision control error."),
+                               _("Error when commiting to repository.\n"
+                               "You have to manually resolve the problem.\n"
+                               "After pressing OK, LyX will reopen resolved document."));
+       tmpf.erase();
 }