subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1802301 - /subversion/trunk/tools/dist/release.py
Date Tue, 18 Jul 2017 14:34:39 GMT
Author: danielsh
Date: Tue Jul 18 14:34:39 2017
New Revision: 1802301

URL: http://svn.apache.org/viewvc?rev=1802301&view=rev
Log:
release.py: Minor tweaks for artifacts created off trunk.

* tools/dist/release.py
  (roll_tarballs): Strip trailing slashes from --branch.
    This matters because we compare the value to the string "trunk".
  (create_tag): Likewise.  Also, add a tip to an error message.

Modified:
    subversion/trunk/tools/dist/release.py

Modified: subversion/trunk/tools/dist/release.py
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/release.py?rev=1802301&r1=1802300&r2=1802301&view=diff
==============================================================================
--- subversion/trunk/tools/dist/release.py (original)
+++ subversion/trunk/tools/dist/release.py Tue Jul 18 14:34:39 2017
@@ -490,6 +490,7 @@ def roll_tarballs(args):
         args.branch = 'branches/%d.%d.x' % (args.version.major, args.version.minor)
 
     branch = args.branch # shorthand
+    branch = branch.rstrip('/') # canonicalize for later comparisons
 
     logging.info('Rolling release %s from branch %s@%d' % (args.version,
                                                            branch, args.revnum))
@@ -617,7 +618,7 @@ def create_tag(args):
     if not args.branch:
         args.branch = 'branches/%d.%d.x' % (args.version.major, args.version.minor)
 
-    branch = secure_repos + '/' + args.branch
+    branch = secure_repos + '/' + args.branch.rstrip('/')
 
     tag = secure_repos + '/tags/' + str(args.version)
 
@@ -631,7 +632,12 @@ def create_tag(args):
                     tag + '/subversion/include/svn_version.h']
 
     # don't redirect stdout/stderr since svnmucc might ask for a password
-    subprocess.check_call(svnmucc_cmd)
+    try:
+        subprocess.check_call(svnmucc_cmd)
+    except subprocess.CalledProcessError:
+        if args.version.is_prerelease():
+            logging.error("Do you need to pass --branch=trunk?")
+        raise
 
     if not args.version.is_prerelease():
         logging.info('Bumping revisions on the branch')



Mime
View raw message