Patchwork merge: make error message consistent with other commands

login
register
mail settings
Submitter Martin von Zweigbergk
Date Oct. 10, 2014, 4:12 p.m.
Message ID <3174c3c4c72df1cf7a9c.1412957559@handduk2.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/6181/
State Accepted
Headers show

Comments

Martin von Zweigbergk - Oct. 10, 2014, 4:12 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@gmail.com>
# Date 1412803013 25200
#      Wed Oct 08 14:16:53 2014 -0700
# Node ID 3174c3c4c72df1cf7a9c3df30ba43c314cb6809b
# Parent  a1eb21f5caea4366310e32aa85248791d5bbfa0c
merge: make error message consistent with other commands

If a merge is attempted when another merge is already ongoing, we give
the message "outstanding uncommitted merges". Many other commands
(such as backout, rebase, histedit) give the same message in singular
form. Since the singular form also seems to make more sense, let's use
that for 'hg merge' as well.
Matt Mackall - Oct. 10, 2014, 4:53 p.m.
On Fri, 2014-10-10 at 09:12 -0700, Martin von Zweigbergk wrote:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz@gmail.com>
> # Date 1412803013 25200
> #      Wed Oct 08 14:16:53 2014 -0700
> # Node ID 3174c3c4c72df1cf7a9c3df30ba43c314cb6809b
> # Parent  a1eb21f5caea4366310e32aa85248791d5bbfa0c
> merge: make error message consistent with other commands

Queued for default, thanks.

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -1058,7 +1058,7 @@ 
 
         ### check phase
         if not overwrite and len(pl) > 1:
-            raise util.Abort(_("outstanding uncommitted merges"))
+            raise util.Abort(_("outstanding uncommitted merge"))
         if branchmerge:
             if pas == [p2]:
                 raise util.Abort(_("merging with a working directory ancestor"
diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t
--- a/tests/test-largefiles.t
+++ b/tests/test-largefiles.t
@@ -1705,7 +1705,7 @@ 
 - make sure update of merge with removed largefiles fails as expected
   $ hg rm sub2/large6
   $ hg up -r.
-  abort: outstanding uncommitted merges
+  abort: outstanding uncommitted merge
   [255]
 
 - revert should be able to revert files introduced in a pending merge