How to clone a specific tag version using Mercurial?

3.1k Views Asked by At

I'm trying to clone a specific tag from an existing repository from Kiln using Mercurial.

I have tried commands like:

hg clone --verbose [Source URL] -b [tag number] [Dest]

hg clone --verbose [Source URL] -r [tag number] [Dest]

hg clone --verbose [Source URL]/#[tag number] [Dest]

hg clone --verbose [Source URL]/[tag number] [Dest]

but nothing works.

1

There are 1 best solutions below

3
Boris Feld On

you can clone a specific commit hash or a specific branch but I'm afraid you can't clone a tag.

The best solution I see is for you to get the commit hash for the tag via the web interface of the repository and use the hash for cloning with this syntax:

hg clone --verbose [Source URL] -r [tag number] [Dest]