changeset 17986:e853d27956fb

merge with stable
author Matt Mackall <mpm@selenic.com>
date Wed, 28 Nov 2012 18:08:51 -0600
parents c64e646af81e (current diff) f94ead934067 (diff)
children 1683bca31752
files mercurial/commands.py
diffstat 10 files changed, 21 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- 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')),
--- 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:
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~<b6GH(s(<UG!q>^dkn<g5gYI=al>Uy4_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<!~|*!R#~W<)RHi%prP~1oJUbiRY%HUXjT{56DtDZb~{I5MpiR|gq^Z0
z2dwIf7b3@d{jdRXc05qJ+$oT4$e*QDh^ZDiV*&1Dz=)_Zq6rc!x=~#t5k^eH3i66}
z7wn@1fZHO#MKNDl5TTQy#5m&OqDbkOSqBywbyxv}q1A(zj@VcxKy>!T&CR@trzo|J
zEUJqaDDR??%lTxYkCFq)LAEY!4=JWzUir*aeo=KBM)1d$`kEx=KfXkJauv%`Bkv<h
zCyTU1_AHJ-^PIUoHZ6$WGG=L3K{x_Rg@%rT4^)C&DC%*ctlG}RAXkd%pL`JeDQQ-j
z6`X~rWb|qxkdc51kb$@bvb^(Zeh30lMzDAC9~>Hpl>=#b6{JE>gFG_&m<=SM;Dcl$
zLrh_Ayeou9;26VT`Np*9x;Ye4AY!Ka$tM&M7+}Z)0~ENM5O1Aom(amSO%FoZFA0{4
zXk^b=;M<p`Sr(y`he4xl!|ydg6m$X(0ib77M8s^&-6Hrb!z9Z^R8mFy8Jtnmq-NBD
z7wCsyFdqhI`5xlwm1>y?hENRipgpb}LrQl0Ptw=D4rY^){g{bU(Ww?HHidG!D;Ww~
Z`o(fkJ44+AP)3{lUC9*TLPKfIx15{}b?yKF
--- 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
--- 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'
--- 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
--- 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
--- 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
--- 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
 ===================
 
--- 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