Rebasing and Branches

Colin Caughie c.caughie at indigovision.com
Thu Aug 13 08:03:32 UTC 2009


> On Aug 11, 6:07 pm, Stephen Rasku <mercur... at srasku.net> wrote:
> > I just checked in a change to my local repository and then did a
> pull
> > from the main repository.  This put my checkin onto a branch as I
> > wanted.  I then pushed -f to the main repository to preserve my
> > branch.  However, this makes my commit the new tip.
>
> I find the behavior to make that commit the new tip a bit strange.
> If
> someone pulls my changes and commits his things on top his commits
> go
> onto my branch instead of the 'trunk'. So after each pull-update,
> one
> has to make sure not to commit on the branch of someone else. In the
> worst case one needs to search for the ancestor where the branch
> started and update to that revision before committing.

Isn't this what named branches are for?

I can't imagine a scenario where it's useful to push multiple heads to the master repo without distinguishing them somehow. Named branches give you a great means of distinguishing them; as long as you have at most one head per named branch in the master repo, you know exactly where you are and rebase etc. will do the right thing.

Colin


Latest News at: http://www.indigovision.com/news2009.php




More information about the Mercurial mailing list