Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I switch to a tag/branch in hg?

Tags:

mercurial

I followed the documentation in https://developer.mozilla.org/En/Developer_Guide/Source_Code/Mercurial and downloaded FF source with:

hg clone http://hg.mozilla.org/mozilla-central/ src 

How can I switch to the FF3.6 'branch' or 'tag'? The documentation said

hg clone http://hg.mozilla.org/releases/mozilla-1.9.2/ 192src 

but I don't want to clone both FF main and FF3.6 twice?

like image 805
n179911 Avatar asked Jan 29 '10 03:01

n179911


People also ask

How do you remove a tag on Mercurial?

If you want to remove a tag that you no longer want, use hg tag --remove . You can also modify a tag at any time, so that it identifies a different revision, by simply issuing a new hg tag command. You'll have to use the -f option to tell Mercurial that you really want to update the tag.

How do I open a closed branch in Mercurial?

You can just hg update to the closed branch then do another hg commit and it will automatically reopen.


1 Answers

Once you have cloned the repo, you have everything: you can then hg up branchname or hg up tagname to update your working copy.

UP: hg up is a shortcut of hg update, which also has hg checkout alias for people with git habits.

like image 107
crazyscot Avatar answered Oct 26 '22 03:10

crazyscot