[PATCH 1 of 4] scmutil: do not return working context if rev is 0
Simon Heimberg
simohe at besonet.ch
Sun Sep 11 10:29:05 CDT 2011
# HG changeset patch
# User Simon Heimberg <simohe at besonet.ch>
# Date 1315412552 -7200
# Node ID 37e014596b3ac292d90fa2a92faa06ca390c50ad
# Parent d361c75c1f4cc8bcbabae440eecfeaac921ba0b2
scmutil: do not return working context if rev is 0
related to issue2992
diff -r d361c75c1f4c -r 37e014596b3a mercurial/scmutil.py
--- a/mercurial/scmutil.py Son Sep 11 14:42:30 2011 +0200
+++ b/mercurial/scmutil.py Mit Sep 07 18:22:32 2011 +0200
@@ -471,7 +471,7 @@
return path
def revsingle(repo, revspec, default='.'):
- if not revspec:
+ if not revspec and revspec != 0:
return repo[default]
l = revrange(repo, [revspec])
@@ -480,7 +480,7 @@
return repo[l[-1]]
def revpair(repo, revs):
- if not revs:
+ if not revs and revs != 0:
return repo.dirstate.p1(), None
l = revrange(repo, revs)
More information about the Mercurial-devel
mailing list