comparison tests/test-identify.t @ 39625:10c5eacd793f

identify: use fm.hexfunc thoroughly This fixes the length of {id} in JSON and template outputs.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 01 Sep 2018 12:09:22 +0900
parents 8bb3899a0f47
children 6ecfd12f09cd
comparison
equal deleted inserted replaced
39624:713085b45810 39625:10c5eacd793f
47 [ 47 [
48 { 48 {
49 "bookmarks": [], 49 "bookmarks": [],
50 "branch": "default", 50 "branch": "default",
51 "dirty": "", 51 "dirty": "",
52 "id": "cb9a9f314b8b", 52 "id": "cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b",
53 "node": "ffffffffffffffffffffffffffffffffffffffff", 53 "node": "ffffffffffffffffffffffffffffffffffffffff",
54 "parents": [{"node": "cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b", "rev": 0}], 54 "parents": [{"node": "cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b", "rev": 0}],
55 "tags": ["tip"] 55 "tags": ["tip"]
56 } 56 }
57 ] 57 ]
69 default keywords, but '{id}' persists because there's no default keyword 69 default keywords, but '{id}' persists because there's no default keyword
70 for '{id}' (issue5612) 70 for '{id}' (issue5612)
71 71
72 $ hg id -T '{tags}\n' 72 $ hg id -T '{tags}\n'
73 tip 73 tip
74 $ hg id -T '{revset("null:.") % "{rev}:{node|short} {tags} {id}\n"}' 74 $ hg id -T '{revset("null:.") % "{rev}:{node|short} {tags} {id|short}\n"}'
75 -1:000000000000 cb9a9f314b8b 75 -1:000000000000 cb9a9f314b8b
76 0:cb9a9f314b8b tip cb9a9f314b8b 76 0:cb9a9f314b8b tip cb9a9f314b8b
77 77
78 with modifications 78 with modifications
79 79
84 [ 84 [
85 { 85 {
86 "bookmarks": [], 86 "bookmarks": [],
87 "branch": "default", 87 "branch": "default",
88 "dirty": "+", 88 "dirty": "+",
89 "id": "cb9a9f314b8b+", 89 "id": "cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b+",
90 "node": "ffffffffffffffffffffffffffffffffffffffff", 90 "node": "ffffffffffffffffffffffffffffffffffffffff",
91 "parents": [{"node": "cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b", "rev": 0}], 91 "parents": [{"node": "cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b", "rev": 0}],
92 "tags": ["tip"] 92 "tags": ["tip"]
93 } 93 }
94 ] 94 ]