What is a branch?

Martin Geisler mg at daimi.au.dk
Fri Feb 15 09:42:27 CST 2008


"Bela Babik" <teki321 at gmail.com> writes:

>>  What does a brach give in the situation above that I wouldn't get by
>>  just committing another child revision to Cf, and thereby creating two
>>  heads in the repository?
>>
>>  Is the point that by changing the branch name, I label changesets Cb1,
>>  Cb2, etc., and then it will be easier to see where changes come from
>>  when I merge these changesets with the development trunk?
>
> Yes. If you have like 10 heads, then it is easier to identify them if
> you have a name attached to them.
>
> For me to use a clone is not an option. The code what I am tracking
> can be used only on one path.

Yeah, I have the same problem with multiple clones: I have to update
PYTHONPATH to point to the one I am working on at the moment.

I have just tried out the local branch extension:

  http://www.selenic.com/mercurial/wiki/index.cgi/LocalbranchExtension

and it seems to do what I was looking for: it allows me to use what is
essentially multiple clones but use only one working copy! Very cool!

I was initially put off by its description here

  http://www.selenic.com/mercurial/wiki/index.cgi/LocalBranches

where it says that it is **experimental**. But is seems to work nicely
with my recent Mercurial. Could this extension not be bundled with
Mercurial, or even better: could its functionality not be included in
the normal branch command?

That would be a very cool feature -- I have recently introduced
Mercurial to a collegue, and the first thing he asked was how he could
easily work on several clones but avoid updating PYTHONPATH all the
time... So I think people would appreciate having this extension in the
standard distribution.

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multi-Party Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial/attachments/20080215/497b0de1/attachment.pgp 


More information about the Mercurial mailing list