equal
deleted
inserted
replaced
2663 finally: |
2663 finally: |
2664 lockmod.release(tr, lock, wlock) |
2664 lockmod.release(tr, lock, wlock) |
2665 |
2665 |
2666 @eh.wrapcommand('commit') |
2666 @eh.wrapcommand('commit') |
2667 def commitwrapper(orig, ui, repo, *arg, **kwargs): |
2667 def commitwrapper(orig, ui, repo, *arg, **kwargs): |
|
2668 tr = None |
2668 if kwargs.get('amend', False): |
2669 if kwargs.get('amend', False): |
2669 wlock = lock = None |
2670 wlock = lock = None |
2670 else: |
2671 else: |
2671 wlock = repo.wlock() |
2672 wlock = repo.wlock() |
2672 lock = repo.lock() |
2673 lock = repo.lock() |
2685 if markers: |
2686 if markers: |
2686 obsolete.createmarkers(repo, markers) |
2687 obsolete.createmarkers(repo, markers) |
2687 for book in oldbookmarks: |
2688 for book in oldbookmarks: |
2688 repo._bookmarks[book] = new.node() |
2689 repo._bookmarks[book] = new.node() |
2689 if oldbookmarks: |
2690 if oldbookmarks: |
2690 repo._bookmarks.write() |
2691 if not wlock: |
|
2692 wlock = repo.wlock() |
|
2693 if not lock: |
|
2694 lock = repo.lock() |
|
2695 tr = repo.transaction('commit') |
|
2696 repo._bookmarks.recordchange(tr) |
|
2697 tr.close() |
2691 return result |
2698 return result |
2692 finally: |
2699 finally: |
2693 lockmod.release(lock, wlock) |
2700 lockmod.release(tr, lock, wlock) |
2694 |
2701 |
2695 @command('^split', |
2702 @command('^split', |
2696 [('r', 'rev', [], _("revision to fold")), |
2703 [('r', 'rev', [], _("revision to fold")), |
2697 ] + commitopts + commitopts2, |
2704 ] + commitopts + commitopts2, |
2698 _('hg split [OPTION]... [-r] REV')) |
2705 _('hg split [OPTION]... [-r] REV')) |