aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/bzr.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-07-23 14:19:15 -0400
committerW. Trevor King <wking@drexel.edu>2009-07-23 14:19:15 -0400
commit45cc50d7ce0b5c32a2936d6eb87a3002670924bc (patch)
tree3d7d34e3a6eb19a76aab4b649a2b72f8cef98cb9 /libbe/bzr.py
parent988b86a70cfc493f51b71e3e0b7effa439719a13 (diff)
downloadbugseverywhere-45cc50d7ce0b5c32a2936d6eb87a3002670924bc.tar.gz
Added .revision_id() to all the VCSs.
This makes it easier to compare recent revisions without a human around to give you revision numbers.
Diffstat (limited to 'libbe/bzr.py')
-rw-r--r--libbe/bzr.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/libbe/bzr.py b/libbe/bzr.py
index b33292c..7457815 100644
--- a/libbe/bzr.py
+++ b/libbe/bzr.py
@@ -93,6 +93,14 @@ class Bzr(RCS):
assert len(match.groups()) == 1
revision = match.groups()[0]
return revision
+ def _rcs_revision_id(self, index):
+ status,output,error = self._u_invoke_client("revno")
+ current_revision = int(output)
+ if index >= current_revision or index < -current_revision:
+ return None
+ if index >= 0:
+ return str(index+1) # bzr commit 0 is the empty tree.
+ return str(current_revision+index+1)
def postcommit(self):
try:
self._u_invoke_client('merge')