[PATCH] shelve: adds restoring newly created branch (issue5048)

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Feb 24 11:56:31 EST 2016



On 02/24/2016 05:52 PM, Piotr Listkiewicz wrote:
>     Right. I think we won't have to bump the version in this case.
>
>
>   Right, but what to do with reading old version of state file(without
> restoring branch information) with newer client? I would bump version of
> file to mark that file has information about branch in last line, but
> older version of mercurial would crash because it checks whether version
> of file is equals version in sources.

You have to keep code able to handle the old version around.

>     FWIW, can you add a test to make sure new client can unshelve old
>     shelvedstate?
>
> I need more guidance about it - how should i do it when hg used in test
> is always one built from current sources - are there examples of doing
> this in tests already? And maybe somebody has

You can generate a V1 format by hand. Or keep the code to do it around 
and use it. Or you can generate a V2 and remove information to reach V1. 
Or another creative technique

>     We should either shelve it (put it in the shelve and remove it from
>     the working copy) or not (not putting it in the shelve, not removing
>     it from the working copy).
>     I'm not sure what to do about partial shelving. I don't thing the
>     interactive UI have a way to select that yet (wink wink nudge nudge).
>     It probably make sense to not shelve the branch change unless no
>     pattern/selection is used. So only on "bare" shelve.
>
>
> So only in bare shelve restoring branch should take place?

That's a proposal, lets sleep on it and see what other people think 
about it.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list