Show More
@@ -19,6 +19,7 b' from mercurial import (' | |||||
19 | cmdutil, |
|
19 | cmdutil, | |
20 | commands, |
|
20 | commands, | |
21 | error, |
|
21 | error, | |
|
22 | formatter, | |||
22 | pycompat, |
|
23 | pycompat, | |
23 | registrar, |
|
24 | registrar, | |
24 | ) |
|
25 | ) | |
@@ -109,8 +110,11 b' def showbookmarks(ui, repo, fm):' | |||||
109 | """bookmarks and their associated changeset""" |
|
110 | """bookmarks and their associated changeset""" | |
110 | marks = repo._bookmarks |
|
111 | marks = repo._bookmarks | |
111 | if not len(marks): |
|
112 | if not len(marks): | |
112 | # TODO json output is corrupted; consider using formatter |
|
113 | # This is a bit hacky. Ideally, templates would have a way to | |
113 | ui.write(_('(no bookmarks set)\n')) |
|
114 | # specify an empty output, but we shouldn't corrupt JSON while | |
|
115 | # waiting for this functionality. | |||
|
116 | if not isinstance(fm, formatter.jsonformatter): | |||
|
117 | ui.write(_('(no bookmarks set)\n')) | |||
114 | return |
|
118 | return | |
115 |
|
119 | |||
116 | active = repo._activebookmark |
|
120 | active = repo._activebookmark |
General Comments 0
You need to be logged in to leave comments.
Login now