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	Mon Nov 19 16:05:40 2012 -0800
+++ b/mercurial/commands.py	Wed Nov 28 18:08:51 2012 -0600
@@ -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	Mon Nov 19 16:05:40 2012 -0800
+++ b/mercurial/dirstate.py	Wed Nov 28 18:08:51 2012 -0600
@@ -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:
Binary file tests/bundles/test-invalid-branch-name.hg has changed
--- a/tests/test-alias.t	Mon Nov 19 16:05:40 2012 -0800
+++ b/tests/test-alias.t	Wed Nov 28 18:08:51 2012 -0600
@@ -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	Mon Nov 19 16:05:40 2012 -0800
+++ b/tests/test-branches.t	Wed Nov 28 18:08:51 2012 -0600
@@ -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	Mon Nov 19 16:05:40 2012 -0800
+++ b/tests/test-commandserver.py.out	Wed Nov 28 18:08:51 2012 -0600
@@ -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	Mon Nov 19 16:05:40 2012 -0800
+++ b/tests/test-debugcomplete.t	Wed Nov 28 18:08:51 2012 -0600
@@ -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	Mon Nov 19 16:05:40 2012 -0800
+++ b/tests/test-help.t	Wed Nov 28 18:08:51 2012 -0600
@@ -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	Mon Nov 19 16:05:40 2012 -0800
+++ b/tests/test-phases.t	Wed Nov 28 18:08:51 2012 -0600
@@ -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	Mon Nov 19 16:05:40 2012 -0800
+++ b/tests/test-strict.t	Wed Nov 28 18:08:51 2012 -0600
@@ -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