D7668: status: make unresolved files always be in the morestatus structured output
rdamazio (Rodrigo Damazio Bovendorp)
phabricator at mercurial-scm.org
Sat Dec 14 00:49:55 EST 2019
rdamazio created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
We don't know the status of those files, only that they're unresolved, so
we don't output the status for those - any code parsing this will have to be
tolerant to that.
diff --git a/tests/test-update-branches.t b/tests/test-update-branches.t
@@ -591,6 +591,11 @@
+ "itemtype": "file",
+ "path": "a",
+ "unresolved": true
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
@@ -809,6 +809,7 @@
+ # May also start new data items.
@@ -838,6 +839,19 @@
+ # 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.
+ # 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)
msg = _(b'No unresolved merge conflicts.')
To: rdamazio, #hg-reviewers
More information about the Mercurial-devel