##// END OF EJS Templates
templatekw: add a "troubles" template keyword...
Denis Laxalde -
r30712:5dde81de default
parent child Browse files
Show More
@@ -595,5 +595,13 b' def termwidth(repo, ctx, templ, **args):'
595 595 """Integer. The width of the current terminal."""
596 596 return repo.ui.termwidth()
597 597
598 @templatekeyword('troubles')
599 def showtroubles(**args):
600 """List of strings. Evolution troubles affecting the changeset.
601
602 (EXPERIMENTAL)
603 """
604 return showlist('trouble', args['ctx'].troubles(), **args)
605
598 606 # tell hggettext to extract docstrings from these functions:
599 607 i18nfunctions = keywords.values()
@@ -3,7 +3,7 b''
3 3 > # public changeset are not obsolete
4 4 > publish=false
5 5 > [ui]
6 > logtemplate="{rev}:{node|short} ({phase}) [{tags} {bookmarks}] {desc|firstline}\n"
6 > logtemplate="{rev}:{node|short} ({phase}{if(troubles, ' {troubles}')}) [{tags} {bookmarks}] {desc|firstline}\n"
7 7 > EOF
8 8 $ mkcommit() {
9 9 > echo "$1" > "$1"
@@ -203,7 +203,7 b' Check that public changeset are not acco'
203 203
204 204 $ hg --hidden phase --public 2
205 205 $ hg log -G
206 @ 5:5601fb93a350 (draft) [tip ] add new_3_c
206 @ 5:5601fb93a350 (draft bumped) [tip ] add new_3_c
207 207 |
208 208 | o 2:245bde4270cd (public) [ ] add original_c
209 209 |/
@@ -220,7 +220,7 b' note that the bumped changeset (5:5601fb'
220 220 the public changeset
221 221
222 222 $ hg log --hidden -r 'bumped()'
223 5:5601fb93a350 (draft) [tip ] add new_3_c
223 5:5601fb93a350 (draft bumped) [tip ] add new_3_c
224 224
225 225 And that we can't push bumped changeset
226 226
@@ -485,7 +485,7 b' detect outgoing obsolete and unstable'
485 485 phases: 3 draft
486 486 unstable: 1 changesets
487 487 $ hg log -G -r '::unstable()'
488 @ 5:cda648ca50f5 (draft) [tip ] add original_e
488 @ 5:cda648ca50f5 (draft unstable) [tip ] add original_e
489 489 |
490 490 x 4:94b33453f93b (draft) [ ] add original_d
491 491 |
@@ -527,7 +527,7 b" Don't try to push extinct changeset"
527 527 2:245bde4270cd (public) [ ] add original_c
528 528 3:6f9641995072 (draft) [ ] add n3w_3_c
529 529 4:94b33453f93b (draft) [ ] add original_d
530 5:cda648ca50f5 (draft) [tip ] add original_e
530 5:cda648ca50f5 (draft unstable) [tip ] add original_e
531 531 $ hg push ../tmpf -f # -f because be push unstable too
532 532 pushing to ../tmpf
533 533 searching for changes
@@ -548,7 +548,7 b' no warning displayed'
548 548 Do not warn about new head when the new head is a successors of a remote one
549 549
550 550 $ hg log -G
551 @ 5:cda648ca50f5 (draft) [tip ] add original_e
551 @ 5:cda648ca50f5 (draft unstable) [tip ] add original_e
552 552 |
553 553 x 4:94b33453f93b (draft) [ ] add original_d
554 554 |
@@ -810,6 +810,11 b' Several troubles on the same changeset ('
810 810 summary: add babar
811 811
812 812
813 test the "troubles" templatekw
814
815 $ hg log -r 'bumped() and unstable()'
816 7:50c51b361e60 (draft unstable bumped) [ ] add babar
817
813 818 Test incoming/outcoming with changesets obsoleted remotely, known locally
814 819 ===============================================================================
815 820
General Comments 0
You need to be logged in to leave comments. Login now