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

Idan Kamara idankk86 at gmail.com
Wed Nov 28 12:22:26 CST 2012


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')

http://mercurial.selenic.com/wiki/WritingTests#Inline_Python
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20121128/560fe1d5/attachment.html>


More information about the Mercurial-devel mailing list