Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

hg-flow and appharbor

John Smith July 18, 2012

i have noticed that appharbor deploys on anything named master or default, is there anyway i can change hg-flow to use different branch names now that i am already using it

currently i have

- default (gets deployed by appharbor automatically

- develop (gets built but not deployed)

- master (gets deployed by appharbor automatically)

I think I need to rename master to something else in hg-flow, in fact what does the master branch get used for?

brilliant product by the way :)

5 answers

1 accepted

1 vote
Answer accepted
stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 18, 2012

If you're running Mercurial you should only have a 'default' branch rather than a 'master' branch (the latter being a git convention). Both of the 'flows' have a concept of a 'production branch' which is the one that you deploy - it defaults to 'master' on git-flow and 'default' on hg-flow, so this should all work out correctly with AppHarbor. Are you saying you have a 'default' AND a 'master' branch? If so I'm not sure how that's happened, that's not the standard setup.

Is it that you configured the production branch to be 'master' when you initialised hg-flow? As I say, SourceTree should have initialised it to 'default' if you initialised hg-flow in it.

You can change which branch is which but you have to be quite careful to keep things consistent. You can edit the '.flow' file in the root of your repository, and the production branch is the line that says "master = blah" (I know, 'master' is confusing here - I wish they'd called it "production = blah"). Usually, that would say "master = default" for the standard hg-flow setup, but it can be different. Personally, I like to stick to the standard setup, it's simpler.

If you change it, you have to make sure that whatever you change it to is an existing branch, and is at the correct point in the history to reflect your production build. Then you can edit the .flow file, save and commit.

Unfortunately you also then have to switch to *every* open branch, make the same change to the .flow file, and save/commit. This is *vital*. If you don't do this, you could have an inconsistent hg-flow configuration depending on what branch you're currently on, which is a potential source of massive pain.

HTH!

John Smith July 19, 2012

thank you that seems to have worked a treat!

awesome stuff...

thanks. great product, great flow, great support and by the looks of things great community

:)

John Smith July 19, 2012

so just for the record, i didnt choose a git workflow on purpose as mercurial was the choice i made after leaving svn (ex windows dev). however i am very mouse click happy so definitley didnt read any instructions or anything so this probably isnt a bug but a click happy developer issue :)

thanks again!

0 votes
stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 19, 2012

I ran a quick test with a new hg repo, clicking 'Hg Flow' brings up the initialisation settings with the 'default' branch chosen as the production branch, and accepting that definitely uses 'default' and doesn't create a 'master' branch. So not sure what happened there, perhaps you accidentally typed 'master' in the top field after reading some documentation that referred to it like that?

Anyway, glad you have it sorted out now.

0 votes
John Smith July 19, 2012

wait.... i think its gone, just really follwed steves instructions but had to merge and commit and push so all 3 branches were the same.

then i could close, commit and push the master branch leaving me with.....

default - (production and appharbor branch)

deveolopment (well you get the idea)

awesome stuff...

thanks. great product, great flow, great support and by the looks of things great community

:)

0 votes
John Smith July 19, 2012

gahh i cannot get rid of master!!

it will not go away!

0 votes
John Smith July 18, 2012
firstly thanks for such a quick and detailed response! so master is something that just appeared when I installed the latest version of the software on my mac, I don't really want it as I've been used to default as my production branch (my only branch up until hg-flow) ok so I'm at home now and I'll try your suggestions to get rid of master and use default as my production branch which is exactly what I want. I'll post my findings here tomorrow thanks again john

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events