Suffering from CVS mindset

Greg Ward greg-hg at gerg.ca
Sun Apr 11 15:00:21 CDT 2010


On Sat, Apr 10, 2010 at 11:34 PM, Yawar Amin <yawar.amin at gmail.com> wrote:
> There's absolutely no need to make a dozen little repositories for a
> dozen little projects. Mercurial can handle your use case just fine.
> It's just that some people like having separate histories for separate
> projects. But even that can be simulated by having named branches which
> are never merged and viewing the log for one branch at a time:
>
> $ hg log -b shell |less
> $ hg log -b perl |less
> $ hg log -b backups |less

Just for the record, that is totally *NOT* how named branches are
supposed to be used.  The canonical use case is this: you have just
released version 1.0 of your spiffy new product.  You need to make
bug-fix releases 1.0.1, 1.0.2, etc., but at the same time you need to
work on new features for 1.1.  So you create a "1.0" branch where you
fix bugs and do maintenance releases, and keep doing new development
work on the default branch.  You periodically merge from 1.0 back to
default to ensure that 1.1 includes all the bug fixes from 1.0.x.

IOW, someone playing around with Mercurial, or using it for small
personal projects, has very little reason to use named branches.

There are other ways to use named branches, but using them as a
substitute for subdirectories is just ... weird.  Sounds like
subversion thinking to me.  ;-)

Greg


More information about the Mercurial mailing list