--- a/rakelib/workflow.rake Thu Nov 24 20:47:41 2016 +0000
+++ b/rakelib/workflow.rake Sat Nov 26 22:19:44 2016 +0000
@@ -73,6 +73,23 @@
end
task :'push-staging' => :'setup'
-
+ desc "(Auto)merge changes (from eXept)"
+ task :'merge' => :'setup' do
+ if not which("hg-automerge.rb") then
+ info "Cannot find 'hg-automerge.rb' in PATH"
+ info "You may find it at https://bitbucket.org/janvrany/jv-scripts"
+ error "Cannot find 'hg-automerge.rb' in PATH"
+ end
+ hg_repositories_failed_to_merge = []
+ hg_repositories do | hg |
+ if File.exist? (hg.path / '.hgautomerge') then
+ info "Merging #{hg.path}"
+ sh "hg-automerge.rb --cwd #{hg.path}"
+ else
+ info "Not merging #{hg.path} - no merge config found."
+ info "To configure run: 'hg-automerge.rb --cwd #{hg.path} --config'"
+ end
+ end
+ end
end