[PATCH] branch: don't warn about branches if repository has multiple branches already

Gregory Szorc gregory.szorc at gmail.com
Wed May 27 18:35:23 CDT 2015


On Wed, May 27, 2015 at 2:52 PM, Matt Mackall <mpm at selenic.com> wrote:

> On Wed, 2015-05-27 at 07:51 -0700, Gregory Szorc wrote:
> > > On May 26, 2015, at 13:02, Matt Mackall <mpm at selenic.com> wrote:
> > >
> > > # HG changeset patch
> > > # User Matt Mackall <mpm at selenic.com>
> > > # Date 1432332539 18000
> > > #      Fri May 22 17:08:59 2015 -0500
> > > # Node ID da0105aee52a058e03db3e9c9a187962efc0c7db
> > > # Parent  6ac860f700b5cfeda232d5305963047696b869ca
> > > branch: don't warn about branches if repository has multiple branches
> already
> > >
> > > This warning exists to prevent git users from prematurely polluting
> > > their namespace when trying out Mercurial. But for repos that already
> > > have multiple branches, understanding what branches are is not
> > > optional so we should just shut up.
> > >
> >
> > I'm not crazy about this. All it takes is one person in the history of
> > the repo to create a branch to cause this warning to disappear. The
> > probability of this approaches 1 over time. This change pretty much
> > guarantees that first time hg users on existing repos won't see the
> > warning.
>
> I was worried that this was your oblique way to say "this patch
> accidentally takes closed branches into account", and indeed this is
> true. So I've updated the patch to check for at least one open branch
> not named default to disable the warning.
>

Taking count of open branches into account assuages some of my concerns. I
still don't think it's great. e.g. large projects may have long-running
open release branches. But it's better than v1.

It would be really nice if there was a concept of one time or at most N
time warnings for helpful messages like this. But designing said system is
scope bloat. I think the new version is good enough. Thanks for changing it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20150527/46066cfd/attachment.html>


More information about the Mercurial-devel mailing list