Question about named branches

Ian Lewis ianmlewis at
Fri Mar 28 05:13:24 CDT 2008

Ok, I feel your pain. I used to use named branches for that reason too. But
I gave up using them given the lack of support for them in all the tools.
hgtk (hg view) will show the branches but not the names. hg web will show
them but the changelogs are a merged view of all changes regardless of which
named branch they were in. I had enough of a hard time keeping track of what
changes were made in what branch and when (including merging into other
branches) that I just decided to not use them anymore. Now if the change is
in the branch, it's there, if not it's not.

Anyway, I suppose that the simple answer is no. There isn't a way to
selectively push one named branch and not another.  Someone better in
mercurial-foo could maybe help you out better, but the only way I can think
of, off hand, to send changes selectively is by exporting and importing the
changesets (using hg export/import).


2008/3/28, Trygve Laugstøl <trygvis at>:
> Ian Lewis skrev:
> > Trygve,
> >
> > This is one of the problems of using named branches. You cannot
> > selectively push named branches. If each developer has his own
> > repository why are you creating named branches for each developer? Each
> > developer essentially has his own branch just by nature of having his
> > own clone of the repository. And determining who committed what change
> > can be maintained by user name.
> Because I want to easily be able to just update to a different branch to
> get the few files that has changed and not have to stop all the servers,
> open a new workspace in my IDE and restart everything.
> Using named branches make this whole process very easy, in particular
> now that all three developers are experimenting (new technology, new
> application) a lot on each our own different parts of the applications.
> The whole reason for us to try out mercurial was to be able to share
> changes easily without everything having to go on trunk.
> --
> Trygve
> > Ian
> >
> > 2008/3/28, Trygve Laugstøl <trygvis at <mailto:trygvis at>>:
> >
> >     Hi
> >
> >     Given this situation:
> >
> >     * Each developer has its own repository
> >     * Each developer has a branched named the same as their user id
> >     * Each developer pulls from the other repository of the developers
> >
> >     Then when after I've pulled in the work from developer A to try it
> out,
> >     I continue to work on my own branch with more commits. When I want
> to
> >     push my changes to my (personal) remote repository it fails because
> it
> >     would create multiple heads. I can fix this by giving a revisition
> to
> >     push [1], but then I first have to do "hg id" to find the revision.
> >
> >     Is there any way to get hg push to only push changes that are on my
> >     branch?
> >
> >     [1]: speaking of pushing revision, will it include all missing
> dependent
> >     changesets when pushing, or only the one I'm giving as an argument?
> >
> >
> >     --
> >     Trygve
> >     _______________________________________________
> >     Mercurial mailing list
> >     Mercurial at <mailto:Mercurial at>
> >
> >
> >
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Mercurial mailing list