changeset 23351:1cbc00ff2373

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.
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 18 Nov 2014 16:14:32 -0800
parents e63941631a3f
children 5bd04faaa3ee
files mercurial/commands.py mercurial/merge.py
diffstat 2 files changed, 0 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Nov 18 12:29:30 2014 -0600
+++ b/mercurial/commands.py	Tue Nov 18 16:14:32 2014 -0800
@@ -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')
 
--- a/mercurial/merge.py	Tue Nov 18 12:29:30 2014 -0600
+++ b/mercurial/merge.py	Tue Nov 18 16:14:32 2014 -0800
@@ -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