##// END OF EJS Templates
templates: adjust white space amount in the output of {whyunstable}...
av6 -
r37725:24fee31f default
parent child Browse files
Show More
@@ -802,7 +802,7 b' def showwhyunstable(context, mapping):'
802 ctx = context.resource(mapping, 'ctx')
802 ctx = context.resource(mapping, 'ctx')
803
803
804 def formatnode(ctx):
804 def formatnode(ctx):
805 return ' %s (%s)' % (scmutil.formatchangeid(ctx), ctx.phasestr())
805 return '%s (%s)' % (scmutil.formatchangeid(ctx), ctx.phasestr())
806
806
807 entries = obsutil.whyunstable(repo, ctx)
807 entries = obsutil.whyunstable(repo, ctx)
808
808
@@ -814,7 +814,8 b' def showwhyunstable(context, mapping):'
814 lambda x: formatnode(repo[x]))
814 lambda x: formatnode(repo[x]))
815 entry['divergentnodes'] = dnhybrid
815 entry['divergentnodes'] = dnhybrid
816
816
817 tmpl = '{instability}:{divergentnodes} {reason} {node|short}'
817 tmpl = ('{instability}:{if(divergentnodes, " ")}{divergentnodes} '
818 '{reason} {node|short}')
818 return templateutil.mappinglist(entries, tmpl=tmpl, sep='\n')
819 return templateutil.mappinglist(entries, tmpl=tmpl, sep='\n')
819
820
820 def loadkeyword(ui, extname, registrarobj):
821 def loadkeyword(ui, extname, registrarobj):
@@ -17,7 +17,7 b' Enable obsolete'
17 > [phases]
17 > [phases]
18 > publish=False
18 > publish=False
19 > [templates]
19 > [templates]
20 > wuentryshort = '{instability}:{divergentnodes} {reason} {node|shortest}\n'
20 > wuentryshort = '{instability}:{if(divergentnodes, " ")}{divergentnodes} {reason} {node|shortest}\n'
21 > whyunstableshort = '{whyunstable % wuentryshort}'
21 > whyunstableshort = '{whyunstable % wuentryshort}'
22 > wuentryshorter = '{instability}:{divergentnodes % " {node|shortest} ({phase})"} {reason} {node|shortest}\n'
22 > wuentryshorter = '{instability}:{divergentnodes % " {node|shortest} ({phase})"} {reason} {node|shortest}\n'
23 > whyunstableshorter = '{whyunstable % wuentryshorter}'
23 > whyunstableshorter = '{whyunstable % wuentryshorter}'
@@ -531,6 +531,16 b' Check more complex obsolescence graft (w'
531 9:14608b260df8 A_8
531 9:14608b260df8 A_8
532 10:bed64f5d2f5a A_9
532 10:bed64f5d2f5a A_9
533
533
534 $ hg log -r bed64f5d2f5a -T '{whyunstable}\n' | sort
535 content-divergent: 4:01f36c5a8fda (draft) 8:7ae126973a96 (draft) 9:14608b260df8 (draft) predecessor 007dc284c1f8
536 content-divergent: 8:7ae126973a96 (draft) 9:14608b260df8 (draft) predecessor e442cfc57690
537 $ hg log -r bed64f5d2f5a -T whyunstableshort | sort
538 content-divergent: 4:01f36c5a8fda (draft) 8:7ae126973a96 (draft) 9:14608b260df8 (draft) predecessor 007d
539 content-divergent: 8:7ae126973a96 (draft) 9:14608b260df8 (draft) predecessor e442
540 $ hg log -r bed64f5d2f5a -T whyunstableshorter | sort
541 content-divergent: 01f3 (draft) 7ae1 (draft) 1460 (draft) predecessor 007d
542 content-divergent: 7ae1 (draft) 1460 (draft) predecessor e442
543
534 fix the divergence
544 fix the divergence
535
545
536 $ mkcommit A_A; hg up 0
546 $ mkcommit A_A; hg up 0
General Comments 0
You need to be logged in to leave comments. Login now