Patchwork D6548: mq: fix for merge detection methods

login
register
mail settings
Submitter phabricator
Date June 24, 2019, 9:38 a.m.
Message ID <1cc3eab09693da9b9b404104485f673e@localhost.localdomain>
Download mbox | patch
Permalink /patch/40660/
State Not Applicable
Headers show

Comments

phabricator - June 24, 2019, 9:38 a.m.
taapas1128 updated this revision to Diff 15643.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6548?vs=15600&id=15643

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6548/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6548

AFFECTED FILES
  hgext/mq.py
  tests/test-mq-qnew.t

CHANGE DETAILS




To: taapas1128, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-mq-qnew.t b/tests/test-mq-qnew.t
--- a/tests/test-mq-qnew.t
+++ b/tests/test-mq-qnew.t
@@ -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
diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -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', '.', '..')