Null characters in branch name?
Rick Rankin
rrankin1424+hg at gmail.com
Wed Aug 20 23:38:53 UTC 2014
Well, turns out I figured out how to fix the problem. One way, at least, is
to use the "convert" extension using the branchmap feature. From the "od"
output of the "hg branches" command, it's apparent that the bad branch name
has exactly 8 null characters. I created a branchmap file containing a from
name with 8 nulls and a to name of "null-branch":
^@^@^@^@^@^@^@^@ null-branch
where ^@ represents a null character. Then, I used the command
hg convert --branchmap branchmap repo-with-null-branch-name new-repo
After looking at the new-repo, all seems fine.
Maybe this will help someone else someday.
Rick
On Wed, Aug 20, 2014 at 1:32 PM, Rick Rankin <rrankin1424+hg at gmail.com>
wrote:
> Hi,
>
> I've managed to create a branch name with null characters in it. I have no
> idea how/when this happened, but I just discovered it. This is what I'm
> seeing:
>
> $ hg branches | od -a
> 0000000 p y t h o n 3 sp sp sp sp sp sp sp sp sp
> 0000020 sp sp sp sp sp sp sp sp sp sp sp sp 1 0 0 3
> 0000040 : 4 8 4 7 2 1 a 0 9 7 1 a nl d e
> 0000060 f a u l t sp sp sp sp sp sp sp sp sp sp sp
> 0000100 sp sp sp sp sp sp sp sp sp sp 1 0 0 1 : b
> 0000120 3 b 5 2 b 0 4 e f 5 4 sp ( i n a
> 0000140 c t i v e ) nl *nul nul nul nul nul nul nul nul* sp
> 0000160 sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp
> 0000200 sp sp sp sp 6 8 8 : 0 1 c 4 8 2 9 f
> 0000220 2 b 3 5 sp ( i n a c t i v e ) nl
> 0000240 e x p e r i m e n t a l sp sp sp sp
> 0000260 sp sp sp sp sp sp sp sp sp sp sp sp sp 5 5 5
> 0000300 : b 6 e d 8 6 9 c 9 a 9 1 sp ( i
> 0000320 n a c t i v e ) nl
>
> Does anyone have any idea how to fix it? The "standard" method for
> renaming a branch involves updating to the branch whose name you want to
> change, but that doesn't (seem to) work.
>
> I'd appreciate any advice,
>
> Rick
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20140820/54b51416/attachment-0002.html>
More information about the Mercurial
mailing list