Mercurial > hg
comparison mercurial/bookmarks.py @ 16276:6b16ded5c810 stable
bookmarks: clone non-divergent bookmarks with @ in them
author | Kevin Bullock <kbullock@ringworld.org> |
---|---|
date | Wed, 21 Mar 2012 16:39:38 -0500 |
parents | 6ba530122d8b |
children | 5983de86462c |
comparison
equal
deleted
inserted
replaced
16275:1228b5528945 | 16276:6b16ded5c810 |
---|---|
167 marks = getattr(repo, '_bookmarks', {}) | 167 marks = getattr(repo, '_bookmarks', {}) |
168 | 168 |
169 d = {} | 169 d = {} |
170 for k, v in marks.iteritems(): | 170 for k, v in marks.iteritems(): |
171 # don't expose local divergent bookmarks | 171 # don't expose local divergent bookmarks |
172 if '@' not in k and not k.endswith('@'): | 172 if '@' not in k or k.endswith('@'): |
173 d[k] = hex(v) | 173 d[k] = hex(v) |
174 return d | 174 return d |
175 | 175 |
176 def pushbookmark(repo, key, old, new): | 176 def pushbookmark(repo, key, old, new): |
177 w = repo.wlock() | 177 w = repo.wlock() |