From 7dc16313f3426640830a79be914be9dc01d08849 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sun, 13 Dec 2009 20:09:51 -0500 Subject: [PATCH] Adjust Hg._vcs_revision_id for 1-indexed revision ids. --- libbe/storage/vcs/hg.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libbe/storage/vcs/hg.py b/libbe/storage/vcs/hg.py index 776d986..7e0643b 100644 --- a/libbe/storage/vcs/hg.py +++ b/libbe/storage/vcs/hg.py @@ -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) -- 2.26.2