News for hackers. Stuff that matters.
Re:Scaling Mercurial at Facebook by natrius on Tuesday January 07, 2014 @04:14PM (#7019983)
Branches are my biggest pain point in Mercurial. What branching workflow does Facebook use?
Re:Scaling Mercurial at Facebook by fhd2 on Wednesday January 08, 2014 @03:12AM (#7022360)
Same here. As outlined below, we tried to use bookmarks for feature branches a few times and it either doesn't work or we can't figure it out. We used permanent branches for feature branches for a while, but too many of those (even closed) would slow down the repository eventually.

Our coping strategy is MQ. It's not the same, but solves the problem pretty well IMO. MQ patches can be sent around and backed up, so not being able to push them to the server is not such a big issue. Takes a little upfront investment to figure out how they work though, Mozilla has a pretty good guide [1].

[1]: https://developer.mozilla.org/en/docs/Mercurial_Queues

Re:Scaling Mercurial at Facebook by k_bx on Tuesday January 07, 2014 @04:17PM (#7020002)
Why not use standard mercurial branches? At least you're able to say in which branch commit was done and draw a clean history for them.
Re:Scaling Mercurial at Facebook by natrius on Tuesday January 07, 2014 @05:05PM (#7020325)
I do use standard Mercurial branches, and I vastly prefer Git's model. I ask because there might be a better way to use them that I've overlooked.
Re:Scaling Mercurial at Facebook by masklinn on Tuesday January 07, 2014 @05:44PM (#7020528)
Mercurial's equivalent to git branches (movable pointer to a commit rather than embedded commit metadata) is bookmarks.
Re:Scaling Mercurial at Facebook by fhd2 on Wednesday January 08, 2014 @03:08AM (#7022342)
From what I've seen, bookmarks are not "branches" in any sense, really just pointers to commits.

I've tried several times to use bookmarks for feature branches (read: branches developed in parallel to each other and the default branch). I thought I just can't figure it out, but it really seems impossible at this point.

Re:Scaling Mercurial at Facebook by masklinn on Wednesday January 08, 2014 @04:49AM (#7022609)
> From what I've seen, bookmarks are not "branches" in any sense, really just pointers to commits.

That's exactly what git branches are.

Re:Scaling Mercurial at Facebook by michal8181 on Wednesday January 08, 2014 @03:46PM (#7026482)
Branches in git are exactly pointers to graph. If you delete such a pointer you loose your branch.

Even worse - with next git gc you will loose your data as parts of graph with no pointer is assumed to be dead by git.

Re:Scaling Mercurial at Facebook by k_bx on Wednesday January 08, 2014 @05:07AM (#7022655)
What do you mean by "git model"? Creating branch per feature? But that's exactly what I do in mercurial!
Re:Scaling Mercurial at Facebook by durin42 on Tuesday January 07, 2014 @04:31PM (#7020103)
In what way? Have you looked at bookmarks?
Re:Scaling Mercurial at Facebook by natrius on Tuesday January 07, 2014 @05:01PM (#7020299)
I have. I'm wondering if they use bookmarks or named branches, and what strategies they've arrived at to work with either.
Re:Scaling Mercurial at Facebook by durin42 on Tuesday January 07, 2014 @06:18PM (#7020700)
I'm pretty sure they're using a bookmarks workflow.