Submitter | phabricator |
---|---|
Date | Feb. 28, 2020, 7:58 p.m. |
Message ID | <differential-rev-PHID-DREV-qxm7fw3cichah722geza-req@mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/45409/ |
State | Superseded |
Headers | show |
Comments
pulkit added a comment. To me, having a `hg commit` which aborts, doing something seems a bit weird. For the use case of rebase, shelve etc., a function argument or internal config can be better. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8196/new/ REVISION DETAIL https://phab.mercurial-scm.org/D8196 To: martinvonz, #hg-reviewers Cc: pulkit, mercurial-devel
martinvonz added a comment. In D8196#121923 <https://phab.mercurial-scm.org/D8196#121923>, @pulkit wrote: > To me, having a `hg commit` which aborts, doing something seems a bit weird. Yes, I agree, as I said in the commit message. > For the use case of rebase, shelve etc., a function argument or internal config can be better. I considered that but I also felt that it's weird that we just leave the state there otherwise until the user creates an unrelated commit or `hg co -C`. If we care about the state, we should be clear that we do (e.g. by registering it as an unfinished state that the user has to clear before they do anything else). I'm fine with still adding the flag to make `hg commit` behave differently from internal calls. Still want me to do that or want me to register merge state as an unfinished state? REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8196/new/ REVISION DETAIL https://phab.mercurial-scm.org/D8196 To: martinvonz, #hg-reviewers Cc: pulkit, mercurial-devel
pulkit added a comment.
In D8196#121924 <https://phab.mercurial-scm.org/D8196#121924>, @martinvonz wrote:
> I'm fine with still adding the flag to make `hg commit` behave differently from internal calls. Still want me to do that or want me to register merge state as an unfinished state?
I thought we already register merge state as an unfinished state but now I see why we don't. Adding a flag sounds good to me.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8196/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8196
To: martinvonz, #hg-reviewers
Cc: pulkit, mercurial-devel
marmoute added a comment. marmoute accepted this revision. The case is a bit strange, but the proposed change seems a good way out. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8196/new/ REVISION DETAIL https://phab.mercurial-scm.org/D8196 To: martinvonz, #hg-reviewers, marmoute Cc: marmoute, pulkit, mercurial-devel
pulkit added inline comments. INLINE COMMENTS > localrepo.py:2959 > if not allowemptycommit: > + ms.reset() > return None Lets add a `ui.debug()` here about clearing of mergestate. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8196/new/ REVISION DETAIL https://phab.mercurial-scm.org/D8196 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 @@ -56,6 +56,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():