comparison hgext/evolve.py @ 1295:1ac05eef72ca

prune: prune fix transaction pattern I forgot to amend.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 29 Apr 2015 14:23:09 -0700
parents d1c29db2e055
children 765286e47619
comparison
equal deleted inserted replaced
1294:d1c29db2e055 1295:1ac05eef72ca
1795 _deletebookmark(ui, marks, bookmark) 1795 _deletebookmark(ui, marks, bookmark)
1796 1796
1797 if not revs: 1797 if not revs:
1798 raise util.Abort(_('nothing to prune')) 1798 raise util.Abort(_('nothing to prune'))
1799 1799
1800 wlock = lock = None 1800 wlock = lock = tr = None
1801 try: 1801 try:
1802 wlock = repo.wlock() 1802 wlock = repo.wlock()
1803 lock = repo.lock() 1803 lock = repo.lock()
1804 tr = repo.transaction('prune') 1804 tr = repo.transaction('prune')
1805 # defines pruned changesets 1805 # defines pruned changesets
1893 updatebookmarks(dest.node()) 1893 updatebookmarks(dest.node())
1894 break 1894 break
1895 1895
1896 tr.close() 1896 tr.close()
1897 finally: 1897 finally:
1898 if tr: 1898 lockmod.release(tr, lock, wlock)
1899 tr.release()
1900 lockmod.release(lock, wlock)
1901 1899
1902 @command('amend|refresh', 1900 @command('amend|refresh',
1903 [('A', 'addremove', None, 1901 [('A', 'addremove', None,
1904 _('mark new/missing files as added/removed before committing')), 1902 _('mark new/missing files as added/removed before committing')),
1905 ('e', 'edit', False, _('invoke editor on commit messages')), 1903 ('e', 'edit', False, _('invoke editor on commit messages')),