[Bug 3710] New: Cannot update to a branch with ':' in the name

bugzilla-daemon at bz.selenic.com bugzilla-daemon at bz.selenic.com
Mon Nov 26 16:19:08 UTC 2012


http://bz.selenic.com/show_bug.cgi?id=3710

          Priority: normal
            Bug ID: 3710
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: Cannot update to a branch with ':' in the name
          Severity: bug
    Classification: Unclassified
                OS: All
          Reporter: tim.henigan at gmail.com
          Hardware: All
            Status: UNCONFIRMED
           Version: 2.4
         Component: Mercurial
           Product: Mercurial

The organization I work for has a multi-year history with many repos that
include ":" in branch names.  While this violated naming conventions, there was
nothing in the actual command logic that prevented their use (until recently).

Starting with 361ab1e2086f, it is no longer possible to update a working copy
to a branch that includes a ":" in the name.  I have not been able to find any
work-arounds using revsets or revision numbers.  Furthermore, in repos with
"bad" branches, I can no longer even update to the 'default' branch.

I saw in earlier discussions [1], the plan to abort if the user tries to create
a new branch with a "bad" character.  From that thread, I thought the plan was
to continue to allow users to update to existing branches with bad names (to
maintain backwards compatibility).

Starting with v2.4, this no longer seems possible.  I started looking into the
code (specifically, the setbranch function in dirstate.py), but I am not sure
how best to proceed.

Here is a stack trace from Mercurial v2.4 showing the error:

C:\project>hg version
Mercurial Distributed SCM (version 2.4+6-35ba170c0f82)

C:\project>hg up default -C --traceback
Traceback (most recent call last):
  File "mercurial\dispatch.pyo", line 88, in _runcatch
  File "mercurial\dispatch.pyo", line 741, in _dispatch
  File "mercurial\dispatch.pyo", line 514, in runcommand
  File "mercurial\extensions.pyo", line 189, in wrap
  File "hgext\color.pyo", line 371, in colorcmd
  File "mercurial\dispatch.pyo", line 831, in _runcommand
  File "mercurial\dispatch.pyo", line 802, in checkargs
  File "mercurial\dispatch.pyo", line 738, in <lambda>
  File "mercurial\util.pyo", line 472, in check
  File "mercurial\extensions.pyo", line 144, in wrap
  File "mercurial\util.pyo", line 472, in check
  File "hgext\mq.pyo", line 3546, in mqcommand
  File "mercurial\util.pyo", line 472, in check
  File "mercurial\commands.pyo", line 5914, in update
  File "mercurial\hg.pyo", line 483, in clean
  File "mercurial\hg.pyo", line 468, in updaterepo
  File "mercurial\merge.pyo", line 632, in update
  File "mercurial\merge.pyo", line 416, in applyupdates
  File "mercurial\subrepo.pyo", line 144, in submerge
  File "mercurial\subrepo.pyo", line 526, in get
  File "mercurial\hg.pyo", line 468, in updaterepo
  File "mercurial\merge.pyo", line 638, in update
  File "mercurial\dirstate.pyo", line 264, in setbranch
  File "mercurial\scmutil.pyo", line 35, in checknewlabel
Abort: ':' cannot be used in a name
abort: ':' cannot be used in a name

[1]:
http://thread.gmane.org/gmane.comp.version-control.mercurial.devel/45915/focus=45916

-- 
You are receiving this mail because:
You are on the CC list for the bug.



More information about the Mercurial-devel mailing list