equal
deleted
inserted
replaced
226 |
226 |
227 def pushbookmark(repo, key, old, new): |
227 def pushbookmark(repo, key, old, new): |
228 w = repo.wlock() |
228 w = repo.wlock() |
229 try: |
229 try: |
230 marks = repo._bookmarks |
230 marks = repo._bookmarks |
231 if hex(marks.get(key, '')) != old: |
231 existing = hex(marks.get(key, '')) |
|
232 if existing != old and existing != new: |
232 return False |
233 return False |
233 if new == '': |
234 if new == '': |
234 del marks[key] |
235 del marks[key] |
235 else: |
236 else: |
236 if new not in repo: |
237 if new not in repo: |