changeset 16006:39e60576ac98 stable

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.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Fri, 27 Jan 2012 22:29:58 +0900
parents 591f258ae630
children f06c53ca59a9
files mercurial/revset.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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):