Submitter | phabricator |
---|---|
Date | Dec. 14, 2019, 5:49 a.m. |
Message ID | <differential-rev-PHID-DREV-47auhux6jzvsddibq62x-req@mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/43835/ |
State | Superseded |
Headers | show |
Comments
pulkit added inline comments. INLINE COMMENTS > cmdutil.py:876 > + # have been in one of the states that were not requested for > + # display, so it could be anything. > + fm.data(itemtype=b'file', path=f, unresolved=True) IIUC, if it's in one of the states that were not requested for display, then we should not display the file, right? REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7668/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7668 To: rdamazio, #hg-reviewers Cc: pulkit, mercurial-devel
rdamazio added inline comments. rdamazio marked an inline comment as done. INLINE COMMENTS > pulkit wrote in cmdutil.py:876 > IIUC, if it's in one of the states that were not requested for display, then we should not display the file, right? We don't display its status indeed. They did request morestatus / verbose output, so plain old `hg status` still won't output it. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7668/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7668 To: rdamazio, #hg-reviewers Cc: 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 @@ -591,6 +591,11 @@ "itemtype": "file", "path": "foo", "status": "M" + }, + { + "itemtype": "file", + "path": "a", + "unresolved": true } ] diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -809,6 +809,7 @@ if self.unfinishedmsg: fm.data(unfinishedmsg=self.unfinishedmsg) + # May also start new data items. self._formatconflicts(fm) if self.unfinishedmsg: @@ -838,6 +839,19 @@ ) % mergeliststr ) + + # If any paths with unresolved conflicts were not previously + # formatted, output them now. + for f in self.unresolvedpaths: + if f in self._formattedpaths: + # Already output. + continue + fm.startitem() + # We can't claim to know the status of the file - it may just + # have been in one of the states that were not requested for + # display, so it could be anything. + fm.data(itemtype=b'file', path=f, unresolved=True) + else: msg = _(b'No unresolved merge conflicts.')