##// END OF EJS Templates
status: make unresolved files always be in the morestatus structured output...
Rodrigo Damazio Bovendorp -
r44392:07ebb567 default
parent child Browse files
Show More
@@ -811,9 +811,11 b' class morestatus(object):'
811 811 unfinishedmsg = attr.ib()
812 812 activemerge = attr.ib()
813 813 unresolvedpaths = attr.ib()
814 _formattedpaths = attr.ib(init=False, default=set())
814 815 _label = b'status.morestatus'
815 816
816 817 def formatfile(self, path, fm):
818 self._formattedpaths.add(path)
817 819 if self.activemerge and path in self.unresolvedpaths:
818 820 fm.data(unresolved=True)
819 821
@@ -832,6 +834,7 b' class morestatus(object):'
832 834 if self.unfinishedmsg:
833 835 fm.data(unfinishedmsg=self.unfinishedmsg)
834 836
837 # May also start new data items.
835 838 self._formatconflicts(fm)
836 839
837 840 if self.unfinishedmsg:
@@ -861,6 +864,19 b' To mark files as resolved: hg resolve -'
861 864 )
862 865 % mergeliststr
863 866 )
867
868 # If any paths with unresolved conflicts were not previously
869 # formatted, output them now.
870 for f in self.unresolvedpaths:
871 if f in self._formattedpaths:
872 # Already output.
873 continue
874 fm.startitem()
875 # We can't claim to know the status of the file - it may just
876 # have been in one of the states that were not requested for
877 # display, so it could be anything.
878 fm.data(itemtype=b'file', path=f, unresolved=True)
879
864 880 else:
865 881 msg = _(b'No unresolved merge conflicts.')
866 882
@@ -591,6 +591,11 b' Test that statuses are reported properly'
591 591 "itemtype": "file",
592 592 "path": "foo",
593 593 "status": "M"
594 },
595 {
596 "itemtype": "file",
597 "path": "a",
598 "unresolved": true
594 599 }
595 600 ]
596 601
General Comments 0
You need to be logged in to leave comments. Login now