mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
RCS case is more complicated
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35314 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
db1f90a7f8
commit
1512439fa4
@ -111,6 +111,9 @@ public:
|
||||
* which is interpreted as how many revision back from the current
|
||||
* one do we want. rev=0 is reserved for the last (committed) revision.
|
||||
* We need rev to be string, since in various VCS revision is not integer.
|
||||
* If RCS addressed by a single number, it is automatically used
|
||||
* as the last number in the whole revision specification (it applies
|
||||
* for retrieving normal revisions (rev>0) or backtracking (rev<0).
|
||||
*/
|
||||
bool prepareFileRevision(std::string const & rev, std::string & f);
|
||||
/// Does the current VC supports this operation?
|
||||
|
@ -293,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
|
||||
|
Loading…
Reference in New Issue
Block a user