views:

37

answers:

1

I'm sure this has been answered before/somewhere, as i assume it's a common issue, i just can't find it.

Basically i have a head, of working code, and branches with various code paths. Like normal. Though when i push i do want all of these branches uploaded to the remote repo. I do so with push -f. Now the problem is my current working branch, i guess is considered the head because technically it is newer than what i consider the head branch.

With that said, for the remote repo, i would like the default branch viewed to be .. my.. head (ie, what i consider the head/main code path). Note i am using BitBucket, but i'm assuming this is an issue with Mercurial, not BitBucket.

Any thoughts?

+1  A: 

Well, first I think that some vocabulary must be redefined in order to understand each properly:

  • in Hg, there is basically no distinction between the "main" branch and the others.
    The main branch is identifiable by it's name "default" assigned form the start by HG, but that's all
  • The latest changeset that is placed in a repository, from a commit, a pull or a push, is called the tip. It is one of the branch head, nothing more.

So, what you're observing here is that each time you push your work from your local repository to your BitBucket one, the tip is assigned to the latest commit you did on your local repository. By default, BitBucket start showing you the tip, and as far as I know, ther is no way to change that, but you can easily navigate from one branch to another in the source viewer.

gizmo
Yea, i noticed that there is no traditional head because it changes with every new commit on a branch change.It's sort of annoying if you have a project which you want people to see/use the head, or perhaps a release branch, but you've got a branch titled "weird hack test" as the main thing people see.Anyway, thanks! :)
Lee Olayvar