Bug 3380 - Rejects during Transplant causes a rollback- and deletes intact revision; working dir unusable
Summary: Rejects during Transplant causes a rollback- and deletes intact revision; wor...
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: All All
: urgent bug
Assignee: Bugzilla
URL:
Keywords:
: 3338 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-04-18 03:00 UTC by Chr. Feuersaenger
Modified: 2012-07-29 18:32 UTC (History)
4 users (show)

See Also:
Python Version: ---


Attachments
(34 bytes, application/octetstream)
2012-04-18 03:00 UTC, Chr. Feuersaenger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chr. Feuersaenger 2012-04-18 03:00 UTC
I used transplant to transplant two changesets. If the second changeset
produces a rejected chunk, the transplant (a) destroys the correctly
transplanted first revision and (b) leaves the working directory in an
undefined, unusable state and (c) hg transplant -c does no longer work.

I added a zip containing
- reproduce.bat  a self-contained script which creates a sample repo and
issues the commands to reproduce the issue

- the output of reproduce.bat on my machine.

In short, here is what I found out:
The failed chunk causes a
===
transaction abort!
rollback completed
==
which, in turn, deletes the first (correctly transplanted) revision.
Unfortunately, the aborted transplant needs this revision in order to
continue. Moreover, the working dir is based on that revision, and the
working dir is not updated (it is destroyed effectively).
===
warning: ignoring unknown working parent d9cf31280b5c!
abort: no revision checked out
==

EXPECTED BEHAVIOR: I suppose that transplant should never rollback anything
since rollback effectively disables --continue.

The problem occurs using 2.1.1 . I believe it worked before we updated to 2.1.1

It seems as if INDIVIDUAL transplants work, though.

Note that we rely heavily on transplant... it would really be great to get a
bug fix soon. 

Thanks for taking care of mercurial, it is great software!
Comment 1 Patrick Mézard 2012-04-22 09:00 UTC
Patch submitted here:

  http://selenic.com/pipermail/mercurial-devel/2012-April/039418.html

Thank you for the report!
Comment 2 HG Bot 2012-04-26 13:00 UTC
Fixed by http://selenic.com/repo/hg/rev/1f020021adfa
Patrick Mezard <patrick@mezard.eu>
transplant: do not rollback on patching error (issue3379)

(please test the fix)
Comment 3 Bugzilla 2012-05-12 09:30 UTC

--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:30 EDT  ---

This bug was previously known as _bug_ 3379 at http://mercurial.selenic.com/bts/issue3379
Imported an attachment (id=1652)

Bug Status was UNCONFIRMED but everconfirmed was true
   Setting status to CONFIRMED

Comment 4 Matt Mackall 2012-07-29 18:32 UTC
*** Bug 3338 has been marked as a duplicate of this bug. ***