# HG changeset patch # User Martin von Zweigbergk # Date 2014-11-19 19:44:00 # Node ID 18ab5e5955dfc8a01506d49fe7c4b488c30680f4 # Parent 915ac9403e138d251f6081e55e4eb838db193614 merge: structure 'remote created' code to match table This does duplicate the call to _checkunknownfile(), but it will simplify future patches. diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -496,15 +496,19 @@ def manifestmerge(repo, wctx, p2, pa, br # # Checking whether the files are different is expensive, so we # don't do that when we can avoid it. - if force and not branchmerge: + if not force: + different = _checkunknownfile(repo, wctx, p2, f) + if different: + aborts.append((f, "ud")) + else: + actions[f] = ('g', (fl2,), "remote created") + elif not branchmerge: actions[f] = ('g', (fl2,), "remote created") else: different = _checkunknownfile(repo, wctx, p2, f) - if force and branchmerge and different: + if different: actions[f] = ('m', (f, f, None, False, pa.node()), "remote differs from untracked local") - elif not force and different: - aborts.append((f, 'ud')) else: actions[f] = ('g', (fl2,), "remote created") elif n2 != ma[f]: