# HG changeset patch # User FUJIWARA Katsunori # Date 2012-01-27 13:29:58 # Node ID 39e60576ac986a2b734b4223f0e10009f0116a02 # Parent 591f258ae6305fdccbb0d596739335c4114599d5 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 --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -775,8 +775,8 @@ def remote(repo, subset, x): 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):