comparison mercurial/merge.py @ 3161:1839e6e91c3a

findcopies: shortcut for empty working dir
author Matt Mackall <mpm@selenic.com>
date Tue, 26 Sep 2006 15:58:51 -0500
parents 56c59ba7aa76
children 84561ea8711e
comparison
equal deleted inserted replaced
3159:e43fd1623fe1 3161:1839e6e91c3a
130 130
131 def findcopies(repo, m1, m2, limit): 131 def findcopies(repo, m1, m2, limit):
132 """ 132 """
133 Find moves and copies between m1 and m2 back to limit linkrev 133 Find moves and copies between m1 and m2 back to limit linkrev
134 """ 134 """
135
136 # avoid silly behavior for update from empty dir
137 if not m1:
138 return {}
135 139
136 dcopies = repo.dirstate.copies() 140 dcopies = repo.dirstate.copies()
137 copy = {} 141 copy = {}
138 match = {} 142 match = {}
139 u1 = nonoverlap(m1, m2) 143 u1 = nonoverlap(m1, m2)