"named branches" vs "bookmarks" FUD
Matt Mackall
mpm at selenic.com
Fri Jan 3 16:04:18 UTC 2014
On Fri, 2014-01-03 at 18:33 +0300, anatoly techtonik wrote:
> I feel fear when touching named branches in Mercurial.
> I tried to track it down:
>
>
> "Many people don’t like cluttering up changeset metadata with branch
> names, especially if they’re small branches that are going to be
> merged pretty quickly."
> http://stevelosh.com/blog/2009/08/a-guide-to-branching-in-mercurial/#branching-with-named-branches
>
> fear 1. cluttering changeset metadata
>
>
> $ hg branch versions
> marked working directory as branch versions
> (branches are permanent and global, did you want a bookmark?)
>
>
> fear 2. warning
> uncertainty 1. permanent and global are bad
>
> "it is almost never a good idea to use this facility for short-term
> branching, since branches created this way are inherently “eternal”"
> http://mercurial.selenic.com/wiki/BranchingExplained
> pointed by
> http://bryan-murdock.blogspot.com/2012/01/what-is-so-wrong-with-mercurials-named.html
>
> fear 3. named branches are inherently "eternal"
> fear 4. inherently "eternal" is evil
> uncertainty 2. named branches are bad for short-term branching
>
>
> So, looking at all these sources of *semi-official* FUD, I wonder -
> are there some inherent problems with Mercurial internals that affect
> performance or other aspects that make Mercurial developers impose
> specific workflow (avoid short-term named branched) on its users?
>
> Otherwise I don't see why people should be discouraged of using them.
> Tagging series of changesets with meaningful names makes project history
> better, not worse.
Here's the short version:
- we introduced a named branch feature very similar to the feature
present historically in every other SCM except Git
- many people tried to use it like the completely different history-less
feature with the same name in Git based on blindly copying Git howtos
- these people who had clearly never read the named branch docs or ever
used any SCM other than Git complained when they couldn't get rid of the
branches they created
- such people showed up to complain on a daily basis for a couple years
- we eventually got sick of their whining
- we put in warnings
- they've mostly shut up (woo!)
We have users with thousands of named branches in production and have
done tests on up to 10k branches and the performance impact is fairly
minimal.
The warnings are there for gitwits, if you have reading comprehension
skills, please proceed.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list