diff -r 24b57c3899f8 -r 751d1138ce35 mercurial/copies.py --- a/mercurial/copies.py Sun Feb 01 16:23:07 2015 -0600 +++ b/mercurial/copies.py Sun Feb 01 16:25:12 2015 -0600 @@ -133,7 +133,7 @@ for f in fctx.ancestors(): if am.get(f.path(), None) == f.filenode(): return f - if f.rev() < limit: + if limit >= 0 and f.linkrev() < limit and f.rev() < limit: return None def _dirstatecopies(d):