##// END OF EJS Templates
status: outputting structured unfinished-operation information...
Rodrigo Damazio Bovendorp -
r44313:aac921f5 default
parent child Browse files
Show More
@@ -793,6 +793,13 b' class morestatus(object):'
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
@@ -6884,7 +6884,7 b' def status(ui, repo, *pats, **opts):'
6884 for f in files:
6884 for f in files:
6885 fm.startitem()
6885 fm.startitem()
6886 fm.context(ctx=ctx2)
6886 fm.context(ctx=ctx2)
6887 fm.data(path=f)
6887 fm.data(itemtype=b'file', path=f)
6888 fm.condwrite(showchar, b'status', b'%s ', char, label=label)
6888 fm.condwrite(showchar, b'status', b'%s ', char, label=label)
6889 fm.plain(fmt % uipathfn(f), label=label)
6889 fm.plain(fmt % uipathfn(f), label=label)
6890 if f in copy:
6890 if f in copy:
@@ -63,13 +63,20 b''
63 $ hg status -Tjson
63 $ hg status -Tjson
64 [
64 [
65 {
65 {
66 "itemtype": "file",
66 "path": "a",
67 "path": "a",
67 "status": "M",
68 "status": "M",
68 "unresolved": true
69 "unresolved": true
69 },
70 },
70 {
71 {
72 "itemtype": "file",
71 "path": "a.orig",
73 "path": "a.orig",
72 "status": "?"
74 "status": "?"
75 },
76 {
77 "itemtype": "morestatus",
78 "unfinished": "merge",
79 "unfinishedmsg": "To continue: hg commit\nTo abort: hg merge --abort"
73 }
80 }
74 ]
81 ]
75
82
@@ -254,35 +254,43 b' hg status -A:'
254 $ hg status -A -Tjson
254 $ hg status -A -Tjson
255 [
255 [
256 {
256 {
257 "itemtype": "file",
257 "path": "added",
258 "path": "added",
258 "status": "A"
259 "status": "A"
259 },
260 },
260 {
261 {
262 "itemtype": "file",
261 "path": "copied",
263 "path": "copied",
262 "source": "modified",
264 "source": "modified",
263 "status": "A"
265 "status": "A"
264 },
266 },
265 {
267 {
268 "itemtype": "file",
266 "path": "removed",
269 "path": "removed",
267 "status": "R"
270 "status": "R"
268 },
271 },
269 {
272 {
273 "itemtype": "file",
270 "path": "deleted",
274 "path": "deleted",
271 "status": "!"
275 "status": "!"
272 },
276 },
273 {
277 {
278 "itemtype": "file",
274 "path": "unknown",
279 "path": "unknown",
275 "status": "?"
280 "status": "?"
276 },
281 },
277 {
282 {
283 "itemtype": "file",
278 "path": "ignored",
284 "path": "ignored",
279 "status": "I"
285 "status": "I"
280 },
286 },
281 {
287 {
288 "itemtype": "file",
282 "path": ".hgignore",
289 "path": ".hgignore",
283 "status": "C"
290 "status": "C"
284 },
291 },
285 {
292 {
293 "itemtype": "file",
286 "path": "modified",
294 "path": "modified",
287 "status": "C"
295 "status": "C"
288 }
296 }
@@ -558,6 +566,7 b' warning message about such pattern.'
558 $ hg status --config ui.formatdebug=True --rev 1 1
566 $ hg status --config ui.formatdebug=True --rev 1 1
559 status = [
567 status = [
560 {
568 {
569 'itemtype': 'file',
561 'path': '1/2/3/4/5/b.txt',
570 'path': '1/2/3/4/5/b.txt',
562 'status': 'R'
571 'status': 'R'
563 },
572 },
General Comments 0
You need to be logged in to leave comments. Login now