Adjust Hg._vcs_revision_id for 1-indexed revision ids.
authorW. Trevor King <wking@drexel.edu>
Mon, 14 Dec 2009 01:09:51 +0000 (20:09 -0500)
committerW. Trevor King <wking@drexel.edu>
Mon, 14 Dec 2009 01:09:51 +0000 (20:09 -0500)
libbe/storage/vcs/hg.py

index 776d9868ed153bf23ef6729ed8dc42c97a5342bd..7e0643b574e280f8d71bb79c2df7f7d830081bd9 100644 (file)
@@ -112,6 +112,8 @@ class Hg(base.VCS):
         return self._vcs_revision_id(-1)
 
     def _vcs_revision_id(self, index, style='id'):
+        if index > 0:
+            index -= 1
         args = ['identify', '--rev', str(int(index)), '--%s' % style]
         kwargs = {'expect': (0,255)}
         status,output,error = self._u_invoke_client(*args, **kwargs)