Author: stefan2
Date: Sat May 25 10:18:16 2013
New Revision: 1486308
URL: http://svn.apache.org/r1486308
Log:
On the fsfs-format7 branch: sync with /trunk up to and including r1486307.
Modified:
subversion/branches/fsfs-format7/ (props changed)
subversion/branches/fsfs-format7/subversion/libsvn_subr/auth.c
subversion/branches/fsfs-format7/subversion/libsvn_subr/subst.c
subversion/branches/fsfs-format7/subversion/svnadmin/svnadmin.c
subversion/branches/fsfs-format7/subversion/tests/libsvn_fs/fs-test.c
subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/subst_translate-test.c
subversion/branches/fsfs-format7/tools/dist/make-deps-tarball.sh (props
changed)
subversion/branches/fsfs-format7/tools/dist/release.py
Propchange: subversion/branches/fsfs-format7/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1486034-1486307
Modified: subversion/branches/fsfs-format7/subversion/libsvn_subr/auth.c
URL:
http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_subr/auth.c?rev=1486308&r1=1486307&r2=1486308&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_subr/auth.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_subr/auth.c Sat May 25
10:18:16 2013
@@ -251,7 +251,9 @@ svn_auth_first_credentials(void **creden
}
if (! creds)
- *state = NULL;
+ {
+ *state = NULL;
+ }
else
{
/* Build an abstract iteration state. */
@@ -305,10 +307,12 @@ svn_auth_next_credentials(void **credent
}
else if (provider->vtable->next_credentials)
{
- SVN_ERR(provider->vtable->next_credentials(
- &creds, state->provider_iter_baton,
- provider->provider_baton, auth_baton->parameters,
- state->realmstring, auth_baton->pool));
+ SVN_ERR(provider->vtable->next_credentials(&creds,
+
state->provider_iter_baton,
+ provider->provider_baton,
+ auth_baton->parameters,
+ state->realmstring,
+ auth_baton->pool));
}
if (creds != NULL)
@@ -374,12 +378,11 @@ svn_auth_save_credentials(svn_auth_iters
provider = APR_ARRAY_IDX(state->table->providers, i,
svn_auth_provider_object_t *);
if (provider->vtable->save_credentials)
- SVN_ERR(provider->vtable->save_credentials
- (&save_succeeded, creds,
- provider->provider_baton,
- auth_baton->parameters,
- state->realmstring,
- pool));
+ SVN_ERR(provider->vtable->save_credentials(&save_succeeded, creds,
+ provider->provider_baton,
+ auth_baton->parameters,
+ state->realmstring,
+ pool));
if (save_succeeded)
break;
Modified: subversion/branches/fsfs-format7/subversion/libsvn_subr/subst.c
URL:
http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_subr/subst.c?rev=1486308&r1=1486307&r2=1486308&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_subr/subst.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_subr/subst.c Sat May 25
10:18:16 2013
@@ -298,14 +298,23 @@ build_keywords(apr_hash_t **kw,
for (i = 0; i < keyword_tokens->nelts; ++i)
{
const char *keyword = APR_ARRAY_IDX(keyword_tokens, i, const char *);
- apr_array_header_t *custom_keyword_tokens = NULL;
+ const char *custom_fmt = NULL;
if (expand_custom_keywords)
- custom_keyword_tokens = svn_cstring_split(keyword, "=",
- TRUE /* chop */, pool);
- if (expand_custom_keywords && custom_keyword_tokens->nelts == 2)
{
- const char *custom_fmt;
+ char *sep;
+
+ /* Check if there is a custom keyword definition, started by '='. */
+ sep = strchr(keyword, '=');
+ if (sep)
+ {
+ *sep = '\0'; /* Split keyword's name from custom format. */
+ custom_fmt = sep + 1;
+ }
+ }
+
+ if (custom_fmt)
+ {
svn_string_t *custom_val;
/* Custom keywords must be allowed to match the name of an
@@ -313,9 +322,6 @@ build_keywords(apr_hash_t **kw,
* in case new fixed keywords are added to Subversion which
* happen to match a custom keyword defined somewhere.
* There is only one global namespace for keyword names. */
-
- keyword = APR_ARRAY_IDX(custom_keyword_tokens, 0, const char*);
- custom_fmt = APR_ARRAY_IDX(custom_keyword_tokens, 1, const char*);
custom_val = keyword_printf(custom_fmt, rev, url, repos_root_url,
date, author, pool);
svn_hash_sets(*kw, keyword, custom_val);
@@ -1141,9 +1147,12 @@ translate_chunk(svn_stream_t *dst,
else
{
/* use our optimized sub-routine to find the next EOL */
+ const char *start = p + len;
const char *eol
- = svn_eol__find_eol_start((char *)p + len, end - p);
- len += (eol ? eol : end) - (p + len);
+ = svn_eol__find_eol_start((char *)start, end - start);
+
+ /* EOL will be NULL if we did not find a line ending */
+ len += (eol ? eol : end) - start;
}
}
while (b->nl_translation_skippable ==
Modified: subversion/branches/fsfs-format7/subversion/svnadmin/svnadmin.c
URL:
http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/svnadmin/svnadmin.c?rev=1486308&r1=1486307&r2=1486308&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/fsfs-format7/subversion/svnadmin/svnadmin.c Sat May 25
10:18:16 2013
@@ -620,6 +620,17 @@ parse_args(apr_array_header_t **args,
}
+/* This implements 'svn_error_malfunction_handler_t. */
+static svn_error_t *
+crashtest_malfunction_handler(svn_boolean_t can_return,
+ const char *file,
+ int line,
+ const char *expr)
+{
+ abort();
+ return SVN_NO_ERROR; /* Not reached. */
+}
+
/* This implements `svn_opt_subcommand_t'. */
static svn_error_t *
subcommand_crashtest(apr_getopt_t *os, void *baton, apr_pool_t *pool)
@@ -627,7 +638,14 @@ subcommand_crashtest(apr_getopt_t *os, v
struct svnadmin_opt_state *opt_state = baton;
svn_repos_t *repos;
+ (void)svn_error_set_malfunction_handler(crashtest_malfunction_handler);
SVN_ERR(open_repos(&repos, opt_state->repository_path, pool));
+ SVN_ERR(svn_cmdline_printf(pool,
+ _("Successfully opened repository '%s'.\n"
+ "Will now crash to simulate a crashing "
+ "server process.\n"),
+ svn_dirent_local_style(opt_state->repository_path,
+ pool)));
SVN_ERR_MALFUNCTION();
/* merely silence a compiler warning (this will never be executed) */
Modified: subversion/branches/fsfs-format7/subversion/tests/libsvn_fs/fs-test.c
URL:
http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_fs/fs-test.c?rev=1486308&r1=1486307&r2=1486308&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/tests/libsvn_fs/fs-test.c
(original)
+++ subversion/branches/fsfs-format7/subversion/tests/libsvn_fs/fs-test.c Sat
May 25 10:18:16 2013
@@ -3755,6 +3755,17 @@ small_file_integrity(const svn_test_opts
static svn_error_t *
+almostmedium_file_integrity(const svn_test_opts_t *opts,
+ apr_pool_t *pool)
+{
+ apr_uint32_t seed = (apr_uint32_t) apr_time_now();
+
+ return file_integrity_helper(SVN_DELTA_WINDOW_SIZE - 1, &seed, opts,
+ "test-repo-almostmedium-file-integrity", pool);
+}
+
+
+static svn_error_t *
medium_file_integrity(const svn_test_opts_t *opts,
apr_pool_t *pool)
{
@@ -5055,6 +5066,8 @@ struct svn_test_descriptor_t test_funcs[
"check old revisions"),
SVN_TEST_OPTS_PASS(check_all_revisions,
"after each commit, check all revisions"),
+ SVN_TEST_OPTS_PASS(almostmedium_file_integrity,
+ "create and modify almostmedium file"),
SVN_TEST_OPTS_PASS(medium_file_integrity,
"create and modify medium file"),
SVN_TEST_OPTS_PASS(large_file_integrity,
Modified:
subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/subst_translate-test.c
URL:
http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/subst_translate-test.c?rev=1486308&r1=1486307&r2=1486308&view=diff
==============================================================================
---
subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/subst_translate-test.c
(original)
+++
subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/subst_translate-test.c
Sat May 25 10:18:16 2013
@@ -269,6 +269,10 @@ test_svn_subst_build_keywords3(apr_pool_
"trunk/foo.txt stsp foo.txt %",
"1234", "http://svn.example.com/repos/trunk/foo.txt",
"http://svn.example.com/repos", "stsp"},
+ {"FOO", "FOO=author%_=%_%a",
+ "author = stsp",
+ "1234", "http://svn.example.com/repos/trunk/foo.txt",
+ "http://svn.example.com/repos", "stsp"},
{"MyKeyword", "MyKeyword=%r%_%u%_%_%a",
"4567 http://svn.example.com/svn/branches/myfile jrandom",
"4567", "http://svn.example.com/svn/branches/myfile",
@@ -295,6 +299,7 @@ test_svn_subst_build_keywords3(apr_pool_
t->rev, t->url, t->repos_root_url,
0 /* date */, t->author, pool));
expanded_keyword = svn_hash_gets(kw, t->keyword_name);
+ SVN_TEST_ASSERT(expanded_keyword != NULL);
SVN_TEST_STRING_ASSERT(expanded_keyword->data, t->expanded_keyword);
}
Propchange: subversion/branches/fsfs-format7/tools/dist/make-deps-tarball.sh
------------------------------------------------------------------------------
Merged /subversion/trunk/tools/dist/make-deps-tarball.sh:r1486034-1486307
Modified: subversion/branches/fsfs-format7/tools/dist/release.py
URL:
http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/tools/dist/release.py?rev=1486308&r1=1486307&r2=1486308&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/tools/dist/release.py (original)
+++ subversion/branches/fsfs-format7/tools/dist/release.py Sat May 25 10:18:16
2013
@@ -200,6 +200,13 @@ def get_tempdir(base_dir):
def get_deploydir(base_dir):
return os.path.join(base_dir, 'deploy')
+def get_target(args):
+ "Return the location of the artifacts"
+ if args.target:
+ return args.target
+ else:
+ return get_deploydir(args.base_dir)
+
def get_tmpldir():
return os.path.join(os.path.abspath(sys.path[0]), 'templates')
@@ -478,10 +485,7 @@ def sign_candidates(args):
stdout=asc_file)
asc_file.close()
- if args.target:
- target = args.target
- else:
- target = get_deploydir(args.base_dir)
+ target = get_target(args)
for e in extns:
filename = os.path.join(target, 'subversion-%s.%s' % (args.version, e))
@@ -498,12 +502,14 @@ def sign_candidates(args):
def post_candidates(args):
'Post candidate artifacts to the dist development directory.'
+ target = get_target(args)
+
logging.info('Importing tarballs to %s' % dist_dev_url)
svn_cmd = ['svn', 'import', '-m',
'Add %s candidate release artifacts' % args.version.base,
'--auto-props', '--config-option',
'config:auto-props:*.asc=svn:eol-style=native;svn:mime-type=text/plain',
- get_deploydir(args.base_dir), dist_dev_url]
+ target, dist_dev_url]
if (args.username):
svn_cmd += ['--username', args.username]
subprocess.check_call(svn_cmd)
@@ -521,6 +527,7 @@ def create_tag(args):
else:
branch = secure_repos + '/branches/%d.%d.x' % (args.version.major,
args.version.minor)
+ target = get_target(args)
tag = secure_repos + '/tags/' + str(args.version)
@@ -529,8 +536,7 @@ def create_tag(args):
if (args.username):
svnmucc_cmd += ['--username', args.username]
svnmucc_cmd += ['cp', str(args.revnum), branch, tag]
- svnmucc_cmd += ['put', os.path.join(get_deploydir(args.base_dir),
- 'svn_version.h.dist' + '-' +
+ svnmucc_cmd += ['put', os.path.join(target, 'svn_version.h.dist' + '-' +
str(args.version)),
tag + '/subversion/include/svn_version.h']
@@ -676,10 +682,7 @@ def write_news(args):
def get_sha1info(args, replace=False):
'Return a list of sha1 info for the release'
- if args.target:
- target = args.target
- else:
- target = get_deploydir(args.base_dir)
+ target = get_target(args)
sha1s = glob.glob(os.path.join(target, 'subversion*-%s*.sha1' %
args.version))
@@ -753,10 +756,7 @@ def get_siginfo(args, quiet=False):
import _gnupg as gnupg
gpg = gnupg.GPG()
- if args.target:
- target = args.target
- else:
- target = get_deploydir(args.base_dir)
+ target = get_target(args)
good_sigs = {}
fingerprints = {}
@@ -887,6 +887,9 @@ def main():
help='''The release label, such as '1.7.0-alpha1'.''')
subparser.add_argument('--username',
help='''Username for ''' + dist_repos + '''.''')
+ subparser.add_argument('--target',
+ help='''The full path to the directory containing
+ release artifacts.''')
# Setup the parser for the create-tag subcommand
subparser = subparsers.add_parser('create-tag',
@@ -900,6 +903,9 @@ def main():
help='''The branch to base the release on.''')
subparser.add_argument('--username',
help='''Username for ''' + secure_repos + '''.''')
+ subparser.add_argument('--target',
+ help='''The full path to the directory containing
+ release artifacts.''')
# The clean-dist subcommand
subparser = subparsers.add_parser('clean-dist',