comparison mercurial/merge.py @ 4309:09c5f734ff6a

merge: fix a bug where copies were getting ignored
author Matt Mackall <mpm@selenic.com>
date Thu, 05 Apr 2007 16:25:47 -0500
parents 0d51eb296fb9
children 5e05007d3857 10edaed7f909
comparison
equal deleted inserted replaced
4302:d69bdc1091b8 4309:09c5f734ff6a
127 127
128 def checkcopies(c, man): 128 def checkcopies(c, man):
129 '''check possible copies for filectx c''' 129 '''check possible copies for filectx c'''
130 for of in findold(c): 130 for of in findold(c):
131 if of not in man: 131 if of not in man:
132 return 132 continue
133 c2 = ctx(of, man[of]) 133 c2 = ctx(of, man[of])
134 ca = c.ancestor(c2) 134 ca = c.ancestor(c2)
135 if not ca: # unrelated 135 if not ca: # unrelated
136 return 136 continue
137 if ca.path() == c.path() or ca.path() == c2.path(): 137 if ca.path() == c.path() or ca.path() == c2.path():
138 fullcopy[c.path()] = of 138 fullcopy[c.path()] = of
139 if c == ca or c2 == ca: # no merge needed, ignore copy 139 if c == ca and c2 == ca: # no merge needed, ignore copy
140 return 140 continue
141 copy[c.path()] = of 141 copy[c.path()] = of
142 142
143 def dirs(files): 143 def dirs(files):
144 d = {} 144 d = {}
145 for f in files: 145 for f in files: