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.
Create an empty repo:
$ hg init a
$ cd a
Try some commands:
$ hg log
$ hg grep wah
[1]
$ hg manifest
$ hg verify
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
0 files, 0 changesets, 0 total revisions
Check the basic files created:
$ ls .hg
00changelog.i
requires
store
Should be empty:
$ ls .hg/store
Poke at a clone:
$ cd ..
$ hg clone a b
updating to branch default
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd b
$ hg verify
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
0 files, 0 changesets, 0 total revisions
$ ls .hg
00changelog.i
branch
dirstate
hgrc
requires
store
Should be empty:
$ ls .hg/store
$ cd ..