##// END OF EJS Templates
identify: change {parents} to a list of nodes (BC)...
Yuya Nishihara -
r39662:6ecfd12f default
parent child Browse files
Show More
@@ -3058,13 +3058,8 b' def identify(ui, repo, source=None, rev='
3058 numoutput = ["%d" % p.rev() for p in parents]
3058 numoutput = ["%d" % p.rev() for p in parents]
3059 output.append("%s%s" % ('+'.join(numoutput), dirty))
3059 output.append("%s%s" % ('+'.join(numoutput), dirty))
3060
3060
3061 fn = fm.nested('parents', tmpl='{rev}:{node|formatnode}', sep=' ')
3061 fm.data(parents=fm.formatlist([fm.hexfunc(p.node())
3062 for p in parents:
3062 for p in parents], name='node'))
3063 fn.startitem()
3064 fn.data(rev=p.rev())
3065 fn.data(node=p.hex())
3066 fn.context(ctx=p)
3067 fn.end()
3068 else:
3063 else:
3069 hexoutput = fm.hexfunc(ctx.node())
3064 hexoutput = fm.hexfunc(ctx.node())
3070 if default or id:
3065 if default or id:
@@ -51,7 +51,7 b' with options'
51 "dirty": "",
51 "dirty": "",
52 "id": "cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b",
52 "id": "cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b",
53 "node": "ffffffffffffffffffffffffffffffffffffffff",
53 "node": "ffffffffffffffffffffffffffffffffffffffff",
54 "parents": [{"node": "cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b", "rev": 0}],
54 "parents": ["cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b"],
55 "tags": ["tip"]
55 "tags": ["tip"]
56 }
56 }
57 ]
57 ]
@@ -63,7 +63,7 b' test template keywords and functions whi'
63 $ hg id -T '{parents % "{rev} {node|shortest} {desc}\n"}'
63 $ hg id -T '{parents % "{rev} {node|shortest} {desc}\n"}'
64 0 cb9a a
64 0 cb9a a
65 $ hg id -T '{parents}\n'
65 $ hg id -T '{parents}\n'
66 0:cb9a9f314b8b
66 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
67
67
68 test nested template: '{tags}'/'{node}' constants shouldn't override the
68 test nested template: '{tags}'/'{node}' constants shouldn't override the
69 default keywords, but '{id}' persists because there's no default keyword
69 default keywords, but '{id}' persists because there's no default keyword
@@ -88,7 +88,7 b' with modifications'
88 "dirty": "+",
88 "dirty": "+",
89 "id": "cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b+",
89 "id": "cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b+",
90 "node": "ffffffffffffffffffffffffffffffffffffffff",
90 "node": "ffffffffffffffffffffffffffffffffffffffff",
91 "parents": [{"node": "cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b", "rev": 0}],
91 "parents": ["cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b"],
92 "tags": ["tip"]
92 "tags": ["tip"]
93 }
93 }
94 ]
94 ]
@@ -57,7 +57,7 b' Should succeed:'
57 "dirty": "+",
57 "dirty": "+",
58 "id": "f25cbe84d8b320e298e7703f18a25a3959518c23+2d95304fed5d89bc9d70b2a0d02f0d567469c3ab+",
58 "id": "f25cbe84d8b320e298e7703f18a25a3959518c23+2d95304fed5d89bc9d70b2a0d02f0d567469c3ab+",
59 "node": "ffffffffffffffffffffffffffffffffffffffff",
59 "node": "ffffffffffffffffffffffffffffffffffffffff",
60 "parents": [{"node": "f25cbe84d8b320e298e7703f18a25a3959518c23", "rev": 4}, {"node": "2d95304fed5d89bc9d70b2a0d02f0d567469c3ab", "rev": 2}],
60 "parents": ["f25cbe84d8b320e298e7703f18a25a3959518c23", "2d95304fed5d89bc9d70b2a0d02f0d567469c3ab"],
61 "tags": ["tip"]
61 "tags": ["tip"]
62 }
62 }
63 ]
63 ]
General Comments 0
You need to be logged in to leave comments. Login now