Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 43872:aac921f54554
status: outputting structured unfinished-operation information
This adds a new item in the json/template output for morestatus and added item
types to all entries.
Differential Revision: https://phab.mercurial-scm.org/D7595
author | Rodrigo Damazio Bovendorp <rdamazio@google.com> |
---|---|
date | Mon, 09 Dec 2019 22:24:58 -0800 |
parents | 612951e08278 |
children | d587937600be |
comparison
equal
deleted
inserted
replaced
43871:5e0f6451e2d2 | 43872:aac921f54554 |
---|---|
791 def formatfile(self, path, fm): | 791 def formatfile(self, path, fm): |
792 if self.inmergestate and path in self.unresolvedpaths: | 792 if self.inmergestate and path in self.unresolvedpaths: |
793 fm.data(unresolved=True) | 793 fm.data(unresolved=True) |
794 | 794 |
795 def formatfooter(self, fm): | 795 def formatfooter(self, fm): |
796 fm.startitem() | |
797 fm.data( | |
798 itemtype=b'morestatus', | |
799 unfinished=self.unfinishedop, | |
800 unfinishedmsg=self.unfinishedmsg, | |
801 ) | |
802 | |
796 statemsg = ( | 803 statemsg = ( |
797 _(b'The repository is in an unfinished *%s* state.') | 804 _(b'The repository is in an unfinished *%s* state.') |
798 % self.unfinishedop | 805 % self.unfinishedop |
799 ) | 806 ) |
800 fm.plain(b'%s\n' % _commentlines(statemsg), label=self._label) | 807 fm.plain(b'%s\n' % _commentlines(statemsg), label=self._label) |