subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1818072 - /subversion/trunk/tools/dist/create-minor-release-branch.py
Date Wed, 13 Dec 2017 22:18:48 GMT
Author: julianfoad
Date: Wed Dec 13 22:18:48 2017
New Revision: 1818072

URL: http://svn.apache.org/viewvc?rev=1818072&view=rev
Log:
* tools/dist/create-minor-release-branch.py
  Make '--base-dir' option work. Remove unused code.

Modified:
    subversion/trunk/tools/dist/create-minor-release-branch.py

Modified: subversion/trunk/tools/dist/create-minor-release-branch.py
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/create-minor-release-branch.py?rev=1818072&r1=1818071&r2=1818072&view=diff
==============================================================================
--- subversion/trunk/tools/dist/create-minor-release-branch.py (original)
+++ subversion/trunk/tools/dist/create-minor-release-branch.py Wed Dec 13 22:18:48 2017
@@ -56,20 +56,21 @@ import argparse       # standard in Pyth
 # Some constants
 repos = 'https://svn.apache.org/repos/asf/subversion'
 secure_repos = 'https://svn.apache.org/repos/asf/subversion'
+buildbot_repos = 'https://svn.apache.org/repos/infra/infrastructure/buildbot/aegis/buildmaster'
 
 # Local working copies
-trunk_wc_path = 'svn-trunk'
-branches_wc_path = '.'
-buildbot_wc_path = 'svn-buildmaster'
+base_dir = None  # set by main()
 
 def get_trunk_wc_path(path=None):
+    trunk_wc_path = os.path.join(base_dir, 'svn-trunk')
     if path is None: return trunk_wc_path
     return os.path.join(trunk_wc_path, path)
 def get_branch_wc_path(ver, path=None):
-    branch_wc_path = os.path.join(branches_wc_path, ver.branch + '.x')
+    branch_wc_path = os.path.join(base_dir, ver.branch + '.x')
     if path is None: return branch_wc_path
     return os.path.join(branch_wc_path, path)
 def get_buildbot_wc_path(path=None):
+    buildbot_wc_path = os.path.join(base_dir, 'svn-buildmaster')
     if path is None: return buildbot_wc_path
     return os.path.join(buildbot_wc_path, path)
 
@@ -80,7 +81,7 @@ def get_branch_url(ver):
 def get_tag_url(ver):
     return secure_repos + '/tags/' + ver.base
 def get_buildbot_url():
-    return 'https://svn.apache.org/repos/infra/infrastructure/buildbot/aegis/buildmaster'
+    return buildbot_repos
 
 #----------------------------------------------------------------------
 # Utility functions
@@ -204,15 +205,6 @@ class Version(object):
         return "Version(%s)" % repr(str(self))
 
 #----------------------------------------------------------------------
-def get_prefix(base_dir):
-    return os.path.join(base_dir, 'prefix')
-
-def get_tempdir(base_dir):
-    return os.path.join(base_dir, 'tempdir')
-
-def get_workdir(base_dir):
-    return os.path.join(get_tempdir(base_dir), 'working')
-
 def run(cmd, dry_run=False):
     print('+ ' + ' '.join(cmd))
     if not dry_run:
@@ -423,6 +415,9 @@ def main():
     # Parse the arguments
     args = parser.parse_args()
 
+    global base_dir
+    base_dir = args.base_dir
+
     # Set up logging
     logger = logging.getLogger()
     if args.verbose:
@@ -430,10 +425,6 @@ def main():
     else:
         logger.setLevel(logging.INFO)
 
-    # Fix up our path so we can use our installed versions
-    os.environ['PATH'] = os.path.join(get_prefix(args.base_dir), 'bin') + ':' \
-                                                            + os.environ['PATH']
-
     # Make timestamps in tarballs independent of local timezone
     os.environ['TZ'] = 'UTC'
 



Mime
View raw message