changeset 27653:198d291e9ffa

checkunknownfiles: make control flow clearer In particular, make it clear that we only check for and abort on conflicts if force is not true.
author Siddharth Agarwal <sid0@fb.com>
date Sat, 02 Jan 2016 03:02:57 -0800
parents cc91f3bc5461
children 95dc67f10239
files mercurial/merge.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Sat Jan 02 03:02:57 2016 -0800
+++ b/mercurial/merge.py	Sat Jan 02 03:02:57 2016 -0800
@@ -580,11 +580,11 @@
                 if _checkunknownfile(repo, wctx, mctx, f, args[0]):
                     conflicts.append(f)
 
-    for f in sorted(conflicts):
-        repo.ui.warn(_("%s: untracked file differs\n") % f)
-    if conflicts:
-        raise error.Abort(_("untracked files in working directory differ "
-                           "from files in requested revision"))
+        for f in sorted(conflicts):
+            repo.ui.warn(_("%s: untracked file differs\n") % f)
+        if conflicts:
+            raise error.Abort(_("untracked files in working directory differ "
+                                "from files in requested revision"))
 
     for f, (m, args, msg) in actions.iteritems():
         if m == 'c':