[PATCH] convert: correct the documentation about whitespace in branchmap branches

Augie Fackler raf at durin42.com
Sat Jun 10 10:03:55 EDT 2017


queued, thanks

> On Jun 10, 2017, at 2:24 AM, Matt Harbison <mharbison72 at gmail.com> wrote:
> 
> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1497075614 14400
> #      Sat Jun 10 02:20:14 2017 -0400
> # Branch stable
> # Node ID 8271660cd51939062c9e98c22b4b5e27b4fddcb3
> # Parent  2ab1aea34c42a78946b6a6f2415bbb290660d53f
> convert: correct the documentation about whitespace in branchmap branches
> 
> Might as well let the users know they can get rid of branch names with spaces.
> 
> diff --git a/hgext/convert/__init__.py b/hgext/convert/__init__.py
> --- a/hgext/convert/__init__.py
> +++ b/hgext/convert/__init__.py
> @@ -182,8 +182,8 @@
> 
>     where "original_branch_name" is the name of the branch in the
>     source repository, and "new_branch_name" is the name of the branch
> -    is the destination repository. No whitespace is allowed in the
> -    branch names. This can be used to (for instance) move code in one
> +    is the destination repository. No whitespace is allowed in the new
> +    branch name. This can be used to (for instance) move code in one
>     repository from "default" to a named branch.
> 
>     Mercurial Source
> diff --git a/tests/test-convert.t b/tests/test-convert.t
> --- a/tests/test-convert.t
> +++ b/tests/test-convert.t
> @@ -125,9 +125,9 @@
> 
>       where "original_branch_name" is the name of the branch in the source
>       repository, and "new_branch_name" is the name of the branch is the
> -      destination repository. No whitespace is allowed in the branch names. This
> -      can be used to (for instance) move code in one repository from "default"
> -      to a named branch.
> +      destination repository. No whitespace is allowed in the new branch name.
> +      This can be used to (for instance) move code in one repository from
> +      "default" to a named branch.
> 
>       Mercurial Source
>       ################
> @@ -581,3 +581,30 @@
>   branch=default
>   convert_revision=a3bc6100aa8ec03e00aaf271f1f50046fb432072
>   convert_source=mysource
> +
> +  $ cat > branchmap.txt << EOF
> +  > old branch new_branch
> +  > EOF
> +
> +  $ hg -R a branch -q 'old branch'
> +  $ echo gg > a/g
> +  $ hg -R a ci -m 'branch name with spaces'
> +  $ hg convert --branchmap branchmap.txt a d
> +  initializing destination d repository
> +  scanning source...
> +  sorting...
> +  converting...
> +  6 a
> +  5 b
> +  4 c
> +  3 d
> +  2 e
> +  1 g
> +  0 branch name with spaces
> +
> +  $ hg -R a branches
> +  old branch                     6:a24a66ade009
> +  default                        5:a3bc6100aa8e (inactive)
> +  $ hg -R d branches
> +  new_branch                     6:64ed208b732b
> +  default                        5:a3bc6100aa8e (inactive)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel



More information about the Mercurial-devel mailing list