changeset 1259:f75567782aba

Merge with BOS
author mpm@selenic.com
date Thu, 15 Sep 2005 03:00:10 -0500
parents 1945754e466b (current diff) fe7fbfdb066d (diff)
children 4603eef60237
files
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Thu Sep 15 02:59:16 2005 -0500
+++ b/mercurial/commands.py	Thu Sep 15 03:00:10 2005 -0500
@@ -163,9 +163,9 @@
             num = int(val)
             if str(num) != val:
                 raise ValueError
-            if num < 0:
-                num += revcount
-            if not (0 <= num < revcount):
+            if num < 0: num += revcount
+            if num < 0: num = 0
+            elif num >= revcount:
                 raise ValueError
         except ValueError:
             try: