I'm a little confused about how to rollback to a tag in Mercurial. (that I am very new)
Let's say I have a tag called "Version 1.0" that was a few times ago. let's say we're on r400 now
Now, if my managers told me that they donโt like the direction that things are going, and basically want to drop everything starting with this tag and return to version 1.0.
Well, I can check this tag with
hg update -r Version 1.0
Ok, now I will return to the tag version 1.0, and if I do not need to make changes, everything will be fine. However, as soon as I make changes and make it, I now have 2 heads (my new changes in versions 1.0 and r400 are what managers want to align).
So now I need to integrate with r400. I do not want. (I really do not want to erase all these changes from the earth, I would like them to remain in my history, so I can return to them later if the leadership changes their minds again), but at present I donโt want anyone to either of them.
What should I do?
Update
The answer says:
You can clone the entire repository to a tag, and then use this clone as your "new" central repository.
If my central repository is hosted on bitbucket, I'm not sure how to do this. If the current one is located at the URL https://jisaacks@bitbucket.org/jisaacks/hgml, and I want to clone it to a tag for a new repo with a name hgml2(which does not exist yet) I tried this command locally on my machine:
hg clone -r Version-1.0 https://jisaacks@bitbucket.org/jisaacks/hgml https://jisaacks@bitbucket.org/jisaacks/hgml2
I get this error:
abort: cannot create new http repository