Show More
@@ -2161,16 +2161,9 b' def getlogrevs(repo, pats, opts):' | |||
|
2161 | 2161 | |
|
2162 | 2162 | def displaygraph(ui, repo, dag, displayer, edgefn, getrenamed=None, |
|
2163 | 2163 | filematcher=None): |
|
2164 | showparents = [ctx.node() for ctx in repo[None].parents()] | |
|
2165 | 2164 | seen, state = [], graphmod.asciistate() |
|
2166 | 2165 | for rev, type, ctx, parents in dag: |
|
2167 | char = 'o' | |
|
2168 | if ctx.node() in showparents: | |
|
2169 | char = '@' | |
|
2170 | elif ctx.obsolete(): | |
|
2171 | char = 'x' | |
|
2172 | elif ctx.closesbranch(): | |
|
2173 | char = '_' | |
|
2166 | char = templatekw.showgraphnode(repo, ctx) | |
|
2174 | 2167 | copies = None |
|
2175 | 2168 | if getrenamed and ctx.rev(): |
|
2176 | 2169 | copies = [] |
@@ -340,6 +340,19 b' def showfiles(**args):' | |||
|
340 | 340 | """ |
|
341 | 341 | return showlist('file', args['ctx'].files(), **args) |
|
342 | 342 | |
|
343 | def showgraphnode(repo, ctx, **args): | |
|
344 | """:graphnode: String. The character representing the changeset node in | |
|
345 | an ASCII revision graph""" | |
|
346 | wpnodes = [pctx.node() for pctx in repo[None].parents()] | |
|
347 | if ctx.node() in wpnodes: | |
|
348 | return '@' | |
|
349 | elif ctx.obsolete(): | |
|
350 | return 'x' | |
|
351 | elif ctx.closesbranch(): | |
|
352 | return '_' | |
|
353 | else: | |
|
354 | return 'o' | |
|
355 | ||
|
343 | 356 | def showlatesttag(**args): |
|
344 | 357 | """:latesttag: List of strings. The global tags on the most recent globally |
|
345 | 358 | tagged ancestor of this changeset. |
@@ -518,6 +531,7 b' keywords = {' | |||
|
518 | 531 | 'file_dels': showfiledels, |
|
519 | 532 | 'file_mods': showfilemods, |
|
520 | 533 | 'files': showfiles, |
|
534 | 'graphnode': showgraphnode, | |
|
521 | 535 | 'latesttag': showlatesttag, |
|
522 | 536 | 'latesttagdistance': showlatesttagdistance, |
|
523 | 537 | 'manifest': showmanifest, |
General Comments 0
You need to be logged in to leave comments.
Login now