Mercurial > hg-stable
comparison hgext/remotenames.py @ 39762:25cc5616adc9
bookmarks: pass in formatter to printbookmarks() instead of opts (API)
This clarifies that user options have to be processed before calling
printbookmarks().
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 15 Sep 2018 11:50:07 +0900 |
parents | b9e6b71dc272 |
children | fda1df3d4e06 |
comparison
equal
deleted
inserted
replaced
39761:b2ec79559a4b | 39762:25cc5616adc9 |
---|---|
228 if name.startswith(hoist): | 228 if name.startswith(hoist): |
229 name = name[len(hoist):] | 229 name = name[len(hoist):] |
230 self._nodetohoists.setdefault(node[0], []).append(name) | 230 self._nodetohoists.setdefault(node[0], []).append(name) |
231 return self._nodetohoists | 231 return self._nodetohoists |
232 | 232 |
233 def wrapprintbookmarks(orig, ui, repo, bmarks, **opts): | 233 def wrapprintbookmarks(orig, ui, repo, fm, bmarks): |
234 if 'remotebookmarks' not in repo.names: | 234 if 'remotebookmarks' not in repo.names: |
235 return | 235 return |
236 ns = repo.names['remotebookmarks'] | 236 ns = repo.names['remotebookmarks'] |
237 | 237 |
238 for name in ns.listnames(repo): | 238 for name in ns.listnames(repo): |
241 continue | 241 continue |
242 node = nodes[0] | 242 node = nodes[0] |
243 | 243 |
244 bmarks[name] = (node, ' ', '') | 244 bmarks[name] = (node, ' ', '') |
245 | 245 |
246 return orig(ui, repo, bmarks, **opts) | 246 return orig(ui, repo, fm, bmarks) |
247 | 247 |
248 def extsetup(ui): | 248 def extsetup(ui): |
249 extensions.wrapfunction(bookmarks, '_printbookmarks', wrapprintbookmarks) | 249 extensions.wrapfunction(bookmarks, '_printbookmarks', wrapprintbookmarks) |
250 | 250 |
251 def reposetup(ui, repo): | 251 def reposetup(ui, repo): |