From f351e2dcf0c133c7e800f09f9a6f65146d856bde Mon Sep 17 00:00:00 2001 From: James Turnbull Date: Wed, 14 Apr 2010 18:46:52 +1000 Subject: Renamed all references to Reductive Labs to Puppet Labs --- tasks/rake/git_workflow.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tasks/rake/git_workflow.rake') diff --git a/tasks/rake/git_workflow.rake b/tasks/rake/git_workflow.rake index b2f96c603..5ef568c7b 100644 --- a/tasks/rake/git_workflow.rake +++ b/tasks/rake/git_workflow.rake @@ -1,5 +1,5 @@ # This set of tasks helps automate the workflow as described on -# http://reductivelabs.com/trac/puppet/wiki/Development/DevelopmentLifecycle +# http://puppetlabs.com/trac/puppet/wiki/Development/DevelopmentLifecycle def find_start(start) -- cgit From 631c5a8e455808dbc919211b5151fd501f6475c9 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Tue, 9 Nov 2010 13:35:59 -0800 Subject: Maint: Add "Local-branch:" info to mails sent by "rake mail_patches" --- tasks/rake/git_workflow.rake | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'tasks/rake/git_workflow.rake') diff --git a/tasks/rake/git_workflow.rake b/tasks/rake/git_workflow.rake index b2f96c603..c275bba3f 100644 --- a/tasks/rake/git_workflow.rake +++ b/tasks/rake/git_workflow.rake @@ -103,10 +103,21 @@ task :mail_patches do # Create all of the patches sh "git format-patch -C -M -s -n --subject-prefix='PATCH/puppet' #{parent}..HEAD" + # Add info to the patches + additional_info = "Local-branch: #{branch}\n" + files = Dir.glob("00*.patch") + files.each do |file| + contents = File.read(file) + contents.sub!(/^---$/, "#{additional_info}---") + File.open(file, 'w') do |file_handle| + file_handle.print contents + end + end + # And then mail them out. # If we've got more than one patch, add --compose - if Dir.glob("00*.patch").length > 1 + if files.length > 1 compose = "--compose" else compose = "" -- cgit From bf11e7c7aa4ce3337c6697d0b25ee2cdd28ba10c Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Thu, 11 Nov 2010 10:18:04 -0800 Subject: Maint: Move "Local-branch:" info below "---" When running "rake mail_patches", moved the "Local-branch:" info lines below the "---" line in the e-mail, so that if someone applies the patch using "git am", the "Local-branch" notation won't show up in the commit message. --- tasks/rake/git_workflow.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tasks/rake/git_workflow.rake') diff --git a/tasks/rake/git_workflow.rake b/tasks/rake/git_workflow.rake index c275bba3f..4c39f98de 100644 --- a/tasks/rake/git_workflow.rake +++ b/tasks/rake/git_workflow.rake @@ -108,7 +108,7 @@ task :mail_patches do files = Dir.glob("00*.patch") files.each do |file| contents = File.read(file) - contents.sub!(/^---$/, "#{additional_info}---") + contents.sub!(/^---\n/, "---\n#{additional_info}") File.open(file, 'w') do |file_handle| file_handle.print contents end -- cgit