[PATCH] update: remove unnecessary check for unknown files with --check
Martin von Zweigbergk
martinvonz at google.com
Tue Nov 18 18:24:50 CST 2014
# HG changeset patch
# User Martin von Zweigbergk <martinvonz at google.com>
# Date 1416356072 28800
# Tue Nov 18 16:14:32 2014 -0800
# Node ID e90eec7072fd8cbead6a46639ebeb6fd0b0e1e06
# Parent e63941631a3f61b3323dbcc2545689b1eb34e308
update: remove unnecessary check for unknown files with --check
As far as I and the test suite can tell, the checks in manifestmerge()
already report the errors (whether or not --check is given), so we
don't need to call merge.checkunknown(). Since this is the last call
to the method, also remove the method.
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -6185,7 +6185,6 @@
raise util.Abort(_("uncommitted changes"))
if rev is None:
rev = repo[repo[None].branch()].rev()
- mergemod.checkunknown(repo, repo[None], repo[rev])
repo.ui.setconfig('ui', 'forcemerge', tool, 'update')
diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -304,18 +304,6 @@
and repo.dirstate.normalize(f) not in repo.dirstate
and mctx[f].cmp(wctx[f]))
-def checkunknown(repo, wctx, mctx):
- "check for collisions between unknown files and files in mctx"
-
- error = False
- for f in mctx:
- if f not in wctx and _checkunknownfile(repo, wctx, mctx, f):
- error = True
- wctx._repo.ui.warn(_("%s: untracked file differs\n") % f)
- if error:
- raise util.Abort(_("untracked files in working directory differ "
- "from files in requested revision"))
-
def _forgetremoved(wctx, mctx, branchmerge):
"""
Forget removed files
More information about the Mercurial-devel
mailing list