--- a/mercurial/merge.py Tue Nov 18 20:29:25 2014 -0800
+++ b/mercurial/merge.py Fri Dec 12 23:18:36 2014 -0800
@@ -297,11 +297,13 @@
self.mark(dfile, 'r')
return r
-def _checkunknownfile(repo, wctx, mctx, f):
+def _checkunknownfile(repo, wctx, mctx, f, f2=None):
+ if f2 is None:
+ f2 = f
return (os.path.isfile(repo.wjoin(f))
and repo.wopener.audit.check(f)
and repo.dirstate.normalize(f) not in repo.dirstate
- and mctx[f].cmp(wctx[f]))
+ and mctx[f2].cmp(wctx[f]))
def _forgetremoved(wctx, mctx, branchmerge):
"""
@@ -517,6 +519,9 @@
if m in ('c', 'dc'):
if _checkunknownfile(repo, wctx, p2, f):
aborts.append(f)
+ elif m == 'dg':
+ if _checkunknownfile(repo, wctx, p2, f, args[0]):
+ aborts.append(f)
for f in sorted(aborts):
repo.ui.warn(_("%s: untracked file differs\n") % f)