Modified: subversion/branches/revprop-packing/tools/dist/release.py URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/tools/dist/release.py?rev=1231318&r1=1231317&r2=1231318&view=diff ============================================================================== --- subversion/branches/revprop-packing/tools/dist/release.py (original) +++ subversion/branches/revprop-packing/tools/dist/release.py Fri Jan 13 21:40:26 2012 @@ -399,9 +399,12 @@ def roll_tarballs(args): # Make sure CHANGES is sync'd. compare_changes(repos, branch, args.revnum) - # Create the output directory - if not os.path.exists(get_deploydir(args.base_dir)): - os.mkdir(get_deploydir(args.base_dir)) + # Ensure the output directory doesn't already exist + if os.path.exists(get_deploydir(args.base_dir)): + raise RuntimeError('output directory \'%s\' already exists' + % get_deploydir(args.base_dir)) + + os.mkdir(get_deploydir(args.base_dir)) # For now, just delegate to dist.sh to create the actual artifacts extra_args = '' @@ -449,17 +452,13 @@ def post_candidates(args): target = os.path.join(os.getenv('HOME'), 'public_html', 'svn', str(args.version)) - if args.code_name: - dirname = args.code_name - else: - dirname = 'deploy' - - if not os.path.exists(target): - os.makedirs(target) + logging.info('Moving tarballs to %s' % target) + if os.path.exists(target): + shutil.rmtree(target) + shutil.copytree(get_deploydir(args.base_dir), target) data = { 'version' : str(args.version), 'revnum' : args.revnum, - 'dirname' : dirname, } # Choose the right template text @@ -473,12 +472,11 @@ def post_candidates(args): template = ezt.Template() template.parse(get_tmplfile(template_filename).read()) - template.generate(open(os.path.join(target, 'index.html'), 'w'), data) + template.generate(open(os.path.join(target, 'HEADER.html'), 'w'), data) - logging.info('Moving tarballs to %s' % os.path.join(target, dirname)) - if os.path.exists(os.path.join(target, dirname)): - shutil.rmtree(os.path.join(target, dirname)) - shutil.copytree(get_deploydir(args.base_dir), os.path.join(target, dirname)) + template = ezt.Template() + template.parse(get_tmplfile('htaccess.ezt').read()) + template.generate(open(os.path.join(target, '.htaccess'), 'w'), data) #---------------------------------------------------------------------- @@ -526,12 +524,7 @@ def move_to_dist(args): target = args.target else: target = os.path.join(os.getenv('HOME'), 'public_html', 'svn', - str(args.version), 'deploy') - - if args.code_name: - dirname = args.code_name - else: - dirname = 'deploy' + str(args.version)) logging.info('Moving %s to dist dir \'%s\'' % (str(args.version), args.dist_dir) ) @@ -601,6 +594,19 @@ def write_announcement(args): template.generate(sys.stdout, data) +def write_downloads(args): + 'Output the download section of the website.' + sha1info = get_sha1info(args) + + data = { 'version' : str(args.version), + 'fileinfo' : sha1info, + } + + template = ezt.Template(compress_whitespace = False) + template.parse(get_tmplfile('download.ezt').read()) + template.generate(sys.stdout, data) + + #---------------------------------------------------------------------- # Validate the signatures for a release @@ -610,14 +616,17 @@ fp_pattern = re.compile(r'^pub\s+(\w+\/\ def check_sigs(args): 'Check the signatures for the release.' - import gnupg + try: + import gnupg + except ImportError: + import _gnupg as gnupg gpg = gnupg.GPG() if args.target: target = args.target else: target = os.path.join(os.getenv('HOME'), 'public_html', 'svn', - str(args.version), 'deploy') + str(args.version)) good_sigs = {} @@ -711,9 +720,6 @@ def main(): help='''The revision number to base the release on.''') subparser.add_argument('--target', help='''The full path to the destination.''') - subparser.add_argument('--code-name', - help='''A whimsical name for the release, used only for - naming the download directory.''') # The clean-dist subcommand subparser = subparsers.add_parser('clean-dist', @@ -736,9 +742,6 @@ def main(): help='''The release label, such as '1.7.0-alpha1'.''') subparser.add_argument('--dist-dir', help='''The directory to clean.''') - subparser.add_argument('--code-name', - help='''A whimsical name for the release, used only for - naming the download directory.''') subparser.add_argument('--target', help='''The full path to the destination used in 'post-candiates'..''') @@ -758,6 +761,13 @@ def main(): subparser.add_argument('version', type=Version, help='''The release label, such as '1.7.0-alpha1'.''') + subparser = subparsers.add_parser('write-downloads', + help='''Output to stdout template text for the download + table for subversion.apache.org''') + subparser.set_defaults(func=write_downloads) + subparser.add_argument('version', type=Version, + help='''The release label, such as '1.7.0-alpha1'.''') + # The check sigs subcommand subparser = subparsers.add_parser('check-sigs', help='''Output to stdout the signatures collected for this
Modified: subversion/branches/revprop-packing/tools/dist/templates/nightly-candidates.ezt URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/tools/dist/templates/nightly-candidates.ezt?rev=1231318&r1=1231317&r2=1231318&view=diff ============================================================================== --- subversion/branches/revprop-packing/tools/dist/templates/nightly-candidates.ezt (original) +++ subversion/branches/revprop-packing/tools/dist/templates/nightly-candidates.ezt Fri Jan 13 21:40:26 2012 @@ -59,7 +59,4 @@ made available to users who rely on thei packages.</p> <p>If you want to help us test this distribution of Subversion, you -can find the files <a href="[dirname]/">here</a>.</p> - -</body> -</html> +can find the files below.</p> Modified: subversion/branches/revprop-packing/tools/dist/templates/rc-candidates.ezt URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/tools/dist/templates/rc-candidates.ezt?rev=1231318&r1=1231317&r2=1231318&view=diff ============================================================================== --- subversion/branches/revprop-packing/tools/dist/templates/rc-candidates.ezt (original) +++ subversion/branches/revprop-packing/tools/dist/templates/rc-candidates.ezt Fri Jan 13 21:40:26 2012 @@ -57,7 +57,4 @@ clearly denotes that this is not the fin purposes. And please don't do so until it has been publicly announced.</p> <p>If you want to help us test this distribution of Subversion, you -can find the files <a href="[dirname]/">here</a>.</p> - -</body> -</html> +can find the files below.</p> Modified: subversion/branches/revprop-packing/tools/dist/templates/rc-news.ezt URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/tools/dist/templates/rc-news.ezt?rev=1231318&r1=1231317&r2=1231318&view=diff ============================================================================== --- subversion/branches/revprop-packing/tools/dist/templates/rc-news.ezt (original) +++ subversion/branches/revprop-packing/tools/dist/templates/rc-news.ezt Fri Jan 13 21:40:26 2012 @@ -4,7 +4,7 @@ title="Link to this section">¶</a> </h3> -<p>We are pleased to announce to release of Apache Subversion [version]. This +<p>We are pleased to announce the release of Apache Subversion [version]. This release is not intended for production use, but is provided as a milestone to encourage wider testing and feedback from intrepid users and maintainers. Please see the Modified: subversion/branches/revprop-packing/tools/dist/templates/stable-candidates.ezt URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/tools/dist/templates/stable-candidates.ezt?rev=1231318&r1=1231317&r2=1231318&view=diff ============================================================================== --- subversion/branches/revprop-packing/tools/dist/templates/stable-candidates.ezt (original) +++ subversion/branches/revprop-packing/tools/dist/templates/stable-candidates.ezt Fri Jan 13 21:40:26 2012 @@ -91,7 +91,4 @@ reputation as a packager and Subversion' but only one will deserve it.</p> <p>If you want to help us test this distribution of Subversion, you -can find the files <a href="[dirname]/">here</a>.</p> - -</body> -</html> +can find the files below.</p> Modified: subversion/branches/revprop-packing/tools/examples/SvnCLBrowse URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/tools/examples/SvnCLBrowse?rev=1231318&r1=1231317&r2=1231318&view=diff ============================================================================== --- subversion/branches/revprop-packing/tools/examples/SvnCLBrowse (original) +++ subversion/branches/revprop-packing/tools/examples/SvnCLBrowse Fri Jan 13 21:40:26 2012 @@ -161,7 +161,7 @@ class _item: class SvnCLBrowse(wx.App): def __init__(self, wc_dir): svn.core.svn_config_ensure(None) - self.svn_ctx = svn.client.ctx_t() + self.svn_ctx = svn.client.svn_client_create_context() self.svn_ctx.config = svn.core.svn_config_get_config(None) if wc_dir is not None: self.wc_dir = svn.core.svn_path_canonicalize(wc_dir) Modified: subversion/branches/revprop-packing/tools/examples/get-location-segments.py URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/tools/examples/get-location-segments.py?rev=1231318&r1=1231317&r2=1231318&view=diff ============================================================================== --- subversion/branches/revprop-packing/tools/examples/get-location-segments.py (original) +++ subversion/branches/revprop-packing/tools/examples/get-location-segments.py Fri Jan 13 21:40:26 2012 @@ -21,6 +21,7 @@ # import sys import os +import getpass from svn import client, ra, core def printer(segment, pool): @@ -71,6 +72,39 @@ def parse_args(args): return url, peg_revision, start_revision, end_revision +def prompt_func_ssl_unknown_cert(realm, failures, cert_info, may_save, pool): + print "The certficate details are as follows:" + print "--------------------------------------" + print "Issuer : " + str(cert_info.issuer_dname) + print "Hostname : " + str(cert_info.hostname) + print "ValidFrom : " + str(cert_info.valid_from) + print "ValidUpto : " + str(cert_info.valid_until) + print "Fingerprint: " + str(cert_info.fingerprint) + print "" + ssl_trust = core.svn_auth_cred_ssl_server_trust_t() + if may_save: + choice = raw_input( "accept (t)temporarily (p)permanently: ") + else: + choice = raw_input( "(r)Reject or accept (t)temporarily: ") + if choice[0] == "t" or choice[0] == "T": + ssl_trust.may_save = False + ssl_trust.accepted_failures = failures + elif choice[0] == "p" or choice[0] == "P": + ssl_trust.may_save = True + ssl_trust.accepted_failures = failures + else: + ssl_trust = None + return ssl_trust + +def prompt_func_simple_prompt(realm, username, may_save, pool): + username = raw_input("username: ") + password = getpass.getpass(prompt="password: ") + simple_cred = core.svn_auth_cred_simple_t() + simple_cred.username = username + simple_cred.password = password + simple_cred.may_save = False + return simple_cred + def main(): try: url, peg_revision, start_revision, end_revision = parse_args(sys.argv[1:]) @@ -90,9 +124,12 @@ ERROR: %s sys.exit(1) core.svn_config_ensure(None) - ctx = client.ctx_t() + ctx = client.svn_client_create_context() providers = [ client.get_simple_provider(), + core.svn_auth_get_ssl_server_trust_file_provider(), + core.svn_auth_get_simple_prompt_provider(prompt_func_simple_prompt, 2), + core.svn_auth_get_ssl_server_trust_prompt_provider(prompt_func_ssl_unknown_cert), client.get_username_provider(), client.get_ssl_server_trust_file_provider(), client.get_ssl_client_cert_file_provider(), Propchange: subversion/branches/revprop-packing/tools/server-side/mod_dontdothat/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Fri Jan 13 21:40:26 2012 @@ -0,0 +1,2 @@ +*.slo +.libs Modified: subversion/branches/revprop-packing/tools/server-side/svnauthz-validate.c URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/tools/server-side/svnauthz-validate.c?rev=1231318&r1=1231317&r2=1231318&view=diff ============================================================================== --- subversion/branches/revprop-packing/tools/server-side/svnauthz-validate.c (original) +++ subversion/branches/revprop-packing/tools/server-side/svnauthz-validate.c Fri Jan 13 21:40:26 2012 @@ -40,10 +40,12 @@ main(int argc, const char **argv) svn_authz_t *authz; const char *authz_file; - if (argc <= 1) + if (argc != 2 && argc != 4 && argc != 5) { - printf("Usage: %s PATH \n\n", argv[0]); - printf("Loads the authz file at PATH and validates its syntax. \n" + printf("Usage: %s FILE [USER PATH [REPOS_NAME]]\n\n", argv[0]); + printf("Loads the authz file at FILE and validates its syntax.\n" + "Optionally reports the access available to USER for PATH in\n" + "repository REPOS_NAME.\n" "Returns:\n" " 0 when syntax is OK.\n" " 1 when syntax is invalid.\n" @@ -62,6 +64,31 @@ main(int argc, const char **argv) /* Read the access file and validate it. */ err = svn_repos_authz_read(&authz, authz_file, TRUE, pool); + if (!err && (argc == 4 || argc == 5)) + { + const char *user = argv[2], *path = argv[3]; + const char *repos = argc == 5 ? argv[4] : ""; + svn_boolean_t read_access, write_access; + + if (path[0] != '/') + path = apr_pstrcat(pool, "/", path, NULL); + + err = svn_repos_authz_check_access(authz, repos, path, user, + svn_authz_write, &write_access, + pool); + if (!write_access && !err) + err = svn_repos_authz_check_access(authz, repos, path, user, + svn_authz_read, &read_access, + pool); + if (!err) + printf("user '%s' has %s access to '%s'%s%s\n", + user, + write_access ? "rw" : read_access ? "r" : "no", + path, + repos[0] ? "in repository " : "", + repos); + } + svn_pool_destroy(pool); if (err) Modified: subversion/branches/revprop-packing/tools/server-side/svnpredumpfilter.py URL: http://svn.apache.org/viewvc/subversion/branches/revprop-packing/tools/server-side/svnpredumpfilter.py?rev=1231318&r1=1231317&r2=1231318&view=diff ============================================================================== --- subversion/branches/revprop-packing/tools/server-side/svnpredumpfilter.py (original) +++ subversion/branches/revprop-packing/tools/server-side/svnpredumpfilter.py Fri Jan 13 21:40:26 2012 @@ -33,6 +33,7 @@ log -vq' when run against the root of th will be filtered by a user with universal read access to the repository's data. Do not use the --use-merge-history (-g) or --stop-on-copy when generating this revision log stream. +Use the default ordering of revisions (that is, '-r HEAD:0'). Return errorcode 0 if there are no additional dependencies found, 1 if there were; any other errorcode indicates a fatal error.
