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/04/15 08:48:39 UTC
svn commit: r1587450 - in /manifoldcf/release-scripts:
create_release_branch.py update_release_branch.py
Author: kwright
Date: Tue Apr 15 06:48:39 2014
New Revision: 1587450
URL: http://svn.apache.org/r1587450
Log:
Update branch scripts to pass stderr, stdout, stdin directly through from svn
Modified:
manifoldcf/release-scripts/create_release_branch.py
manifoldcf/release-scripts/update_release_branch.py
Modified: manifoldcf/release-scripts/create_release_branch.py
URL: http://svn.apache.org/viewvc/manifoldcf/release-scripts/create_release_branch.py?rev=1587450&r1=1587449&r2=1587450&view=diff
==============================================================================
--- manifoldcf/release-scripts/create_release_branch.py (original)
+++ manifoldcf/release-scripts/create_release_branch.py Tue Apr 15 06:48:39 2014
@@ -9,12 +9,11 @@ import codecs
def svn_command(command_array):
""" Invoke svn command """
popen = subprocess.Popen(["svn"] + command_array,
- stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- out,err = popen.communicate()
+ stdout=None, stderr=None, stdin=None)
+ popen.communicate()
rcode = popen.returncode
if rcode != 0:
- raise Exception("svn invocation errored with code %d: %s" % (rcode,err))
- return out
+ raise Exception("svn invocation errored with code %d" % rcode)
def remove_dir(directory_path):
""" Remove a directory and all of its contents """
@@ -466,6 +465,7 @@ def create_release_branch(release_versio
trunk_build_xml_file = "%s/build.xml" % trunk_dir
# Check out trunk.
+ print >>sys.stderr, "Checking out trunk..."
checkout_tree(trunk_dir, trunk_url)
# First, tie off trunk. Then we can branch.
@@ -477,19 +477,24 @@ def create_release_branch(release_versio
update_poms(trunk_dir, release_version)
# Commit trunk
+ print >>sys.stderr, "Committing trunk release version tie-off..."
commit_tree(trunk_dir, "Tie off release %s" % release_version)
# Now, create branch!!
+ print >>sys.stderr, "Creating release branch..."
create_branch(trunk_url, branch_url, "Create a release branch for MCF %s" % release_version)
# Second round of changes: Modify trunk for next -dev cycle
add_change_file_new_dev_row(trunk_changes_file, new_trunk_version)
fix_build_xml(trunk_build_xml_file, "%s-dev" % new_trunk_version)
update_poms(trunk_dir, "%s-SNAPSHOT" % new_trunk_version)
+ print >>sys.stderr, "Committing trunk version increment..."
commit_tree(trunk_dir, "Prepare trunk for %s development" % new_trunk_version)
# Finally, delete trunk checkout (we're done with it)
+ print >>sys.stderr, "Cleaning up trunk temporary files..."
remove_dir(trunk_dir)
+ print >>sys.stderr, "Release branch created!"
if __name__ == '__main__':
if len(sys.argv) != 3 and len(sys.argv) != 4:
@@ -505,5 +510,4 @@ if __name__ == '__main__':
create_release_branch(release_version, trunk_version, working_dir)
- print >> sys.stderr, "Release branch created!"
\ No newline at end of file
Modified: manifoldcf/release-scripts/update_release_branch.py
URL: http://svn.apache.org/viewvc/manifoldcf/release-scripts/update_release_branch.py?rev=1587450&r1=1587449&r2=1587450&view=diff
==============================================================================
--- manifoldcf/release-scripts/update_release_branch.py (original)
+++ manifoldcf/release-scripts/update_release_branch.py Tue Apr 15 06:48:39 2014
@@ -7,12 +7,11 @@ import codecs
def svn_command(command_array):
""" Invoke svn command """
popen = subprocess.Popen(["svn"] + command_array,
- stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- out,err = popen.communicate()
+ stdout=None, stderr=None, stdin=None)
+ popen.communicate()
rcode = popen.returncode
if rcode != 0:
- raise Exception("svn invocation errored with code %d: %s" % (rcode,err))
- return out
+ raise Exception("svn invocation errored with code %d" % rcode)
def remove_dir(directory_path):
""" Remove a directory and all of its contents """
@@ -460,6 +459,7 @@ def update_release_branch(release_branch
branch_build_xml_file = "%s/build.xml" % branch_dir
# Check out branch.
+ print >>sys.stderr, "Checking out branch..."
checkout_tree(branch_dir, branch_url)
# Add change file release row.
@@ -471,10 +471,13 @@ def update_release_branch(release_branch
update_poms(branch_dir, new_release_version)
# Commit trunk
+ print >>sys.stderr, "Updating branch..."
commit_tree(branch_dir, "Prepare for release %s" % new_release_version)
# Finally, delete branch checkout (we're done with it)
+ print >>sys.stderr, "Removing temporary files..."
remove_dir(branch_dir)
+ print >>sys.stderr, "Release branch updated!"
if __name__ == '__main__':
if len(sys.argv) != 3 and len(sys.argv) != 4:
@@ -490,5 +493,4 @@ if __name__ == '__main__':
update_release_branch(release_branch_version_name, new_branch_version, working_dir)
- print >> sys.stderr, "Release branch updated!"
\ No newline at end of file