# HG changeset patch # User mpm@selenic.com # Date 1126771210 18000 # Node ID f75567782abad13aba834671b9e20448e90e8ac2 # Parent 1945754e466be55528a7630f93a8fc6761ab2e68# Parent fe7fbfdb066d2ff8f34978e3db0db868f3912e44 Merge with BOS diff -r 1945754e466b -r f75567782aba mercurial/commands.py --- 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: