##// END OF EJS Templates
remotenames: show remote bookmarks in `hg bookmarks`...
Pulkit Goyal -
r37108:a61fff49 default
parent child Browse files
Show More
@@ -32,6 +32,8 b' from mercurial.node import ('
32 bin,
32 bin,
33 )
33 )
34 from mercurial import (
34 from mercurial import (
35 bookmarks,
36 extensions,
35 logexchange,
37 logexchange,
36 namespaces,
38 namespaces,
37 pycompat,
39 pycompat,
@@ -228,6 +230,24 b' class remotenames(object):'
228 self._nodetohoists.setdefault(node[0], []).append(name)
230 self._nodetohoists.setdefault(node[0], []).append(name)
229 return self._nodetohoists
231 return self._nodetohoists
230
232
233 def wrapprintbookmarks(orig, ui, repo, bmarks, **opts):
234 if 'remotebookmarks' not in repo.names:
235 return
236 ns = repo.names['remotebookmarks']
237
238 for name in ns.listnames(repo):
239 nodes = ns.nodes(repo, name)
240 if not nodes:
241 continue
242 node = nodes[0]
243
244 bmarks[name] = (node, ' ', '')
245
246 return orig(ui, repo, bmarks, **opts)
247
248 def extsetup(ui):
249 extensions.wrapfunction(bookmarks, '_printbookmarks', wrapprintbookmarks)
250
231 def reposetup(ui, repo):
251 def reposetup(ui, repo):
232 if not repo.local():
252 if not repo.local():
233 return
253 return
@@ -327,3 +327,9 b' Local bookmark should take precedence ov'
327 date: Thu Jan 01 00:00:00 1970 +0000
327 date: Thu Jan 01 00:00:00 1970 +0000
328 summary: added bar
328 summary: added bar
329
329
330 $ hg bookmarks
331 $TESTTMP/server2/bar 6:87d6d6676308
332 $TESTTMP/server2/foo 3:62615734edd5
333 default/bar 6:87d6d6676308
334 default/foo 3:62615734edd5
335 * foo 8:3e1487808078
General Comments 0
You need to be logged in to leave comments. Login now