equal
deleted
inserted
replaced
294 # don't expose local divergent bookmarks |
294 # don't expose local divergent bookmarks |
295 if hasnode(v) and ('@' not in k or k.endswith('@')): |
295 if hasnode(v) and ('@' not in k or k.endswith('@')): |
296 yield k, v |
296 yield k, v |
297 |
297 |
298 def listbookmarks(repo): |
298 def listbookmarks(repo): |
299 # We may try to list bookmarks on a repo type that does not |
|
300 # support it (e.g., statichttprepository). |
|
301 marks = getattr(repo, '_bookmarks', {}) |
|
302 |
|
303 d = {} |
299 d = {} |
304 hasnode = repo.changelog.hasnode |
300 for book, node in listbinbookmarks(repo): |
305 for k, v in marks.iteritems(): |
301 d[book] = hex(node) |
306 # don't expose local divergent bookmarks |
|
307 if hasnode(v) and ('@' not in k or k.endswith('@')): |
|
308 d[k] = hex(v) |
|
309 return d |
302 return d |
310 |
303 |
311 def pushbookmark(repo, key, old, new): |
304 def pushbookmark(repo, key, old, new): |
312 w = l = tr = None |
305 w = l = tr = None |
313 try: |
306 try: |