##// END OF EJS Templates
templatekw: avoid slow creation of changectx objects in showgraphnode()...
Yuya Nishihara -
r27215:5b8da564 default
parent child Browse files
Show More
@@ -7,7 +7,7 b''
7
7
8 from __future__ import absolute_import
8 from __future__ import absolute_import
9
9
10 from .node import hex
10 from .node import hex, nullid
11 from . import (
11 from . import (
12 error,
12 error,
13 hbisect,
13 hbisect,
@@ -343,7 +343,9 b' def showfiles(**args):'
343 def showgraphnode(repo, ctx, **args):
343 def showgraphnode(repo, ctx, **args):
344 """:graphnode: String. The character representing the changeset node in
344 """:graphnode: String. The character representing the changeset node in
345 an ASCII revision graph"""
345 an ASCII revision graph"""
346 wpnodes = [pctx.node() for pctx in repo[None].parents()]
346 wpnodes = repo.dirstate.parents()
347 if wpnodes[1] == nullid:
348 wpnodes = wpnodes[:1]
347 if ctx.node() in wpnodes:
349 if ctx.node() in wpnodes:
348 return '@'
350 return '@'
349 elif ctx.obsolete():
351 elif ctx.obsolete():
General Comments 0
You need to be logged in to leave comments. Login now