##// END OF EJS Templates
journal: unify template name for "nodes" (BC)...
Yuya Nishihara -
r39737:dea771e6 default
parent child Browse files
Show More
@@ -497,8 +497,8 b' def journal(ui, repo, *args, **opts):'
497 name='node', sep=',')
497 name='node', sep=',')
498
498
499 fm.startitem()
499 fm.startitem()
500 fm.condwrite(ui.verbose, 'oldhashes', '%s -> ', oldhashesstr)
500 fm.condwrite(ui.verbose, 'oldnodes', '%s -> ', oldhashesstr)
501 fm.write('newhashes', '%s', newhashesstr)
501 fm.write('newnodes', '%s', newhashesstr)
502 fm.condwrite(ui.verbose, 'user', ' %-8s', entry.user)
502 fm.condwrite(ui.verbose, 'user', ' %-8s', entry.user)
503 fm.condwrite(
503 fm.condwrite(
504 opts.get('all') or name.startswith('re:'),
504 opts.get('all') or name.startswith('re:'),
@@ -149,44 +149,44 b' Test that verbose, JSON, template and co'
149 "command": "up",
149 "command": "up",
150 "date": [5, 0],
150 "date": [5, 0],
151 "name": ".",
151 "name": ".",
152 "newhashes": ["1e6c11564562b4ed919baca798bc4338bd299d6a"],
152 "newnodes": ["1e6c11564562b4ed919baca798bc4338bd299d6a"],
153 "oldhashes": ["cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b"],
153 "oldnodes": ["cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b"],
154 "user": "foobar"
154 "user": "foobar"
155 },
155 },
156 {
156 {
157 "command": "up 0",
157 "command": "up 0",
158 "date": [2, 0],
158 "date": [2, 0],
159 "name": ".",
159 "name": ".",
160 "newhashes": ["cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b"],
160 "newnodes": ["cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b"],
161 "oldhashes": ["1e6c11564562b4ed919baca798bc4338bd299d6a"],
161 "oldnodes": ["1e6c11564562b4ed919baca798bc4338bd299d6a"],
162 "user": "foobar"
162 "user": "foobar"
163 },
163 },
164 {
164 {
165 "command": "commit -Aqm b",
165 "command": "commit -Aqm b",
166 "date": [1, 0],
166 "date": [1, 0],
167 "name": ".",
167 "name": ".",
168 "newhashes": ["1e6c11564562b4ed919baca798bc4338bd299d6a"],
168 "newnodes": ["1e6c11564562b4ed919baca798bc4338bd299d6a"],
169 "oldhashes": ["cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b"],
169 "oldnodes": ["cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b"],
170 "user": "foobar"
170 "user": "foobar"
171 },
171 },
172 {
172 {
173 "command": "commit -Aqm a",
173 "command": "commit -Aqm a",
174 "date": [0, 0],
174 "date": [0, 0],
175 "name": ".",
175 "name": ".",
176 "newhashes": ["cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b"],
176 "newnodes": ["cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b"],
177 "oldhashes": ["0000000000000000000000000000000000000000"],
177 "oldnodes": ["0000000000000000000000000000000000000000"],
178 "user": "foobar"
178 "user": "foobar"
179 }
179 }
180 ]
180 ]
181
181
182 $ cat <<EOF >> $HGRCPATH
182 $ cat <<EOF >> $HGRCPATH
183 > [templates]
183 > [templates]
184 > j = "{oldhashes % '{node|upper}'} -> {newhashes % '{node|upper}'}
184 > j = "{oldnodes % '{node|upper}'} -> {newnodes % '{node|upper}'}
185 > - user: {user}
185 > - user: {user}
186 > - command: {command}
186 > - command: {command}
187 > - date: {date|rfc3339date}
187 > - date: {date|rfc3339date}
188 > - newhashes: {newhashes}
188 > - newnodes: {newnodes}
189 > - oldhashes: {oldhashes}
189 > - oldnodes: {oldnodes}
190 > "
190 > "
191 > EOF
191 > EOF
192 $ hg journal -Tj -l1
192 $ hg journal -Tj -l1
@@ -195,8 +195,8 b' Test that verbose, JSON, template and co'
195 - user: foobar
195 - user: foobar
196 - command: up
196 - command: up
197 - date: 1970-01-01T00:00:05+00:00
197 - date: 1970-01-01T00:00:05+00:00
198 - newhashes: 1e6c11564562b4ed919baca798bc4338bd299d6a
198 - newnodes: 1e6c11564562b4ed919baca798bc4338bd299d6a
199 - oldhashes: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
199 - oldnodes: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
200
200
201 $ hg journal --commit
201 $ hg journal --commit
202 previous locations of '.':
202 previous locations of '.':
General Comments 0
You need to be logged in to leave comments. Login now