diff options
author | W. Trevor King <wking@drexel.edu> | 2009-12-13 08:03:58 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-12-13 08:03:58 -0500 |
commit | 1cd02476257a7673668f1bdcdeac2902f3f21adb (patch) | |
tree | 81b5dd46e3abd7cf784d33649b53d4a65e0d81af /libbe/storage/vcs/hg.py | |
parent | 9147ab9e77cd5730c1b2d5a76c92f87564f4af8e (diff) | |
download | bugseverywhere-1cd02476257a7673668f1bdcdeac2902f3f21adb.tar.gz |
Adjust Hg._vcs_revision_id to bail cleanly on non-int revids
Diffstat (limited to 'libbe/storage/vcs/hg.py')
-rw-r--r-- | libbe/storage/vcs/hg.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libbe/storage/vcs/hg.py b/libbe/storage/vcs/hg.py index f1a7eef..260f0c4 100644 --- a/libbe/storage/vcs/hg.py +++ b/libbe/storage/vcs/hg.py @@ -100,6 +100,10 @@ class Hg(base.VCS): return self._vcs_revision_id(-1) def _vcs_revision_id(self, index, style='id'): + try: + index = str(int(index)) + except ValueError: + return None args = ['identify', '--rev', str(int(index)), '--%s' % style] kwargs = {'expect': (0,255)} status,output,error = self._u_invoke_client(*args, **kwargs) |