why abort on grafting sibling?
Robert Figura
nc-figuraro at netcologne.de
Tue Sep 25 22:56:11 UTC 2012
Matt Mackall <mpm at selenic.com> wrote:
> On Tue, 2012-09-25 at 23:50 +0200, Robert Figura wrote:
> > I understand that graft is there to allow copying through merge. I'm
> > not sure i completely understand the pain in case of user error.
>
> Spend a few years on #mercurial on IRC. Then you'll understand that
> every single conceptual mistake will be made by someone somewhere and it
> will ruin their day. Here, they'll attempt to graft onto the wrong
> branch and instead of getting a no-op or error, they'll end up with a
> mysterious unwanted duplicate (or many). They'll then spend an entire
> day trying to correct the situation, probably compounding their error in
> the process. So it's best to avoid making it easy to make mistakes in
> the first place.
That's a lot of pressure. Just to be sure, i'm not advocating taking
such risks, just asking. It's easy to lose perspective on this, it
seems.
> (If this were git, they would immediately know the fault lies in their
> own massive uncertainty as to how git actually works. But since this is
> Mercurial, the fault will lie in Mercurial for either a) not doing what
> they thought was obvious or b) not working exactly like git.)
:-D
I like mercurial.
> > > Obvious workaround: duplicate your change by qimporting an exported
> > $ hg qpush -f
> > (working directory not at a head)
> > applying a
> > cleaning up working directory...done
> > abort: qpush exactly duplicates child changeset
> First, I think you mean descendant:
>
> sibling
> n 1: a person's brother or sister
Yeah. I was looking at the conflicting changeset but i see that it was
a bad term. Direct descendant is the right one.
> Here, you run into the problem that identity=contents in Mercurial. If
> you make two identical changes (including metadata like parents).. you
> end up with one changeset. So you have to change.. something. Perhaps
> the date.
Auw. Should have seen that myself. Here's what works:
$ hg export -r 10055 --nodates | awk '!i&&/^# Date/{++i;next}1' > a
$ hg qimport -P a
$ rm a
I'll consider this quite reasonable because there is no cloning
involved. Thank you for your time.
Kind Regards
- Robert Figura
--
http://teslawm.org/
More information about the Mercurial
mailing list