[PATCH 4 of 8] merge: remove constant tuple element from 'aborts'

Martin von Zweigbergk martinvonz at google.com
Mon Dec 22 18:33:38 CST 2014


# HG changeset patch
# User Martin von Zweigbergk <martinvonz at google.com>
# Date 1416371365 28800
#      Tue Nov 18 20:29:25 2014 -0800
# Node ID c51c4c470a9e7e9817d336d896f972fbac041558
# Parent  d2d9d4c3de25a496d924b7123ebf23cc811fe96b
merge: remove constant tuple element from 'aborts'

The second element of the tuples in the 'aborts' list is always 'ud',
so let's remove it.

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -516,12 +516,10 @@
         for f, (m, args, msg) in actions.iteritems():
             if m in ('c', 'dc'):
                 if _checkunknownfile(repo, wctx, p2, f):
-                    aborts.append((f, "ud"))
+                    aborts.append(f)
 
-    for f, m in sorted(aborts):
-        if m == 'ud':
-            repo.ui.warn(_("%s: untracked file differs\n") % f)
-        else: assert False, m
+    for f in sorted(aborts):
+        repo.ui.warn(_("%s: untracked file differs\n") % f)
     if aborts:
         raise util.Abort(_("untracked files in working directory differ "
                            "from files in requested revision"))


More information about the Mercurial-devel mailing list