KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm using default branch for ongoing development, and now going to create a new named branch to mark a release. All further development will be on the default branch, all production bugfixes will be done on the new one (with subsequent merge to default ), like this: #>hg branches aristotle 42:dbd... default 41:da5... #>hg branch default #>echo "Feature #1 for the next release" >> feature1.txt #>hg add #>hg commit -m "Implement feature #1 for the next release" ...... eek, need to make an urgent fix on Production ..... #>hg update aristotle #>echo "Fixed urgent bug #123 on Production" >> fix123.txt #>hg add #>hg commit -m "Fixed bug #123 on Production" created new head #>hg update default #>hg merge aristotle 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, dont forget to commit) #>hg commit -m "Merge in the fix for bug #123" #>hg push The above seems the way to go, however it seems easy to mess things up and merge the other way around (from default to aristotle which means all the new features will appear in the production branch). Maybe my fears are groundless because one will notice the mess before pushing the commit to the central repo, but I'd like to see if it's possible to make the approach more foolproof. So I started looking into hooks: [hooks] pretxnchangegroup.branch = hg heads --template "{branches} " | find "aristotle" && exit 1 || exit 0 ..but then realized it's not what I need, because this will not allow me to push aristotle changes at all. So I'm not sure what to do. Ideally, I want developers to see the "wrong way merge" message when they attempt to commit a merge from default to aristotle locally (obviously, there should be a d
Tags (comma-separated)
Save Edits
Cancel