Mercurial > public > mercurial-scm > hg
comparison mercurial/merge.py @ 4304:4787e2b0dd03
merge: fix a bug where copies were ignored
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 05 Apr 2007 16:43:18 -0500 |
parents | 7e1c8a565a4f |
children | 5e05007d3857 8aee687f0214 |
comparison
equal
deleted
inserted
replaced
4267:8185a1ca8628 | 4304:4787e2b0dd03 |
---|---|
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: |