Mercurial > evolve
changeset 1022:6f4fd3e49d1c
uncommit tr
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 06 Aug 2014 17:14:00 -0700 |
parents | 200f2d9b9f39 |
children | 7c8e3941241f |
files | hgext/evolve.py |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/evolve.py Wed Aug 06 18:06:17 2014 -0700 +++ b/hgext/evolve.py Wed Aug 06 17:14:00 2014 -0700 @@ -1935,7 +1935,7 @@ Return 0 if changed files are uncommitted. """ - wlock = lock = None + wlock = lock = tr = None try: wlock = repo.wlock() lock = repo.lock() @@ -1951,7 +1951,9 @@ raise util.Abort(_("cannot uncommit merge changeset")) oldphase = old.phase() updatebookmarks = _bookmarksupdater(repo, old.node()) + # Recommit the filtered changeset + tr = repo.transaction('uncommit') newid = None if (pats or opts.get('include') or opts.get('exclude') or opts.get('all')): @@ -1969,8 +1971,9 @@ if not repo[newid].files(): ui.warn(_("new changeset is empty\n")) ui.status(_('(use "hg prune ." to remove it)\n')) + tr.close() finally: - lockmod.release(lock, wlock) + lockmod.release(tr, lock, wlock) @eh.wrapcommand('commit') def commitwrapper(orig, ui, repo, *arg, **kwargs):