Bug 3091 - grafting an already grafted cset onto its original branch should be disallowed
Summary: grafting an already grafted cset onto its original branch should be disallowed
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: All All
: normal bug
Assignee: Stefano Tortarolo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-08 13:49 UTC by Stefano Tortarolo
Modified: 2011-11-17 17:00 UTC (History)
4 users (show)

See Also:
Python Version: ---


Attachments
(34 bytes, text/troff)
2011-11-08 13:49 UTC, Stefano Tortarolo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefano Tortarolo 2011-11-08 13:49 UTC
Given:

A - B - C
 \
  D - E

And we graft C onto E it works correctly.


A - B - C
 \
  D - E - C'

If we then try to graft again C' onto C the cset would be empty, it doesn't 
create (as 
expected) a new cset, but still it doesn't print anything more than: 
"grafting revision C'".

In my opinion it should say something like: "Nothing to graft"
I've attached a test to reproduce this issue.
Comment 1 Stefano Tortarolo 2011-11-08 14:48 UTC
Patch proposed in ML: http://thread.gmane.org/gmane.comp.version-
control.mercurial.devel/45539
Comment 2 Stefano Tortarolo 2011-11-12 04:34 UTC
The previous patch was wrong.
As mpm suggested, we should detect this case at an earlier stage.
I'm going to post another patch asap.
Comment 3 HG Bot 2011-11-17 17:00 UTC
Fixed by http://selenic.com/repo/hg/rev/00276525e2b7
Stefano Tortarolo <stefano.tortarolo@gmail.com>
graft: disallow grafting grafted csets in specific situations (issue3091)

(please test the fix)
Comment 4 Bugzilla 2012-05-12 09:25 UTC

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

This bug was previously known as _bug_ 3091 at http://mercurial.selenic.com/bts/issue3091
Imported an attachment (id=1604)