Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 18656:8eb3408bf005
import: don't rollback on failed import --exact (issue3616)
The checkexact() helper function was calling repo.rollback() from inside
an open transaction. In addition to being insane, this is unnecessary
because import will release the transaction on an exception.
It turns out that this has been broken since the feature was first
introduced, first released in v1.0:
changeset: 4263:47ba52121433
user: Brendan Cully <brendan@kublai.com>
date: Thu Mar 22 10:44:59 2007 -0700
files: mercurial/commands.py mercurial/patch.py
description:
Add import --exact.
When this option is set, import will apply the patch (which must
be generated by export) to the parents specified in the patch,
and check that the node produced by the patch matches the node
ID in the patch.
author | Kevin Bullock <kbullock@ringworld.org> |
---|---|
date | Sun, 10 Feb 2013 23:01:12 +0000 |
parents | 0027a5cec9d0 |
children | 5e63a85299ba |
line wrap: on
line diff
--- a/mercurial/commands.py Sun Feb 10 16:22:32 2013 -0800 +++ b/mercurial/commands.py Sun Feb 10 23:01:12 2013 +0000 @@ -3812,7 +3812,6 @@ def checkexact(repo, n, nodeid): if opts.get('exact') and hex(n) != nodeid: - repo.rollback() raise util.Abort(_('patch is damaged or loses information')) def tryone(ui, hunk, parents):