Author: kwright
Date: Sun Jan 26 12:30:27 2014
New Revision: 1561482
URL: http://svn.apache.org/r1561482
Log:
Debug further, and disable actual commands that change things for the moment.
Modified:
manifoldcf/release-scripts/create_site_branch.py
Modified: manifoldcf/release-scripts/create_site_branch.py
URL:
http://svn.apache.org/viewvc/manifoldcf/release-scripts/create_site_branch.py?rev=1561482&r1=1561481&r2=1561482&view=diff
==============================================================================
--- manifoldcf/release-scripts/create_site_branch.py (original)
+++ manifoldcf/release-scripts/create_site_branch.py Sun Jan 26 12:30:27 2014
@@ -16,7 +16,8 @@ def svn_command(command_array):
def remove_dir(directory_path):
""" Remove a directory and all of its contents """
- shutil.rmtree(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:
@@ -34,7 +35,7 @@ def make_change_txt_release_line(build_v
def add_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" % build_file_path
+ temp_file = "%s.tmp" % change_file_path
fd = codecs.open(change_file_path, "r", "utf-8")
try:
out_fd = codecs.open(temp_file, "w", "utf-8")
@@ -44,7 +45,7 @@ def add_change_file_release_row(change_f
out_fd.write(line)
else:
if match_change_txt_dev_line(line):
-
out_fd.write(make_change_txt_release_line(build_version))
+
out_fd.write(make_change_txt_release_line(release_version))
converted = True
else:
out_fd.write(line)
@@ -67,7 +68,7 @@ def make_change_txt_dev_line(dev_version
def add_change_file_new_dev_row(change_file_path, dev_version):
""" Add a new -dev row to the start of a change file """
added_row = False
- temp_file = "%s.tmp" % build_file_path
+ temp_file = "%s.tmp" % change_file_path
fd = codecs.open(change_file_path, "r", "utf-8")
try:
out_fd = codecs.open(temp_file, "w", "utf-8")
@@ -425,16 +426,18 @@ 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])
+ #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])
+ #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 """
# Basic checks
- if not os.exists(working_directory):
+ if not os.path.exists(working_directory):
raise Exception("Working directory '%s' does not appear to exist" %
working_directory)
if release_version.find("-SNAPSHOT") >= 0 or release_version.find("-dev")
>= 0:
raise Exception("Release version '%s' cannot contain SNAPSHOT or dev"
% release_version)