Patchwork D8196: commit: clear resolved mergestate even if working copy is clean

login
register
mail settings
Submitter phabricator
Date March 4, 2020, 10:09 p.m.
Message ID <c804f1f0e5125d238f0acfc23d72bbe8@localhost.localdomain>
Download mbox | patch
Permalink /patch/45486/
State Not Applicable
Headers show

Comments

phabricator - March 4, 2020, 10:09 p.m.
Closed by commit rHG6a34e438461b: commit: clear resolved mergestate even if working copy is clean (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8196?vs=20402&id=20489

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

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

AFFECTED FILES
  mercurial/localrepo.py
  relnotes/next
  tests/test-update-branches.t

CHANGE DETAILS




To: martinvonz, #hg-reviewers, marmoute
Cc: marmoute, pulkit, mercurial-devel

Patch

diff --git a/tests/test-update-branches.t b/tests/test-update-branches.t
--- a/tests/test-update-branches.t
+++ b/tests/test-update-branches.t
@@ -357,7 +357,6 @@ 
   nothing changed
   [1]
   $ hg resolve -l
-  R a
 
 Change/delete conflict is not allowed
   $ hg up -qC 3
diff --git a/relnotes/next b/relnotes/next
--- a/relnotes/next
+++ b/relnotes/next
@@ -61,6 +61,9 @@ 
  * `hg debugmergestate` output format changed. Let us know if that is
    causing you problems and we'll roll it back.
 
+ * Resolved merge conflicts are now cleared by `hg commit` even if the
+   working copy has no changes.
+
 
 == Internal API Changes ==
 
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -2956,6 +2956,7 @@ 
                 or self.ui.configbool(b'ui', b'allowemptycommit')
             )
             if not allowemptycommit:
+                ms.reset()
                 return None
 
             if merge and cctx.deleted():