# HG changeset patch # User Matt Mackall # Date 1159304331 18000 # Node ID 1839e6e91c3ae2e4f5366e2ebe14e4152352ef2e # Parent e43fd1623fe1e72651a0cf341ee6ffb2ddfb7fbc findcopies: shortcut for empty working dir diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -133,6 +133,10 @@ def findcopies(repo, m1, m2, limit): Find moves and copies between m1 and m2 back to limit linkrev """ + # avoid silly behavior for update from empty dir + if not m1: + return {} + dcopies = repo.dirstate.copies() copy = {} match = {}