Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/merge.py @ 3252:ae85272b59a4
merge: copy fixes and tests
Fix up "already seen" logic
Fix merge action in remote copy case
Add status message
Add lots of merge+copy/move test cases
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 06 Oct 2006 16:55:11 -0500 |
parents | c93ce7f10f85 |
children | 764688cf51e5 |
comparison
equal
deleted
inserted
replaced
3251:c93ce7f10f85 | 3252:ae85272b59a4 |
---|---|
246 continue | 246 continue |
247 if f in m1: | 247 if f in m1: |
248 continue | 248 continue |
249 if f in copy: | 249 if f in copy: |
250 f2 = copy[f] | 250 f2 = copy[f] |
251 if f2 in ma or f2 in m1: # already seen | 251 if f2 not in m2: # already seen |
252 continue | 252 continue |
253 # rename case 1, A/A,B/A | 253 # rename case 1, A/A,B/A |
254 act("remote copied", | 254 act("remote copied", |
255 f, "c", f2, f, m1[f2], m2[f], fmerge(f2, f, f2), False) | 255 f2, "c", f, f, m1[f2], m2[f], fmerge(f2, f, f2), False) |
256 elif f in ma: | 256 elif f in ma: |
257 if overwrite or backwards: | 257 if overwrite or backwards: |
258 act("recreating", f, "g", m2.execf(f), n) | 258 act("recreating", f, "g", m2.execf(f), n) |
259 elif n != ma[f]: | 259 elif n != ma[f]: |
260 if ui.prompt( | 260 if ui.prompt( |
283 repo.ui.warn(_("update failed to remove %s: %s!\n") % | 283 repo.ui.warn(_("update failed to remove %s: %s!\n") % |
284 (f, inst.strerror)) | 284 (f, inst.strerror)) |
285 removed +=1 | 285 removed +=1 |
286 elif m == "c": # copy | 286 elif m == "c": # copy |
287 f2, fd, my, other, flag, move = a[2:] | 287 f2, fd, my, other, flag, move = a[2:] |
288 repo.ui.status(_("merging %s and %s to %s\n") % (f, f2, fd)) | |
288 if filemerge(repo, f, f2, fd, my, other, xp1, xp2, move): | 289 if filemerge(repo, f, f2, fd, my, other, xp1, xp2, move): |
289 unresolved += 1 | 290 unresolved += 1 |
290 util.set_exec(repo.wjoin(fd), flag) | 291 util.set_exec(repo.wjoin(fd), flag) |
291 merged += 1 | 292 merged += 1 |
292 elif m == "m": # merge | 293 elif m == "m": # merge |