Mercurial > public > mercurial-scm > hg
comparison mercurial/merge.py @ 3400:d2b55e3c4e25
merge: if filemerge skips merge, report as updated
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 15 Oct 2006 16:18:09 -0500 |
parents | ba7c74081861 |
children | ef2e990f9047 |
comparison
equal
deleted
inserted
replaced
3399:5dbb3a991bbf | 3400:d2b55e3c4e25 |
---|---|
28 | 28 |
29 fcm = wctx.filectx(fw) | 29 fcm = wctx.filectx(fw) |
30 fco = mctx.filectx(fo) | 30 fco = mctx.filectx(fo) |
31 | 31 |
32 if not fco.cmp(fcm.data()): # files identical? | 32 if not fco.cmp(fcm.data()): # files identical? |
33 return 0 | 33 return None |
34 | 34 |
35 fca = fcm.ancestor(fco) | 35 fca = fcm.ancestor(fco) |
36 if not fca: | 36 if not fca: |
37 fca = repo.filectx(fw, fileid=-1) | 37 fca = repo.filectx(fw, fileid=-1) |
38 a = repo.wjoin(fw) | 38 a = repo.wjoin(fw) |
286 repo.ui.warn(_("update failed to remove %s: %s!\n") % | 286 repo.ui.warn(_("update failed to remove %s: %s!\n") % |
287 (f, inst.strerror)) | 287 (f, inst.strerror)) |
288 removed +=1 | 288 removed +=1 |
289 elif m == "m": # merge | 289 elif m == "m": # merge |
290 f2, fd, flag, move = a[2:] | 290 f2, fd, flag, move = a[2:] |
291 if filemerge(repo, f, f2, wctx, mctx): | 291 r = filemerge(repo, f, f2, wctx, mctx) |
292 if r > 0: | |
292 unresolved += 1 | 293 unresolved += 1 |
293 else: | 294 else: |
294 merged += 1 | 295 if r is None: |
296 updated += 1 | |
297 else: | |
298 merged += 1 | |
295 if f != fd: | 299 if f != fd: |
296 repo.ui.debug(_("copying %s to %s\n") % (f, fd)) | 300 repo.ui.debug(_("copying %s to %s\n") % (f, fd)) |
297 repo.wwrite(fd, repo.wread(f)) | 301 repo.wwrite(fd, repo.wread(f)) |
298 if move: | 302 if move: |
299 repo.ui.debug(_("removing %s\n") % f) | 303 repo.ui.debug(_("removing %s\n") % f) |