revset: fix 'remote()' failure when remote repo has more revs than local stable
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Fri, 27 Jan 2012 22:29:58 +0900
branchstable
changeset 16006 39e60576ac98
parent 16005 591f258ae630
child 16007 f06c53ca59a9
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.
mercurial/revset.py
--- a/mercurial/revset.py	Fri Jan 27 12:52:13 2012 -0200
+++ 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):