[PATCH STABLE V2] update: allow update to existing branches with invalid names (issue3710)

Pierre-Yves David pierre-yves.david at logilab.fr
Wed Nov 28 12:31:20 CST 2012


On Wed, Nov 28, 2012 at 08:22:26PM +0200, Idan Kamara wrote:
> On Wed, Nov 28, 2012 at 3:21 PM, Tim Henigan <tim.henigan at gmail.com> wrote:
> >
> > # HG changeset patch
> > # User Tim Henigan <tim.henigan at gmail.com>
> > # Date 1354024055 18000
> > # Branch stable
> > # Node ID 15c51486a402299c61ef009b7587afbb152d2c54
> > # Parent  54cedee86e5126188b0dcfbd7015bcdca7f6c2e2
> > update: allow update to existing branches with invalid names (issue3710)
> >
> > Starting with 361ab1e2086f, users are no longer able to update a
> > working copy to a branch named with a "bad" character (such as ':').
> >
> > Prior to v2.4, it was possible to create branch names using "bad"
> > characters, so this breaks backwards compatibility.
> >
> > Mercurial must allow users to update to existing branches with bad
> > names.  However, it should continue to prevent the creation of new
> > branches with bad names.
> >
> > A test was added to confirm that 'hg update' works as expected. The
> > test uses a bundled repo that was created with an earlier version of
> > Mercurial.
> 
> You could perhaps use inilne Python to do this test more easily:
> 
>   >>> from mercurial import hg, ui
>   >>> r = hg.repository(ui.ui())
>   >>> r.dirstate.setbranch('a:b')

I'm not sure we care about the internal here. What matter is to not
regresse on hg update. Isn't it?

-- 
Pierre-Yves David

http://www.logilab.fr/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20121128/f970d61e/attachment.pgp>


More information about the Mercurial-devel mailing list