Using branches

Dustin Sallings dustin at spy.net
Thu Jul 12 15:20:33 CDT 2007


On Jul 12, 2007, at 12:33 , Charles Pope wrote:

> I am looking at Mercurial and trying to understand how branches  
> work within
> a repository. I can see how to name a branch, but I don't  
> understand how you
> can switch between branches. I don't see a command to move to a  
> different
> branch. Once I have branches, what is the command to merge changes  
> from one
> branch into another? I have experimented, but the resultant file  
> doesn't
> seem to contain any merges.

	hg update [branchname]

	You probably don't want to do that with uncommitted work.

> Is it the case for branches that I really need multiple copies of the
> repository representing the different branches?

	It's hard to say which way is better.  I come from old-school  
distributed revision control, so multiple-heads within a single tree  
*feels* kind of wrong, but it's not too bad.

-- 
Dustin Sallings




More information about the Mercurial mailing list