From: W. Trevor King Date: Mon, 14 Dec 2009 01:09:51 +0000 (-0500) Subject: Adjust Hg._vcs_revision_id for 1-indexed revision ids. X-Git-Tag: 1.0.0~59^2~52^2~70 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7dc16313f3426640830a79be914be9dc01d08849;p=be.git Adjust Hg._vcs_revision_id for 1-indexed revision ids. --- 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)