[PATCH] mercurial: fixes update --clean to work on new branch (issue5003)

Piotr Listkiewicz piotr.listkiewicz at gmail.com
Fri Feb 12 11:07:35 EST 2016


>
> > >> To rephrase, with --clean, the branch used for the update logic should
> > >> -always- be the on of the first working copy parents. Uncommited
> branch
> > >> data, (new or not), should be disregarded.


> According to this definition, --clean should use the p1 branch no matter if
> wc.branch() exists or not.


So the result of

(suppose current p1 of wc revision is 4 and branch is dev)
$ hg branch new-branch
# proceed to edit and add some file
$ hg update --clean # lets nuke edits, i'll run hg add after

Should be updating to the revision 4 on branch dev?

2016-02-11 15:30 GMT+01:00 Yuya Nishihara <yuya at tcha.org>:

> On Wed, 10 Feb 2016 19:12:19 +0100, Piotr Listkiewicz wrote:
> > > 2016-01-17 19:25 GMT+01:00 Pierre-Yves David <
> > > pierre-yves.david at ens-lyon.org>:
> > >> Given that the "new" branch have not been commited yet, and --clean is
> > >> about "discard uncommitted changes (no backup)", I think we should
> discard
> > >> uncommited branch data in all case.
> > >>
> > >> To rephrase, with --clean, the branch used for the update logic should
> > >> -always- be the on of the first working copy parents. Uncommited
> branch
> > >> data, (new or not), should be disregarded.
>
> According to this definition, --clean should use the p1 branch no matter if
> wc.branch() exists or not.
>
> You might be interested in this change:
>
> http://patchwork.serpentine.com/patch/13067/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20160212/0844f7cf/attachment.html>


More information about the Mercurial-devel mailing list