Show More
|
1 | NO CONTENT: new file 100644, binary diff hidden |
@@ -924,6 +924,7 b' def branch(ui, repo, label=None, **opts)' | |||
|
924 | 924 | ' exists'), |
|
925 | 925 | # i18n: "it" refers to an existing branch |
|
926 | 926 | hint=_("use 'hg update' to switch to it")) |
|
927 | scmutil.checknewlabel(None, label, 'branch') | |
|
927 | 928 | repo.dirstate.setbranch(label) |
|
928 | 929 | ui.status(_('marked working directory as branch %s\n') % label) |
|
929 | 930 | ui.status(_('(branches are permanent and global, ' |
@@ -261,7 +261,6 b' class dirstate(object):' | |||
|
261 | 261 | |
|
262 | 262 | def setbranch(self, branch): |
|
263 | 263 | # no repo object here, just check for reserved names |
|
264 | scmutil.checknewlabel(None, branch, 'branch') | |
|
265 | 264 | self._branch = encoding.fromlocal(branch) |
|
266 | 265 | f = self._opener('branch', 'w', atomictemp=True) |
|
267 | 266 | try: |
@@ -68,6 +68,23 b' invalid characters' | |||
|
68 | 68 | abort: '\n' cannot be used in a name |
|
69 | 69 | [255] |
|
70 | 70 | |
|
71 | verify update will accept invalid legacy branch names | |
|
72 | ||
|
73 | $ hg init test-invalid-branch-name | |
|
74 | $ cd test-invalid-branch-name | |
|
75 | $ hg pull -u "$TESTDIR"/bundles/test-invalid-branch-name.hg | |
|
76 | pulling from *test-invalid-branch-name.hg (glob) | |
|
77 | requesting all changes | |
|
78 | adding changesets | |
|
79 | adding manifests | |
|
80 | adding file changes | |
|
81 | added 3 changesets with 3 changes to 2 files | |
|
82 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
83 | ||
|
84 | $ hg update '"colon:test"' | |
|
85 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
86 | $ cd .. | |
|
87 | ||
|
71 | 88 | $ echo 'd' >d |
|
72 | 89 | $ hg add d |
|
73 | 90 | $ hg branch 'a branch name much longer than the default justification used by branches' |
General Comments 0
You need to be logged in to leave comments.
Login now