equal
deleted
inserted
replaced
400 marks = repo._bookmarks |
400 marks = repo._bookmarks |
401 existing = hex(marks.get(key, '')) |
401 existing = hex(marks.get(key, '')) |
402 if existing != old and existing != new: |
402 if existing != old and existing != new: |
403 return False |
403 return False |
404 if new == '': |
404 if new == '': |
405 del marks[key] |
405 changes = [(key, None)] |
406 else: |
406 else: |
407 if new not in repo: |
407 if new not in repo: |
408 return False |
408 return False |
409 marks[key] = repo[new].node() |
409 changes = [(key, repo[new].node())] |
410 marks.recordchange(tr) |
410 marks.applychanges(repo, tr, changes) |
411 tr.close() |
411 tr.close() |
412 return True |
412 return True |
413 finally: |
413 finally: |
414 lockmod.release(tr, l, w) |
414 lockmod.release(tr, l, w) |
415 |
415 |