# HG changeset patch # User Benoit Boissinot # Date 2010-02-02 08:05:20 # Node ID 31141fd7c9cc911552906dd0cfe8012e30582445 # Parent 00099580ca35d7767a88e851400d4b44f21c7543 copies: check if revisions are related (bug found with pylint) diff --git a/mercurial/copies.py b/mercurial/copies.py --- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -154,7 +154,7 @@ def copies(repo, c1, c2, ca, checkdirs=F break # no merge needed, quit early c2 = ctx(of, m2[of]) cr = related(oc, c2, ca.rev()) - if of == f or of == c2.path(): # non-divergent + if cr and (of == f or of == c2.path()): # non-divergent copy[f] = of of = None break