views:

49

answers:

3

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 couldn't.

How to do that?

+1  A: 

try this:

hg update
mikerobi
it only changed the current revision from one head to another, neither of those being the tip nor the most recent one. But my point is, I want to change the repository itself, so whenever someone clones it, it will already have the tip as the current revision
Jader Dias
`tip` is always the most recent commit in the repository, regardless of where your `default` branch is, as such, if you have two branches, and commit in one, then in the other, and back and forth, `tip` will jump between the two branches for each commit.
Lasse V. Karlsen
@Jader Dias, `hg update`, without any arguments will always update the working copy to `tip`, so I don't understand the first part of your comment.
mikerobi
@mikerobi my client didn't work accordingly to your specifications
Jader Dias
@mikerobi I think the tag `default` I created caused the unexpected behavior
Jader Dias
+1  A: 

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.

Soravux
+7  A: 

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.

Ry4an
+1: Well spotted.
Lasse V. Karlsen
Thanks. Only possible because Jader was good enough to post the repo link. If this had been a private repo we'd all still be stuck.
Ry4an