##// END OF EJS Templates
log: fill in pseudo rev and node as wdir() manifest identifiers...
Yuya Nishihara -
r39832:94ca3579 default
parent child Browse files
Show More
@@ -13,6 +13,8 b' import os'
13 13 from .i18n import _
14 14 from .node import (
15 15 nullid,
16 wdirid,
17 wdirrev,
16 18 )
17 19
18 20 from . import (
@@ -191,7 +193,6 b' class changesetprinter(object):'
191 193 def _show(self, ctx, copies, props):
192 194 '''show a single changeset or file revision'''
193 195 changenode = ctx.node()
194 rev = ctx.rev()
195 196
196 197 if self.ui.quiet:
197 198 self.ui.write("%s\n" % scmutil.formatchangeid(ctx),
@@ -226,8 +227,12 b' class changesetprinter(object):'
226 227 self.ui.write(columns['parent'] % scmutil.formatchangeid(pctx),
227 228 label=label)
228 229
229 if self.ui.debugflag and rev is not None:
230 if self.ui.debugflag:
230 231 mnode = ctx.manifestnode()
232 if mnode is None:
233 mnode = wdirid
234 mrev = wdirrev
235 else:
231 236 mrev = self.repo.manifestlog.rev(mnode)
232 237 self.ui.write(columns['manifest']
233 238 % scmutil.formatrevnode(self.ui, mrev, mnode),
@@ -343,11 +348,7 b' class changesetformatter(changesetprinte'
343 348 for c in ctx.parents()], name='node'))
344 349
345 350 if self.ui.debugflag:
346 if ctx.rev() is None:
347 hexnode = None
348 else:
349 hexnode = fm.hexfunc(ctx.manifestnode())
350 fm.data(manifest=hexnode,
351 fm.data(manifest=fm.hexfunc(ctx.manifestnode() or wdirid),
351 352 extra=fm.formatdict(ctx.extra()))
352 353
353 354 files = ctx.p1().status(ctx)
@@ -11,6 +11,8 b' from .i18n import _'
11 11 from .node import (
12 12 hex,
13 13 nullid,
14 wdirid,
15 wdirrev,
14 16 )
15 17
16 18 from . import (
@@ -475,8 +477,9 b' def showmanifest(context, mapping):'
475 477 ctx = context.resource(mapping, 'ctx')
476 478 mnode = ctx.manifestnode()
477 479 if mnode is None:
478 # just avoid crash, we might want to use the 'ff...' hash in future
479 return
480 mnode = wdirid
481 mrev = wdirrev
482 else:
480 483 mrev = repo.manifestlog.rev(mnode)
481 484 mhex = hex(mnode)
482 485 mapping = context.overlaymap(mapping, {'rev': mrev, 'node': mhex})
@@ -2126,6 +2126,7 b' clean:'
2126 2126 phase: draft
2127 2127 parent: 0:65624cd9070a035fa7191a54f2b8af39f16b0c08
2128 2128 parent: -1:0000000000000000000000000000000000000000
2129 manifest: 2147483647:ffffffffffffffffffffffffffffffffffffffff
2129 2130 user: test
2130 2131 date: [A-Za-z0-9:+ ]+ (re)
2131 2132 extra: branch=default
@@ -2164,6 +2165,7 b' dirty:'
2164 2165 phase: draft
2165 2166 parent: 0:65624cd9070a035fa7191a54f2b8af39f16b0c08
2166 2167 parent: -1:0000000000000000000000000000000000000000
2168 manifest: 2147483647:ffffffffffffffffffffffffffffffffffffffff
2167 2169 user: test
2168 2170 date: [A-Za-z0-9:+ ]+ (re)
2169 2171 files: d1/f1
@@ -2234,7 +2236,7 b' dirty:'
2234 2236 "date": [*, 0], (glob)
2235 2237 "desc": "",
2236 2238 "extra": {"branch": "default"},
2237 "manifest": null,
2239 "manifest": "ffffffffffffffffffffffffffffffffffffffff",
2238 2240 "modified": ["d1/f1"],
2239 2241 "node": "ffffffffffffffffffffffffffffffffffffffff",
2240 2242 "parents": ["65624cd9070a035fa7191a54f2b8af39f16b0c08"],
@@ -61,7 +61,7 b' experimental:'
61 61 "date": [0, 0],
62 62 "desc": "",
63 63 "extra": {"branch": "default"},
64 "manifest": null,
64 "manifest": "ffffffffffffffffffffffffffffffffffffffff",
65 65 "modified": [],
66 66 "node": "ffffffffffffffffffffffffffffffffffffffff",
67 67 "parents": ["95c24699272ef57d062b8bccc32c878bf841784a"],
@@ -73,11 +73,8 b' experimental:'
73 73 }
74 74 ]
75 75
76 Some keywords are invalid for working-directory revision, but they should
77 never cause crash:
78
79 76 $ hg log -r 'wdir()' -T '{manifest}\n'
80
77 2147483647:ffffffffffff
81 78
82 79 Changectx-derived keywords are disabled within {manifest} as {node} changes:
83 80
General Comments 0
You need to be logged in to leave comments. Login now