[PATCH 1 of 3 STABLE] revset: fix 'remote()' failure when remote repo has more revs than local
FUJIWARA Katsunori
foozy at lares.dti.ne.jp
Fri Jan 27 07:45:30 CST 2012
# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1327670998 -32400
# Branch stable
# Node ID 41a6e4fb52043c52be1ad6b238fd122d3197cca0
# Parent fcf66193b18699141e1da1ef4de4795d62a658cb
revset: fix 'remote()' failure when remote repo has more revs than local
current 'remote()' implementation uses 'r' variable, even if it is not
initialized when 'if n in repo' is not true.
this causes unexpected exception.
diff -r fcf66193b186 -r 41a6e4fb5204 mercurial/revset.py
--- a/mercurial/revset.py Thu Jan 26 20:34:57 2012 -0600
+++ b/mercurial/revset.py Fri Jan 27 22:29:58 2012 +0900
@@ -775,8 +775,8 @@
n = other.lookup(q)
if n in repo:
r = repo[n].rev()
- if r in subset:
- return [r]
+ if r in subset:
+ return [r]
return []
def removes(repo, subset, x):
More information about the Mercurial-devel
mailing list