changeset 42597:51e52a495214

mq: fix for merge detection methods Differential Revision: https://phab.mercurial-scm.org/D6548
author Taapas Agrawal <taapas2897@gmail.com>
date Thu, 20 Jun 2019 01:08:56 +0530
parents 83666f011679
children 8ddfdcce4bd6
files hgext/mq.py tests/test-mq-qnew.t
diffstat 2 files changed, 5 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/mq.py	Tue Jul 09 00:03:10 2019 -0700
+++ b/hgext/mq.py	Thu Jun 20 01:08:56 2019 +0530
@@ -1162,18 +1162,17 @@
             _("local changes found, qrefresh first")
             _("local changed subrepos found, qrefresh first")
 
-        cmdutil.checkunfinished(repo)
         s = repo.status()
         if not force:
-            if len(repo[None].parents()) > 1:
-                _("outstanding uncommitted merge") #i18 tool detection
-                raise error.Abort(_("outstanding uncommitted merge"+ excsuffix))
+            cmdutil.checkunfinished(repo)
             if s.modified or s.added or s.removed or s.deleted:
                 _("local changes found") # i18n tool detection
                 raise error.Abort(_("local changes found" + excsuffix))
             if checksubstate(repo):
                 _("local changed subrepos found") # i18n tool detection
                 raise error.Abort(_("local changed subrepos found" + excsuffix))
+        else:
+            cmdutil.checkunfinished(repo, skipmerge=True)
         return s
 
     _reserved = ('series', 'status', 'guards', '.', '..')
--- a/tests/test-mq-qnew.t	Tue Jul 09 00:03:10 2019 -0700
+++ b/tests/test-mq-qnew.t	Thu Jun 20 01:08:56 2019 +0530
@@ -164,8 +164,7 @@
   0 files updated, 0 files merged, 0 files removed, 1 files unresolved
   use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   (no more unresolved files)
-  abort: outstanding uncommitted merge
-  (use 'hg commit' or 'hg merge --abort')
+  abort: cannot manage merge changesets
   $ rm -r sandbox
 
 hg headers
@@ -244,8 +243,7 @@
   0 files updated, 0 files merged, 0 files removed, 1 files unresolved
   use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   (no more unresolved files)
-  abort: outstanding uncommitted merge
-  (use 'hg commit' or 'hg merge --abort')
+  abort: cannot manage merge changesets
   $ rm -r sandbox
 
 Test saving last-message.txt