changeset 3161:1839e6e91c3a

findcopies: shortcut for empty working dir
author Matt Mackall <mpm@selenic.com>
date Tue, 26 Sep 2006 15:58:51 -0500
parents e43fd1623fe1
children 84561ea8711e
files mercurial/merge.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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 = {}