[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Explicit revision numbers
From: |
Holger |
Subject: |
Explicit revision numbers |
Date: |
21 Sep 2006 02:11:56 -0700 |
User-agent: |
G2/1.0 |
Hi
As stated in an earlier topic on this list "How do I diff from 'add' to
rev 1.1?" ...
I've created a little python script to produce patches from log
messages - i.e.:
patchmaker "Bug 123"
In this script I parse the logs and I need to find out what previous
rev each new rev is based on. I do that like this:
def calcPrevRev(self):
# todo: get this from CVS instead of guessing
self.prevrev = "0"
ver = self.rev.split(".")
n = int(ver.pop()) - 1
while len(ver) >= 1:
if n >= 1:
ver.append(str(n))
self.prevrev = ".".join(ver)
break
else:
if len(ver) <= 1: # prevrev is null
break
ver.pop() # throw this away
n = int(ver.pop())
My question:
IRC I've read somewhere that you are able to explicitely specify new
revision number - e.g bump the major number - when checking in. Is this
still true?
Is there a better way than the above to figure prevrev out?
Help appreciated.
/Holger
- Explicit revision numbers,
Holger <=