##// END OF EJS Templates
log: add obsfate by default in changeset printer...
Boris Feld -
r34853:d45236f3 default
parent child Browse files
Show More
@@ -1665,6 +1665,9 b' class changeset_printer(object):'
1665 self.ui.write(_("instability: %s\n") % ', '.join(instabilities),
1665 self.ui.write(_("instability: %s\n") % ', '.join(instabilities),
1666 label='log.instability')
1666 label='log.instability')
1667
1667
1668 elif ctx.obsolete():
1669 self._showobsfate(ctx)
1670
1668 self._exthook(ctx)
1671 self._exthook(ctx)
1669
1672
1670 if self.ui.debugflag:
1673 if self.ui.debugflag:
@@ -1713,6 +1716,15 b' class changeset_printer(object):'
1713
1716
1714 self.showpatch(ctx, matchfn)
1717 self.showpatch(ctx, matchfn)
1715
1718
1719 def _showobsfate(self, ctx):
1720 obsfate = templatekw.showobsfate(repo=self.repo, ctx=ctx, ui=self.ui)
1721
1722 if obsfate:
1723 for obsfateline in obsfate:
1724 # i18n: column positioning for "hg log"
1725 self.ui.write(_("obsfate: %s\n") % obsfateline,
1726 label='log.obsfate')
1727
1716 def _exthook(self, ctx):
1728 def _exthook(self, ctx):
1717 '''empty method used by extension as a hook point
1729 '''empty method used by extension as a hook point
1718 '''
1730 '''
@@ -535,6 +535,7 b' changelog and manifest would have invali'
535 tag: tip
535 tag: tip
536 user: test
536 user: test
537 date: Thu Jan 01 00:00:00 1970 +0000
537 date: Thu Jan 01 00:00:00 1970 +0000
538 obsfate: pruned
538 summary: .
539 summary: .
539
540
540 changeset: 0:eff892de26ec
541 changeset: 0:eff892de26ec
@@ -58,11 +58,13 b' Test setup'
58 |/ parent: 0:ea207398892e
58 |/ parent: 0:ea207398892e
59 | user: test
59 | user: test
60 | date: Thu Jan 01 00:00:00 1970 +0000
60 | date: Thu Jan 01 00:00:00 1970 +0000
61 | obsfate: rewritten using amend as 3:d004c8f274b9 by test2
61 | summary: A1
62 | summary: A1
62 |
63 |
63 | x changeset: 1:471f378eab4c
64 | x changeset: 1:471f378eab4c
64 |/ user: test
65 |/ user: test
65 | date: Thu Jan 01 00:00:00 1970 +0000
66 | date: Thu Jan 01 00:00:00 1970 +0000
67 | obsfate: rewritten using amend as 2:a468dc9b3633
66 | summary: A0
68 | summary: A0
67 |
69 |
68 o changeset: 0:ea207398892e
70 o changeset: 0:ea207398892e
@@ -103,6 +105,26 b' Predecessors template should show curren'
103 |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test, test2
105 |/ Obsfate: rewritten using amend as 3:d004c8f274b9 by test, test2
104 o ea207398892e
106 o ea207398892e
105
107
108
109 $ hg log -G --config ui.logtemplate=
110 o changeset: 3:d004c8f274b9
111 | tag: tip
112 | parent: 0:ea207398892e
113 | user: test
114 | date: Thu Jan 01 00:00:00 1970 +0000
115 | summary: A2
116 |
117 | @ changeset: 1:471f378eab4c
118 |/ user: test
119 | date: Thu Jan 01 00:00:00 1970 +0000
120 | obsfate: rewritten using amend as 3:d004c8f274b9 by test2
121 | summary: A0
122 |
123 o changeset: 0:ea207398892e
124 user: test
125 date: Thu Jan 01 00:00:00 1970 +0000
126 summary: ROOT
127
106 $ hg up 'desc(A1)' --hidden
128 $ hg up 'desc(A1)' --hidden
107 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
129 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
108
130
@@ -294,6 +316,7 b' Test templates with splitted commit'
294 | x changeset: 1:471597cad322
316 | x changeset: 1:471597cad322
295 |/ user: test
317 |/ user: test
296 | date: Thu Jan 01 00:00:00 1970 +0000
318 | date: Thu Jan 01 00:00:00 1970 +0000
319 | obsfate: split as 2:337fec4d2edc, 3:f257fde29c7a
297 | summary: A0
320 | summary: A0
298 |
321 |
299 o changeset: 0:ea207398892e
322 o changeset: 0:ea207398892e
@@ -469,11 +492,13 b' Simulate a fold'
469 | x changeset: 2:0dec01379d3b
492 | x changeset: 2:0dec01379d3b
470 | | user: test
493 | | user: test
471 | | date: Thu Jan 01 00:00:00 1970 +0000
494 | | date: Thu Jan 01 00:00:00 1970 +0000
495 | | obsfate: rewritten as 3:eb5a0daa2192
472 | | summary: B0
496 | | summary: B0
473 | |
497 | |
474 | x changeset: 1:471f378eab4c
498 | x changeset: 1:471f378eab4c
475 |/ user: test
499 |/ user: test
476 | date: Thu Jan 01 00:00:00 1970 +0000
500 | date: Thu Jan 01 00:00:00 1970 +0000
501 | obsfate: rewritten as 3:eb5a0daa2192
477 | summary: A0
502 | summary: A0
478 |
503 |
479 o changeset: 0:ea207398892e
504 o changeset: 0:ea207398892e
@@ -640,6 +665,7 b' Test setup'
640 | x changeset: 1:471f378eab4c
665 | x changeset: 1:471f378eab4c
641 |/ user: test
666 |/ user: test
642 | date: Thu Jan 01 00:00:00 1970 +0000
667 | date: Thu Jan 01 00:00:00 1970 +0000
668 | obsfate: rewritten using amend as 2:fdf9bde5129a
643 | summary: A0
669 | summary: A0
644 |
670 |
645 o changeset: 0:ea207398892e
671 o changeset: 0:ea207398892e
@@ -669,6 +695,8 b' Test setup'
669 | x changeset: 1:471f378eab4c
695 | x changeset: 1:471f378eab4c
670 |/ user: test
696 |/ user: test
671 | date: Thu Jan 01 00:00:00 1970 +0000
697 | date: Thu Jan 01 00:00:00 1970 +0000
698 | obsfate: rewritten using amend as 2:fdf9bde5129a
699 | obsfate: rewritten using amend as 3:65b757b745b9
672 | summary: A0
700 | summary: A0
673 |
701 |
674 o changeset: 0:ea207398892e
702 o changeset: 0:ea207398892e
@@ -690,6 +718,7 b' Test setup'
690 |/ parent: 0:ea207398892e
718 |/ parent: 0:ea207398892e
691 | user: test
719 | user: test
692 | date: Thu Jan 01 00:00:00 1970 +0000
720 | date: Thu Jan 01 00:00:00 1970 +0000
721 | obsfate: rewritten using amend as 4:019fadeab383
693 | summary: A2
722 | summary: A2
694 |
723 |
695 | o changeset: 2:fdf9bde5129a
724 | o changeset: 2:fdf9bde5129a
@@ -702,6 +731,8 b' Test setup'
702 | x changeset: 1:471f378eab4c
731 | x changeset: 1:471f378eab4c
703 |/ user: test
732 |/ user: test
704 | date: Thu Jan 01 00:00:00 1970 +0000
733 | date: Thu Jan 01 00:00:00 1970 +0000
734 | obsfate: rewritten using amend as 2:fdf9bde5129a
735 | obsfate: rewritten using amend as 3:65b757b745b9
705 | summary: A0
736 | summary: A0
706 |
737 |
707 o changeset: 0:ea207398892e
738 o changeset: 0:ea207398892e
@@ -880,6 +911,7 b' Test setup'
880 | x changeset: 2:0dec01379d3b
911 | x changeset: 2:0dec01379d3b
881 |/ user: test
912 |/ user: test
882 | date: Thu Jan 01 00:00:00 1970 +0000
913 | date: Thu Jan 01 00:00:00 1970 +0000
914 | obsfate: rewritten using amend as 3:b7ea6d14e664
883 | summary: B0
915 | summary: B0
884 |
916 |
885 o changeset: 1:471f378eab4c
917 o changeset: 1:471f378eab4c
@@ -918,16 +950,19 b' Test setup'
918 | | parent: 1:471f378eab4c
950 | | parent: 1:471f378eab4c
919 | | user: test
951 | | user: test
920 | | date: Thu Jan 01 00:00:00 1970 +0000
952 | | date: Thu Jan 01 00:00:00 1970 +0000
953 | | obsfate: rewritten as 4:eb5a0daa2192
921 | | summary: B1
954 | | summary: B1
922 | |
955 | |
923 | | x changeset: 2:0dec01379d3b
956 | | x changeset: 2:0dec01379d3b
924 | |/ user: test
957 | |/ user: test
925 | | date: Thu Jan 01 00:00:00 1970 +0000
958 | | date: Thu Jan 01 00:00:00 1970 +0000
959 | | obsfate: rewritten using amend as 3:b7ea6d14e664
926 | | summary: B0
960 | | summary: B0
927 | |
961 | |
928 | x changeset: 1:471f378eab4c
962 | x changeset: 1:471f378eab4c
929 |/ user: test
963 |/ user: test
930 | date: Thu Jan 01 00:00:00 1970 +0000
964 | date: Thu Jan 01 00:00:00 1970 +0000
965 | obsfate: rewritten as 4:eb5a0daa2192
931 | summary: A0
966 | summary: A0
932 |
967 |
933 o changeset: 0:ea207398892e
968 o changeset: 0:ea207398892e
@@ -1166,11 +1201,13 b' Test setup'
1166 |/ parent: 0:ea207398892e
1201 |/ parent: 0:ea207398892e
1167 | user: test
1202 | user: test
1168 | date: Thu Jan 01 00:00:00 1970 +0000
1203 | date: Thu Jan 01 00:00:00 1970 +0000
1204 | obsfate: rewritten using amend as 3:7a230b46bf61
1169 | summary: A1
1205 | summary: A1
1170 |
1206 |
1171 | x changeset: 1:471f378eab4c
1207 | x changeset: 1:471f378eab4c
1172 |/ user: test
1208 |/ user: test
1173 | date: Thu Jan 01 00:00:00 1970 +0000
1209 | date: Thu Jan 01 00:00:00 1970 +0000
1210 | obsfate: rewritten using amend as 2:fdf9bde5129a
1174 | summary: A0
1211 | summary: A0
1175 |
1212 |
1176 o changeset: 0:ea207398892e
1213 o changeset: 0:ea207398892e
@@ -1201,6 +1238,7 b' Test setup'
1201 | @ changeset: 1:471f378eab4c
1238 | @ changeset: 1:471f378eab4c
1202 |/ user: test
1239 |/ user: test
1203 | date: Thu Jan 01 00:00:00 1970 +0000
1240 | date: Thu Jan 01 00:00:00 1970 +0000
1241 | obsfate: rewritten using amend as 2:7a230b46bf61
1204 | summary: A0
1242 | summary: A0
1205 |
1243 |
1206 o changeset: 0:ea207398892e
1244 o changeset: 0:ea207398892e
@@ -1608,6 +1646,8 b' Diverge one of the splitted commit'
1608 | x changeset: 6:4a004186e638
1646 | x changeset: 6:4a004186e638
1609 |/ user: test
1647 |/ user: test
1610 | date: Thu Jan 01 00:00:00 1970 +0000
1648 | date: Thu Jan 01 00:00:00 1970 +0000
1649 | obsfate: rewritten using amend as 8:b18bc8331526
1650 | obsfate: rewritten using amend as 9:0b997eb7ceee
1611 | summary: Add A,B,C
1651 | summary: Add A,B,C
1612 |
1652 |
1613 o changeset: 5:dd800401bd8c
1653 o changeset: 5:dd800401bd8c
@@ -2051,6 +2091,7 b' Test templates with splitted and pruned '
2051 | tag: tip
2091 | tag: tip
2052 | user: test
2092 | user: test
2053 | date: Thu Jan 01 00:00:00 1970 +0000
2093 | date: Thu Jan 01 00:00:00 1970 +0000
2094 | obsfate: pruned
2054 | summary: A2
2095 | summary: A2
2055 |
2096 |
2056 o changeset: 2:617adc3a144c
2097 o changeset: 2:617adc3a144c
@@ -2062,6 +2103,7 b' Test templates with splitted and pruned '
2062 | x changeset: 1:471597cad322
2103 | x changeset: 1:471597cad322
2063 |/ user: test
2104 |/ user: test
2064 | date: Thu Jan 01 00:00:00 1970 +0000
2105 | date: Thu Jan 01 00:00:00 1970 +0000
2106 | obsfate: split as 2:617adc3a144c, 3:0d0ef4bdf70e
2065 | summary: A0
2107 | summary: A0
2066 |
2108 |
2067 o changeset: 0:ea207398892e
2109 o changeset: 0:ea207398892e
@@ -975,6 +975,7 b' test the obsolete labels'
975 [log.parent changeset.draft|parent: 3:6f9641995072]
975 [log.parent changeset.draft|parent: 3:6f9641995072]
976 [log.user|user: test]
976 [log.user|user: test]
977 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
977 [log.date|date: Thu Jan 01 00:00:00 1970 +0000]
978 [log.obsfate|obsfate: pruned]
978 [log.summary|summary: add obsolete_e]
979 [log.summary|summary: add obsolete_e]
979
980
980
981
General Comments 0
You need to be logged in to leave comments. Login now