##// END OF EJS Templates
templater: add bookmarks to templates and default output...
David Soria Parra -
r13386:f78bc5dd default
parent child Browse files
Show More
@@ -806,6 +806,9 b' class changeset_printer(object):'
806 if branch != 'default':
806 if branch != 'default':
807 self.ui.write(_("branch: %s\n") % branch,
807 self.ui.write(_("branch: %s\n") % branch,
808 label='log.branch')
808 label='log.branch')
809 for bookmark in self.repo.nodebookmarks(changenode):
810 self.ui.write(_("bookmark: %s\n") % bookmark,
811 label='log.bookmark')
809 for tag in self.repo.nodetags(changenode):
812 for tag in self.repo.nodetags(changenode):
810 self.ui.write(_("tag: %s\n") % tag,
813 self.ui.write(_("tag: %s\n") % tag,
811 label='log.tag')
814 label='log.tag')
@@ -153,6 +153,10 b' def showbranches(**args):'
153 if branch != 'default':
153 if branch != 'default':
154 return showlist('branch', [branch], plural='branches', **args)
154 return showlist('branch', [branch], plural='branches', **args)
155
155
156 def showbookmarks(**args):
157 bookmarks = args['ctx'].bookmarks()
158 return showlist('bookmark', bookmarks, **args)
159
156 def showchildren(**args):
160 def showchildren(**args):
157 ctx = args['ctx']
161 ctx = args['ctx']
158 childrevs = ['%d:%s' % (cctx, cctx) for cctx in ctx.children()]
162 childrevs = ['%d:%s' % (cctx, cctx) for cctx in ctx.children()]
@@ -252,6 +256,7 b' keywords = {'
252 'author': showauthor,
256 'author': showauthor,
253 'branch': showbranch,
257 'branch': showbranch,
254 'branches': showbranches,
258 'branches': showbranches,
259 'bookmarks': showbookmarks,
255 'children': showchildren,
260 'children': showchildren,
256 'date': showdate,
261 'date': showdate,
257 'desc': showdescription,
262 'desc': showdescription,
@@ -41,6 +41,8 b' rebase'
41
41
42 $ hg log
42 $ hg log
43 changeset: 3:9163974d1cb5
43 changeset: 3:9163974d1cb5
44 bookmark: one
45 bookmark: two
44 tag: tip
46 tag: tip
45 parent: 1:925d80f479bb
47 parent: 1:925d80f479bb
46 parent: 2:db815d6d32e6
48 parent: 2:db815d6d32e6
@@ -36,6 +36,7 b' look up bookmark'
36
36
37 $ hg log -r X
37 $ hg log -r X
38 changeset: 0:f7b1eb17ad24
38 changeset: 0:f7b1eb17ad24
39 bookmark: X
39 tag: tip
40 tag: tip
40 user: test
41 user: test
41 date: Thu Jan 01 00:00:00 1970 +0000
42 date: Thu Jan 01 00:00:00 1970 +0000
@@ -65,6 +66,8 b' bookmarks revset'
65
66
66 $ hg log -r 'bookmark()'
67 $ hg log -r 'bookmark()'
67 changeset: 1:925d80f479bb
68 changeset: 1:925d80f479bb
69 bookmark: X
70 bookmark: X2
68 tag: tip
71 tag: tip
69 user: test
72 user: test
70 date: Thu Jan 01 00:00:00 1970 +0000
73 date: Thu Jan 01 00:00:00 1970 +0000
@@ -73,6 +76,8 b' bookmarks revset'
73 $ hg log -r 'bookmark(Y)'
76 $ hg log -r 'bookmark(Y)'
74 $ hg log -r 'bookmark(X2)'
77 $ hg log -r 'bookmark(X2)'
75 changeset: 1:925d80f479bb
78 changeset: 1:925d80f479bb
79 bookmark: X
80 bookmark: X2
76 tag: tip
81 tag: tip
77 user: test
82 user: test
78 date: Thu Jan 01 00:00:00 1970 +0000
83 date: Thu Jan 01 00:00:00 1970 +0000
@@ -161,6 +166,9 b' look up stripped bookmark name'
161
166
162 $ hg log -r '"x y"'
167 $ hg log -r '"x y"'
163 changeset: 2:0316ce92851d
168 changeset: 2:0316ce92851d
169 bookmark: X2
170 bookmark: Y
171 bookmark: x y
164 tag: tip
172 tag: tip
165 user: test
173 user: test
166 date: Thu Jan 01 00:00:00 1970 +0000
174 date: Thu Jan 01 00:00:00 1970 +0000
General Comments 0
You need to be logged in to leave comments. Login now