aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/arch.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/arch.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/arch.py')
-rw-r--r--libbe/arch.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/libbe/arch.py b/libbe/arch.py
index 2f45aa9..1bdc8ae 100644
--- a/libbe/arch.py
+++ b/libbe/arch.py
@@ -176,7 +176,6 @@ class Arch(RCS):
self._get_archive_project_name(root)
return root
-
def _get_archive_name(self, root):
status,output,error = self._u_invoke_client("archives")
lines = output.split('\n')
@@ -188,7 +187,6 @@ class Arch(RCS):
if os.path.realpath(location) == os.path.realpath(root):
self._archive_name = archive
assert self._archive_name != None
-
def _get_archive_project_name(self, root):
# get project names
status,output,error = self._u_invoke_client("tree-version", directory=root)
@@ -281,6 +279,16 @@ class Arch(RCS):
assert revpath.startswith(self._archive_project_name()+'--')
revision = revpath[len(self._archive_project_name()+'--'):]
return revpath
+ def _rcs_revision_id(self, index):
+ status,output,error = self._u_invoke_client("logs")
+ logs = output.splitlines()
+ first_log = logs.pop(0)
+ assert first_log == "base-0", first_log
+ try:
+ log = logs[index]
+ except IndexError:
+ return None
+ return "%s--%s" % (self._archive_project_name(), log)
class CantAddFile(Exception):
def __init__(self, file):