Bug 4423 - transplant errors when the resolved merge is empty
Summary: transplant errors when the resolved merge is empty
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: transplant (show other bugs)
Version: 3.2-rc
Hardware: PC Linux
: normal bug
Assignee: Robert Collins
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-28 01:43 UTC by Robert Collins
Modified: 2015-01-22 15:04 UTC (History)
3 users (show)

See Also:
Python Version: ---


Attachments
patch for the issue (1.85 KB, patch)
2014-10-28 02:56 UTC, Robert Collins
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Collins 2014-10-28 01:43 UTC
I am doing a transplant of commits where for some of them the resolution is to get rid of the changes entirely.

When this is done via a filter, the commit is skipped.

When this is done manually (e.g. the ones the filter cannot decide on), I get:

$ hg st
? .eggs/README.txt
? .eggs/argparse-1.2.1-py2.6.egg
? NEWS~
? utils/transplant-filter.sh

$ hg transplant -v -s ../cpython.hg --filter utils/transplant-filter.sh 0f1619e539fb: --continue
searching for changes
sampling from both directions
warning: repository is unrelated
abort: commit failed

I would have expected this to have skipped over the commit rather than try to commit an empty changeset.
Comment 1 Robert Collins 2014-10-28 02:56 UTC
Created attachment 1795 [details]
patch for the issue

I'm not on the selenic mailing list and this is a drive-by fix, so I figured this was better than subscribing just long enough to patchbomb and unsubscribe.
Comment 2 Matt Mackall 2014-10-28 04:00 UTC
No subscription is necessary to submit a patch to the list. We can't review or accept patches via the BTS, hence our pleading not to submit them this way.
Comment 3 Pierre-Yves David 2014-11-25 16:11 UTC
A patch have been submitted here: http://www.selenic.com/pipermail/mercurial-devel/2014-October/063148.html

But the submitter have no interest in maturing it. So someone else will have to.
Comment 4 Robert Collins 2014-11-25 16:22 UTC
Hi, I'm on annual leave at the moment. If you have urgent queries about Helion please contact Chris Jones (cmsj@hp.com) or Monty Taylor (monty.taylor@hp.com). For OpenStack and upstream opensource things please contact Monty Taylor.
Comment 5 HG Bot 2015-01-09 17:00 UTC
Fixed by http://selenic.com/repo/hg/rev/49caef455912
Pierre-Yves David <pierre-yves.david@fb.com>
transplant: properly skip empty changeset (issue4423)

If resolving a merge conflict result in an empty changesets, we now properly
skip the changeset instead of crashing.

Original patch from Robert Collins <robertc@robertcollins.net>.

(please test the fix)
Comment 6 Matt Mackall 2015-01-22 15:04 UTC
Bulk testing -> fixed