subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1800295 - /subversion/trunk/tools/dist/release.py
Date Thu, 29 Jun 2017 15:45:33 GMT
Author: danielsh
Date: Thu Jun 29 15:45:32 2017
New Revision: 1800295

URL: http://svn.apache.org/viewvc?rev=1800295&view=rev
Log:
release.py: Fix a bug in 'roll' without --branch.

* tools/dist/release.py
  (roll_tarballs): Correctly handle the case that --branch wasn't passed.
    The incumbent code would pass branch=None to compare_changes(), which
    would die with a traceback.
  (create_tag): Make a similar change to the other instance of the same
    pattern.  No functional change.

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=1800295&r1=1800294&r2=1800295&view=diff
==============================================================================
--- subversion/trunk/tools/dist/release.py (original)
+++ subversion/trunk/tools/dist/release.py Thu Jun 29 15:45:32 2017
@@ -472,10 +472,10 @@ def check_copyright_year(repos, branch,
 def roll_tarballs(args):
     'Create the release artifacts.'
 
-    if args.branch:
-        branch = args.branch
-    else:
-        branch = 'branches/%d.%d.x' % (args.version.major, args.version.minor)
+    if not args.branch:
+        args.branch = 'branches/%d.%d.x' % (args.version.major, args.version.minor)
+
+    branch = args.branch # shorthand
 
     logging.info('Rolling release %s from branch %s@%d' % (args.version,
                                                            branch, args.revnum))
@@ -598,12 +598,10 @@ def create_tag(args):
 
     logging.info('Creating tag for %s' % str(args.version))
 
-    if args.branch:
-        branch = secure_repos + '/' + args.branch
-    else:
-        branch = secure_repos + '/branches/%d.%d.x' % (args.version.major,
-                                                       args.version.minor)
-    target = get_target(args)
+    if not args.branch:
+        args.branch = 'branches/%d.%d.x' % (args.version.major, args.version.minor)
+
+    branch = secure_repos + '/' + args.branch
 
     tag = secure_repos + '/tags/' + str(args.version)
 



Mime
View raw message