[PATCH] shelve: adds restoring original parents after unshelve (issue5123)

Piotr Listkiewicz piotr.listkiewicz at gmail.com
Sat Mar 26 12:12:38 EDT 2016


>
> > > pctx is p1, second parent only exists in working directory, not in
> > > changeset history or tmpwctx or shelvectx
> >
> > I forgot to write that this situation is when merge is not commited, when
> > merge is commited then you are right
> But shouldn't a merge be committed as it is dirty?


You are right, i didnt think about this. I have to check this once again.

2016-03-26 17:05 GMT+01:00 Yuya Nishihara <yuya at tcha.org>:

> On Sat, 26 Mar 2016 16:50:37 +0100, Piotr Listkiewicz wrote:
> > > pctx is p1, second parent only exists in working directory, not in
> > > changeset history or tmpwctx or shelvectx
> >
> > I forgot to write that this situation is when merge is not commited, when
> > merge is commited then you are right
>
> But shouldn't a merge be committed as it is dirty?
>
> > >> > +def restoreparents(repo, parents):
> > >> > +    if len(parents) > 1:
> > >> > +        repo.setparents(parents[0],
> > >> > +                        parents[1])
> > >> Maybe it would need begin/endparentchange().
> > >
> > > localrepo.setparents invokes begin/endparentchange() internally on
> > > dirstate
>
> Oh, you're right. So debugsetparents won't have to do that, too.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20160326/5b1a31f9/attachment.html>


More information about the Mercurial-devel mailing list