0

We are switching to Mercurial. We are have been using SVN for a number of years. I recall reading somewhere that Twitter only have two branches in their source control. A production branch and a dev branch. This I think will suit us because we offer a service and there is only one instance of it running and we control it completely so we dont have to worry about versions. Just bring able to do fixes for production and maybe merge that change into dev if the issue exists in the dev branch too.

Is this approach appropriate for Mercurial? Are there any hidden gotchas that we should be aware of? We plan do follow a more traditional layout with release branches for the one or two products that we have that we retail.

uriDium
  • 13,110
  • 20
  • 78
  • 138

3 Answers3

0

Yes, no gotchas. The most recognized branching model, for both Git and Mercurial, can be found here, which gives an outline of a more complexe structure than you are thinking of using.

And even when your environment continue to grow, mercurial will still be able to handle your changing needs.

Vince
  • 3,497
  • 2
  • 19
  • 15
  • 1. "most recognized for Git and still usable in Mercurial" will be fair answer 2. For HGFlow as ready-to-use **product**, not idea and methodology, you must to mention different links [HGFlow on BitBucket](https://bitbucket.org/yinwm/hgflow/wiki/Home) [An Introduction to Hgflow](https://andy.mehalick.com/2011/12/24/an-introduction-to-hgflow) – Lazy Badger May 06 '14 at 19:31
  • @LazyBadger Thanks for the complement. But the reason I wanted to keep the flow as methodology, and not link to the extension just yet, is because HGFlow, although really useful, is not necessary, and it is nice to understand why and how such model exists before using it blindly. – Vince May 08 '14 at 14:48
0

Are there any hidden gotchas that we should be aware of?

Yes, they are, if you will have more than one simultaneous tasks in devel you'll get hardly readable and understandable history with a lot of anonymous branches in devel rather fast

Lazy Badger
  • 94,711
  • 9
  • 78
  • 110
  • @Vince - but, from my POV, Git-Flow **in Mercurial** is just overkill (but a must in Git due to poor "branches" model) – Lazy Badger May 06 '14 at 19:19
0

Yes, Mercurial achieves fully your approach. May be the workflow you are proposing is this. The Mercurial code or the Python code are some examples of development with really few branches.

In Mercurial the default branch is used as default when cloning, so is usually used as the development branch. Other branches are used as feature or stable branches, but is up to you. Actually for not so long features and issues one may use bookmarks on the development branch.

And remember to commit often :)

Community
  • 1
  • 1
santiagopim
  • 556
  • 5
  • 13