开发者

How to change the default revision in Mercurial?

开发者 https://www.devze.com 2023-01-19 01:15 出处:网络
When I clone the following project http://code.google.com/p/signal-detector/source it comes in the revision marked as default, that isn\'t the latest nor the tip revision.

When I clone the following project

http://code.google.com/p/signal-detector/source

it comes in the revision marked as default, that isn't the latest nor the tip revision.

I tried many merges to make the latest revision to become default, but I 开发者_StackOverflow中文版couldn't.

How to do that?


I think I see what happened, you created a tag named default and you shouldn't. In the absence of a tag default gets you the most tip-ward changeset with the branch name default. However, since you have a tag named default that points to revision c257bbab2cf6c87b2c212aadbdd76f14c71e1ee2 you're getting that as the default update instead.

Delete the tag with:

hg tag --remove default

and I think you'll get the behavior you're expecting.


try this:

hg update


I assume the default tag you see isn't about the revision but the branch you're working on. That being said, check your current active heads by typing this:

hg heads

If you've got multiple heads, that means that you haven't merged everything back to the core line of the actual branch. If it is the case, commit all your work (which will fall automatically into a new temporary branch). Then, pull the last revision from the source and then merge :

hg pull && hg merge

If there is a problem while on the pull/merging stage, try updating your current repository to a clean one by issuing this command:

hg update -C # Only if you've got problems with the previous command!

And then retry the merge operation.

I may have misunderstood your problem since I couldn't grasp all of your environment status, if it is the case, please excuse me.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号