]> git.lyx.org Git - lyx.git/blobdiff - src/VCBackend.cpp
Customization.lyx: rewrote section how to install LaTeX-packages
[lyx.git] / src / VCBackend.cpp
index 10caca593000577c21277389b894fbf45f8478f8..100da4f302c7a4699212a2a1cfe546713bcac083 100644 (file)
 #include "support/lstrings.h"
 #include "support/Path.h"
 #include "support/Systemcall.h"
-
-#include <boost/regex.hpp>
+#include "support/regex.h"
 
 #include <fstream>
 
 using namespace std;
 using namespace lyx::support;
 
-using boost::regex;
-using boost::regex_match;
-using boost::smatch;
+
 
 namespace lyx {
 
@@ -296,8 +293,12 @@ bool RCS::prepareFileRevision(string const &revis, string & f)
 
        if (isStrInt(rev)) {
                int back = convert<int>(rev);
-               if (back > 0)
-                       return false;
+               // if positive use as the last number in the whole revision string
+               if (back > 0) {
+                       string base;
+                       rsplit(version_, base , '.' );
+                       rev = base + "." + rev;
+               }
                if (back == 0)
                        rev = version_;
                // we care about the last number from revision string
@@ -315,7 +316,7 @@ bool RCS::prepareFileRevision(string const &revis, string & f)
                }
        }
 
-       FileName tmpf = FileName::tempName("lyxvcrev");
+       FileName tmpf = FileName::tempName("lyxvcrev_" + rev + "_");
        if (tmpf.empty()) {
                LYXERR(Debug::LYXVC, "Could not generate logfile " << tmpf);
                return N_("Error: Could not generate logfile.");
@@ -1061,13 +1062,14 @@ bool SVN::prepareFileRevision(string const & revis, string & f)
                        return false;
        }
 
-       FileName tmpf = FileName::tempName("lyxvcrev");
+       string revname = convert<string>(rev);
+       FileName tmpf = FileName::tempName("lyxvcrev_" + revname + "_");
        if (tmpf.empty()) {
                LYXERR(Debug::LYXVC, "Could not generate logfile " << tmpf);
                return N_("Error: Could not generate logfile.");
        }
 
-       doVCCommand("svn cat -r " + convert<string>(rev) + " "
+       doVCCommand("svn cat -r " + revname + " "
                      + quoteName(onlyFileName(owner_->absFileName()))
                      + " > " + quoteName(tmpf.toFilesystemEncoding()),
                FileName(owner_->filePath()));