Comments
Patch
@@ -591,6 +591,11 @@
"itemtype": "file",
"path": "foo",
"status": "M"
+ },
+ {
+ "itemtype": "file",
+ "path": "a",
+ "unresolved": true
}
]
@@ -810,9 +810,11 @@
unfinishedmsg = attr.ib()
activemerge = attr.ib()
unresolvedpaths = attr.ib()
+ _formattedpaths = attr.ib(init=False, default=set())
_label = b'status.morestatus'
def formatfile(self, path, fm):
+ self._formattedpaths.add(path)
if self.activemerge and path in self.unresolvedpaths:
fm.data(unresolved=True)
@@ -831,6 +833,7 @@
if self.unfinishedmsg:
fm.data(unfinishedmsg=self.unfinishedmsg)
+ # May also start new data items.
self._formatconflicts(fm)
if self.unfinishedmsg:
@@ -860,6 +863,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.')