Search code examples
gitmercurialhg-git

How can I remove or fix a Mercurial tag that starts with a double quote?


I am trying to use hggit to migrate a very large repository from Mercurial to Git.

It is failing because we have, in the bowels of our hg repository, a tag named precisely like this:

"_5.3.0.307

That double-quote is there at the beginning. It likely got there years ago from a wayward script.

I tried to use the following command line commands to remove it, but all resulted in errors showing a stack trace:

hg tag --remove "_5.3.0.307

hg tag --remove ""_5.3.0.307"

hg tag --remove '"_5.3.0.307'

Note: those are naked, surrounded by double quotes, and surrounded by single quotes respectively.

Any idea on how to either remove or fix the tag name?

Any idea how to get hggit to accept or ignore this tag?


Solution

  • You can|could use more easier way. From hg help tag

    To facilitate version control, distribution, and merging of tags, they are
    stored as a file named ".hgtags" which is managed similarly to other
    project files and can be hand-edited if necessary.
    

    i.e. - edit file, delete string (or just edit it) and commit