Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/merge.py @ 23362:cc83cac41619
merge: remove confusing comment about --force
manifestmerge() has a piece of code that's roughly:
if not force and different:
abort
else:
# if different: old untracked f may be overwritten and lost
...
The comment only talks about what happens when 'different' is true,
and in combination with the if-block above, that must mean that it is
only about what happens when 'force and different'. It seems quite
fine that files are overwritten when 'force' is true, so let's remove
the comment. As it stands, it can easily be interpreted as a TODO
(which is how I interpreted it at first).
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 19 Nov 2014 08:50:08 -0800 |
parents | 1cbc00ff2373 |
children | 90cc552ceed5 |
comparison
equal
deleted
inserted
replaced
23361:936b0ff34346 | 23362:cc83cac41619 |
---|---|
498 elif n2 and n2 != ma[f]: | 498 elif n2 and n2 != ma[f]: |
499 different = _checkunknownfile(repo, wctx, p2, f) | 499 different = _checkunknownfile(repo, wctx, p2, f) |
500 if not force and different: | 500 if not force and different: |
501 aborts.append((f, "ud")) | 501 aborts.append((f, "ud")) |
502 else: | 502 else: |
503 # if different: old untracked f may be overwritten and lost | |
504 if acceptremote: | 503 if acceptremote: |
505 actions['g'].append((f, (fl2,), "remote recreating")) | 504 actions['g'].append((f, (fl2,), "remote recreating")) |
506 else: | 505 else: |
507 actions['dc'].append((f, (fl2,), "prompt deleted/changed")) | 506 actions['dc'].append((f, (fl2,), "prompt deleted/changed")) |
508 | 507 |