# HG changeset patch # User Matt Mackall # Date 1354147731 21600 # Node ID e853d27956fb0a25dcaac29b18bb0d5719297830 # Parent c64e646af81ed9da5a6282fd3ac4607891762d05# Parent f94ead93406764ffd0c3febfc2ea70d36a2a28bb merge with stable diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -928,6 +928,7 @@ ' exists'), # i18n: "it" refers to an existing branch hint=_("use 'hg update' to switch to it")) + scmutil.checknewlabel(None, label, 'branch') repo.dirstate.setbranch(label) ui.status(_('marked working directory as branch %s\n') % label) ui.status(_('(branches are permanent and global, ' @@ -4510,7 +4511,7 @@ else: ui.write("%s = %s\n" % (name, util.hidepassword(path))) -@command('^phase', +@command('phase', [('p', 'public', False, _('set changeset phase to public')), ('d', 'draft', False, _('set changeset phase to draft')), ('s', 'secret', False, _('set changeset phase to secret')), diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -261,7 +261,6 @@ def setbranch(self, branch): # no repo object here, just check for reserved names - scmutil.checknewlabel(None, branch, 'branch') self._branch = encoding.fromlocal(branch) f = self._opener('branch', 'w', atomictemp=True) try: diff --git a/tests/bundles/test-invalid-branch-name.hg b/tests/bundles/test-invalid-branch-name.hg new file mode 100644 index 0000000000000000000000000000000000000000..9023822853403dda519ea06dbe38fe81f9984b38 GIT binary patch literal 847 zc$@)G1F-x^M=>x$T4*^jL0KkKS=w`L=Kug9fB*mg@U8s2|MhX^cey|3{_CdTI~`E4 zOYkz2d00LlS7kr~dyd9!VB{DCG-7BBnqe|&kO72f(*T$PVFrdk#K;2x0GOFD69F_0 zQIcwA6nbhhXa;}{Jww!Kpfmsg0009Z00003KmY(DXpI_Z3V4)Yh5;}W00`4e&;n_o zzyb^=1i~^dknUy4_dYe-tO+6rJ(?OsEN2uD2f$9wb z>TOR@G|fTi)buBy)YHir4?WmSn9zuVpK`6-fJ$T#hiD2w^8k=6!~$46bFGDK;1sMn zqYkFIw_->&X@CtAhLWERq{;0gWDJT9@SVxKYUz@0+T%We;>TcE2eu?}k|YlxB~ci` zh+~8KCI_nyi)En;6A~0m^Uzis3xi%XV4Iep&n%IJ#qqd`*v2uKXn-cvb911<9$Gvj zi(-_ag=jb!T&CR@trzo|J zEUJqaDDR??%lTxYkCFq)LAEY!4=JWzUir*aeo=KBM)1d$`kEx=KfXkJauv%`BkvHpl>=#b6{JE>gFG_&m<=SM;Dcl$ zLrh_Ayeou9;26VT`Np*9x;Ye4AY!Ka$tM&M7+}Z)0~ENM5O1Aom(amSO%FoZFA0{4 zXk^b=;My?hENRipgpb}LrQl0Ptw=D4rY^){g{bU(Ww?HHidG!D;Ww~ Z`o(fkJ44+AP)3{lUC9*TLPKfIx15{}b?yKF diff --git a/tests/test-alias.t b/tests/test-alias.t --- a/tests/test-alias.t +++ b/tests/test-alias.t @@ -350,7 +350,6 @@ init create a new repository in the given directory log show revision history of entire repository or files merge merge working directory with another revision - phase set or show the current phase name pull pull changes from the specified source push push changes to the specified destination remove remove the specified files on the next commit @@ -377,7 +376,6 @@ init create a new repository in the given directory log show revision history of entire repository or files merge merge working directory with another revision - phase set or show the current phase name pull pull changes from the specified source push push changes to the specified destination remove remove the specified files on the next commit @@ -404,7 +402,6 @@ init create a new repository in the given directory log show revision history of entire repository or files merge merge working directory with another revision - phase set or show the current phase name pull pull changes from the specified source push push changes to the specified destination remove remove the specified files on the next commit diff --git a/tests/test-branches.t b/tests/test-branches.t --- a/tests/test-branches.t +++ b/tests/test-branches.t @@ -68,6 +68,23 @@ abort: '\n' cannot be used in a name [255] +verify update will accept invalid legacy branch names + + $ hg init test-invalid-branch-name + $ cd test-invalid-branch-name + $ hg pull -u "$TESTDIR"/bundles/test-invalid-branch-name.hg + pulling from *test-invalid-branch-name.hg (glob) + requesting all changes + adding changesets + adding manifests + adding file changes + added 3 changesets with 3 changes to 2 files + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + + $ hg update '"colon:test"' + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cd .. + $ echo 'd' >d $ hg add d $ hg branch 'a branch name much longer than the default justification used by branches' diff --git a/tests/test-commandserver.py.out b/tests/test-commandserver.py.out --- a/tests/test-commandserver.py.out +++ b/tests/test-commandserver.py.out @@ -26,7 +26,6 @@ init create a new repository in the given directory log show revision history of entire repository or files merge merge working directory with another revision - phase set or show the current phase name pull pull changes from the specified source push push changes to the specified destination remove remove the specified files on the next commit diff --git a/tests/test-debugcomplete.t b/tests/test-debugcomplete.t --- a/tests/test-debugcomplete.t +++ b/tests/test-debugcomplete.t @@ -201,7 +201,6 @@ init: ssh, remotecmd, insecure log: follow, follow-first, date, copies, keyword, rev, removed, only-merges, user, only-branch, branch, prune, hidden, patch, git, limit, no-merges, stat, graph, style, template, include, exclude merge: force, rev, preview, tool - phase: public, draft, secret, force, rev pull: update, force, rev, bookmark, branch, ssh, remotecmd, insecure push: force, rev, bookmark, branch, new-branch, ssh, remotecmd, insecure remove: after, force, include, exclude @@ -261,6 +260,7 @@ outgoing: force, rev, newest-first, bookmarks, branch, patch, git, limit, no-merges, stat, graph, style, template, ssh, remotecmd, insecure, subrepos parents: rev, style, template paths: + phase: public, draft, secret, force, rev recover: rename: after, force, include, exclude, dry-run resolve: all, list, mark, unmark, no-status, tool, include, exclude diff --git a/tests/test-help.t b/tests/test-help.t --- a/tests/test-help.t +++ b/tests/test-help.t @@ -15,7 +15,6 @@ init create a new repository in the given directory log show revision history of entire repository or files merge merge working directory with another revision - phase set or show the current phase name pull pull changes from the specified source push push changes to the specified destination remove remove the specified files on the next commit @@ -37,7 +36,6 @@ init create a new repository in the given directory log show revision history of entire repository or files merge merge working directory with another revision - phase set or show the current phase name pull pull changes from the specified source push push changes to the specified destination remove remove the specified files on the next commit @@ -222,7 +220,6 @@ init create a new repository in the given directory log, history show revision history of entire repository or files merge merge working directory with another revision - phase set or show the current phase name pull pull changes from the specified source push push changes to the specified destination remove, rm remove the specified files on the next commit @@ -536,7 +533,6 @@ init create a new repository in the given directory log show revision history of entire repository or files merge merge working directory with another revision - phase set or show the current phase name pull pull changes from the specified source push push changes to the specified destination remove remove the specified files on the next commit @@ -564,7 +560,6 @@ init create a new repository in the given directory log show revision history of entire repository or files merge merge working directory with another revision - phase set or show the current phase name pull pull changes from the specified source push push changes to the specified destination remove remove the specified files on the next commit diff --git a/tests/test-phases.t b/tests/test-phases.t --- a/tests/test-phases.t +++ b/tests/test-phases.t @@ -337,6 +337,7 @@ description: A + (Issue3707) @@ -347,7 +348,6 @@ rollback completed abort: phases.new-commit: not a valid phase name ('babar') [255] - Test phase command =================== diff --git a/tests/test-strict.t b/tests/test-strict.t --- a/tests/test-strict.t +++ b/tests/test-strict.t @@ -29,7 +29,6 @@ init create a new repository in the given directory log show revision history of entire repository or files merge merge working directory with another revision - phase set or show the current phase name pull pull changes from the specified source push push changes to the specified destination remove remove the specified files on the next commit