You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2014/01/26 16:11:21 UTC

svn commit: r1561503 - in /manifoldcf/release-scripts: create_release_branch.py create_site_branch.py

Author: kwright
Date: Sun Jan 26 15:11:21 2014
New Revision: 1561503

URL: http://svn.apache.org/r1561503
Log:
Finish debugging

Added:
    manifoldcf/release-scripts/create_release_branch.py
      - copied, changed from r1561501, manifoldcf/release-scripts/create_site_branch.py
Removed:
    manifoldcf/release-scripts/create_site_branch.py

Copied: manifoldcf/release-scripts/create_release_branch.py (from r1561501, manifoldcf/release-scripts/create_site_branch.py)
URL: http://svn.apache.org/viewvc/manifoldcf/release-scripts/create_release_branch.py?p2=manifoldcf/release-scripts/create_release_branch.py&p1=manifoldcf/release-scripts/create_site_branch.py&r1=1561501&r2=1561503&rev=1561503&view=diff
==============================================================================
--- manifoldcf/release-scripts/create_site_branch.py (original)
+++ manifoldcf/release-scripts/create_release_branch.py Sun Jan 26 15:11:21 2014
@@ -16,8 +16,8 @@ def svn_command(command_array):
 
 def remove_dir(directory_path):
     """ Remove a directory and all of its contents """
-    #shutil.rmtree(directory_path)
-    print "Pretend cleanup '%s'..." % directory_path
+    shutil.rmtree(directory_path)
+    #print "Pretend cleanup '%s'..." % directory_path
 
 def match_change_txt_dev_line(line):
     """ Find a line looking like this:
@@ -32,7 +32,7 @@ def match_change_txt_dev_line(line):
 def make_change_txt_release_line(build_version):
     return "======================= Release %s =====================\r\n" % build_version
 
-def add_change_file_release_row(change_file_path, release_version):
+def set_change_file_release_row(change_file_path, release_version):
     """ Convert the -dev row in a change file to a release row """
     converted = False
     temp_file = "%s.tmp" % change_file_path
@@ -81,6 +81,7 @@ def add_change_file_new_dev_row(change_f
                         out_fd.write(make_change_txt_dev_line(dev_version))
                         out_fd.write("\r\n")
                         out_fd.write("\r\n")
+                        out_fd.write(line)
                         added_row = True
                     else:
                         out_fd.write(line)
@@ -429,13 +430,13 @@ def checkout_tree(tree_directory_path, s
 
 def commit_tree(tree_directory_path, commit_message):
     """ Commit the svn tree using the specified commit message """
-    #svn_command([ "-m", commit_message, "commit", tree_directory_path])
-    print "Pretend commit..."
+    svn_command([ "-m", commit_message, "commit", tree_directory_path])
+    #print "Pretend commit..."
 
 def create_branch(trunk_url, branch_url, branch_message):
     """ Create a branch with the given branch message """
-    #svn_command([ "-m", branch_message, "copy", trunk_url, branch_url])
-    print "Pretend create branch..."
+    svn_command([ "-m", branch_message, "copy", trunk_url, branch_url])
+    #print "Pretend create branch..."
 
 def create_release_branch(release_version, new_trunk_version, working_directory):
     """ Create a release branch, and modify trunk also to reset versions """
@@ -460,7 +461,7 @@ def create_release_branch(release_versio
 
     # First, tie off trunk.  Then we can branch.
     # Add change file release row.
-    add_change_file_release_row(trunk_changes_file, release_version)
+    set_change_file_release_row(trunk_changes_file, release_version)
     # Update build.xml
     fix_build_xml(trunk_build_xml_file, release_version)
     # Update poms