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

Piotr Listkiewicz piotr.listkiewicz at gmail.com
Thu Mar 31 18:17:50 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?


I checked this once again and You were right. It can be done using tmpwctx
and workingctx - i sent patch V2 using only those.


2016-03-26 17:12 GMT+01:00 Piotr Listkiewicz <piotr.listkiewicz at gmail.com>:

> > > 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/20160401/9c77f12e/attachment.html>


More information about the Mercurial-devel mailing list