changeset 3160: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	Tue Sep 26 13:58:58 2006 +0200
+++ b/mercurial/merge.py	Tue Sep 26 15:58:51 2006 -0500
@@ -133,6 +133,10 @@
     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 = {}