Mercurial > public > mercurial-scm > hg-stable
diff mercurial/merge.py @ 16094:0776a6cababe
merge: don't use unknown()
This removes use of unknown files for building the synthetic working
directory manifest used by manifestmerge. Instead, we adopt the
strategy used by _checkunknown.
Side-effect: unknown files are no longer moved by remote directory
renames, and now are left alone like ignored files.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 09 Feb 2012 17:04:17 -0600 |
parents | 7e30f5f2285f |
children | 3eab42088be4 |
line wrap: on
line diff
--- a/mercurial/merge.py Thu Feb 09 16:50:19 2012 -0600 +++ b/mercurial/merge.py Thu Feb 09 17:04:17 2012 -0600 @@ -245,7 +245,7 @@ act("prompt keep", "a", f) elif n[20:] == "a": # added, no remote act("remote deleted", "f", f) - elif n[20:] != "u": + else: act("other deleted", "r", f) for f, n in m2.iteritems(): @@ -265,7 +265,13 @@ act("remote moved to " + f, "m", f2, f, f, fmerge(f2, f, f2), True) elif f not in ma: - act("remote created", "g", f, m2.flags(f)) + if (not overwrite + and _checkunknownfile(repo, p1, p2, f)): + rflags = fmerge(f, f, f) + act("remote differs from untracked local", + "m", f, f, f, rflags, False) + else: + act("remote created", "g", f, m2.flags(f)) elif n != ma[f]: if repo.ui.promptchoice( _("remote changed %s which local deleted\n" @@ -559,7 +565,6 @@ ### calculate phase action = [] - wc.status(unknown=True) # prime cache folding = not util.checkcase(repo.path) if not force: _checkunknown(repo, wc, p2)