You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2018/04/17 09:19:06 UTC
svn commit: r1829347 [6/7] - in /subversion/branches/better-pristines: ./
build/ build/ac-macros/ contrib/client-side/ contrib/client-side/svnmerge/
contrib/hook-scripts/ notes/ notes/http-and-webdav/ notes/merge-tracking/
notes/obliterate/ notes/tree-...
Modified: subversion/branches/better-pristines/subversion/svn/auth-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/svn/auth-cmd.c?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/svn/auth-cmd.c (original)
+++ subversion/branches/better-pristines/subversion/svn/auth-cmd.c Tue Apr 17 09:19:05 2018
@@ -455,12 +455,15 @@ svn_cl__auth(apr_getopt_t *os, void *bat
{
if (b.patterns->nelts == 0)
SVN_ERR(svn_cmdline_printf(pool,
- _("Credentials cache in '%s' contains %d credentials\n"),
+ Q_("Credentials cache in '%s' contains %d credential\n",
+ "Credentials cache in '%s' contains %d credentials\n",
+ b.matches),
svn_dirent_local_style(config_path, pool), b.matches));
else
SVN_ERR(svn_cmdline_printf(pool,
- _("Credentials cache in '%s' contains %d matching "
- "credentials\n"),
+ Q_("Credentials cache in '%s' contains %d matching credential\n",
+ "Credentials cache in '%s' contains %d matching credentials\n",
+ b.matches),
svn_dirent_local_style(config_path, pool), b.matches));
}
@@ -474,9 +477,11 @@ svn_cl__auth(apr_getopt_t *os, void *bat
"no matching credentials"),
svn_dirent_local_style(config_path, pool));
else
- SVN_ERR(svn_cmdline_printf(pool, _("Deleted %d matching credentials "
- "from '%s'\n"), b.matches,
- svn_dirent_local_style(config_path, pool)));
+ SVN_ERR(svn_cmdline_printf(pool,
+ Q_("Deleted %d matching credential from '%s'\n",
+ "Deleted %d matching credentials from '%s'\n",
+ b.matches),
+ b.matches, svn_dirent_local_style(config_path, pool)));
}
return SVN_NO_ERROR;
Modified: subversion/branches/better-pristines/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/svn/cl.h?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/svn/cl.h (original)
+++ subversion/branches/better-pristines/subversion/svn/cl.h Tue Apr 17 09:19:05 2018
@@ -257,6 +257,7 @@ typedef struct svn_cl__opt_state_t
svn_boolean_t adds_as_modification; /* update 'add vs add' no tree conflict */
svn_boolean_t vacuum_pristines; /* remove unreferenced pristines */
svn_boolean_t drop; /* drop shelf after successful unshelve */
+ svn_boolean_t viewspec;
svn_version_t *compatible_version; /* working copy compatibility version */
} svn_cl__opt_state_t;
Modified: subversion/branches/better-pristines/subversion/svn/help-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/svn/help-cmd.c?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/svn/help-cmd.c (original)
+++ subversion/branches/better-pristines/subversion/svn/help-cmd.c Tue Apr 17 09:19:05 2018
@@ -190,7 +190,7 @@ svn_cl__help(apr_getopt_t *os,
pool);
#endif
}
-#ifdef SVN_HAVE_GNOME_KEYRING
+#if (defined(SVN_HAVE_GNOME_KEYRING) || defined(SVN_HAVE_LIBSECRET))
svn_stringbuf_appendcstr(version_footer, "* Gnome Keyring\n");
#endif
#ifdef SVN_HAVE_GPG_AGENT
Modified: subversion/branches/better-pristines/subversion/svn/info-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/svn/info-cmd.c?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/svn/info-cmd.c (original)
+++ subversion/branches/better-pristines/subversion/svn/info-cmd.c Tue Apr 17 09:19:05 2018
@@ -45,6 +45,245 @@
/*** Code. ***/
+struct layout_list_baton_t
+{
+ svn_boolean_t checkout;
+ const char *target;
+ const char *target_abspath;
+ svn_boolean_t with_revs;
+ int vs_py_format;
+};
+
+/* Output as 'svn' command-line commands.
+ *
+ * Implements svn_client_layout_func_t
+ */
+static svn_error_t *
+output_svn_command_line(void *layout_baton,
+ const char *local_abspath,
+ const char *repos_root_url,
+ svn_boolean_t not_present,
+ svn_boolean_t url_changed,
+ const char *url,
+ svn_boolean_t revision_changed,
+ svn_revnum_t revision,
+ svn_boolean_t depth_changed,
+ svn_depth_t depth,
+ apr_pool_t *scratch_pool)
+{
+ struct layout_list_baton_t *llb = layout_baton;
+ const char *relpath = svn_dirent_skip_ancestor(llb->target_abspath,
+ local_abspath);
+ const char *cmd;
+ const char *depth_str;
+ const char *url_rev_str;
+
+ depth_str = (depth_changed
+ ? apr_psprintf(scratch_pool, " --set-depth=%s",
+ svn_depth_to_word(depth))
+ : "");
+
+ if (llb->checkout)
+ {
+ cmd = "svn checkout";
+ if (depth != svn_depth_infinity)
+ depth_str = apr_psprintf(scratch_pool,
+ " --depth=%s", svn_depth_to_word(depth));
+ url_rev_str = apr_psprintf(scratch_pool, " %s", url);
+ if (llb->with_revs)
+ url_rev_str = apr_psprintf(scratch_pool, "%s@%ld",
+ url_rev_str, revision);
+ llb->checkout = FALSE;
+ }
+ else if (not_present)
+ {
+ /* Easiest way to create a not present node: update to r0 */
+ cmd = "svn update";
+ url_rev_str = " -r0";
+ }
+ else if (url_changed)
+ {
+ cmd = "svn switch";
+ url_rev_str = apr_psprintf(scratch_pool, " ^/%s",
+ svn_uri_skip_ancestor(repos_root_url,
+ url, scratch_pool));
+ if (llb->with_revs)
+ url_rev_str = apr_psprintf(scratch_pool, "%s@%ld",
+ url_rev_str, revision);
+ }
+ else if (llb->with_revs && revision_changed)
+ {
+ cmd = "svn update";
+ url_rev_str = apr_psprintf(scratch_pool, " -r%ld", revision);
+ }
+ else if (depth_changed)
+ {
+ cmd = "svn update";
+ url_rev_str = "";
+ }
+ else
+ return SVN_NO_ERROR;
+
+ SVN_ERR(svn_cmdline_printf(scratch_pool,
+ "%s%-23s%-10s %s\n",
+ cmd, depth_str, url_rev_str,
+ svn_dirent_local_style(
+ svn_dirent_join(llb->target, relpath,
+ scratch_pool), scratch_pool)));
+
+ return SVN_NO_ERROR;
+}
+
+/* */
+static const char *
+depth_to_viewspec_py(svn_depth_t depth,
+ apr_pool_t *result_pool)
+{
+ switch (depth)
+ {
+ case svn_depth_infinity:
+ return "/**";
+ case svn_depth_immediates:
+ return "/*";
+ case svn_depth_files:
+ return "/~";
+ case svn_depth_empty:
+ return "";
+ case svn_depth_exclude:
+ return "!";
+ default:
+ break;
+ }
+ return NULL;
+}
+
+/* Output in the format used by 'tools/client-side/viewspec.py'
+ *
+ * Implements svn_client_layout_func_t
+ */
+static svn_error_t *
+output_svn_viewspec_py(void *layout_baton,
+ const char *local_abspath,
+ const char *repos_root_url,
+ svn_boolean_t not_present,
+ svn_boolean_t url_changed,
+ const char *url,
+ svn_boolean_t revision_changed,
+ svn_revnum_t revision,
+ svn_boolean_t depth_changed,
+ svn_depth_t depth,
+ apr_pool_t *scratch_pool)
+{
+ struct layout_list_baton_t *llb = layout_baton;
+ const char *relpath = svn_dirent_skip_ancestor(llb->target_abspath,
+ local_abspath);
+ const char *depth_str;
+ const char *rev_str = "";
+ const char *repos_rel_url = "";
+
+ depth_str = ((depth_changed || llb->checkout)
+ ? depth_to_viewspec_py(depth, scratch_pool)
+ : "");
+ if (! llb->with_revs)
+ revision_changed = FALSE;
+ if (revision_changed)
+ rev_str = apr_psprintf(scratch_pool, "@%ld", revision);
+
+ if (llb->checkout)
+ {
+ SVN_ERR(svn_cmdline_printf(scratch_pool,
+ "Format: %d\n"
+ "Url: %s\n",
+ llb->vs_py_format, url));
+ if (llb->with_revs)
+ SVN_ERR(svn_cmdline_printf(scratch_pool,
+ "Revision: %ld\n",
+ revision));
+ SVN_ERR(svn_cmdline_printf(scratch_pool, "\n"));
+ llb->checkout = FALSE;
+
+ if (depth == svn_depth_empty)
+ return SVN_NO_ERROR;
+ if (depth_str[0] == '/')
+ depth_str++;
+ }
+ else if (not_present)
+ {
+ /* Easiest way to create a not present node: update to r0 */
+ if (llb->vs_py_format < 2)
+ return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
+ _("svn-viewspec.py format 1 does not support "
+ "the 'not-present' state found at '%s'"),
+ relpath);
+ rev_str = "@0";
+ }
+ else if (url_changed)
+ {
+ if (llb->vs_py_format < 2)
+ return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
+ _("svn-viewspec.py format 1 does not support "
+ "the 'switched' state found at '%s'"),
+ relpath);
+ repos_rel_url = svn_uri_skip_ancestor(repos_root_url, url,
+ scratch_pool);
+ repos_rel_url = apr_psprintf(scratch_pool, "^/%s", repos_rel_url);
+ }
+ else if (!(revision_changed || depth_changed))
+ return SVN_NO_ERROR;
+
+ SVN_ERR(svn_cmdline_printf(scratch_pool,
+ "%s%s %s%s\n",
+ relpath, depth_str, repos_rel_url, rev_str));
+
+ return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+cl_layout_list(apr_array_header_t *targets,
+ void *baton,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *scratch_pool)
+{
+ const char *list_path, *list_abspath;
+ struct layout_list_baton_t llb;
+
+ /* Add "." if user passed 0 arguments */
+ svn_opt_push_implicit_dot_target(targets, scratch_pool);
+
+ if (targets->nelts > 1)
+ return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, 0, NULL);
+
+ list_path = APR_ARRAY_IDX(targets, 0, const char *);
+
+ SVN_ERR(svn_cl__check_target_is_local_path(list_path));
+
+ SVN_ERR(svn_dirent_get_absolute(&list_abspath, list_path,
+ scratch_pool));
+
+ llb.checkout = TRUE;
+ llb.target = list_path;
+ llb.target_abspath = list_abspath;
+ llb.with_revs = TRUE;
+
+ if (TRUE)
+ {
+ /* svn-viewspec.py format */
+ llb.vs_py_format = 2;
+
+ SVN_ERR(svn_client_layout_list(list_abspath,
+ output_svn_viewspec_py, &llb,
+ ctx, scratch_pool));
+ }
+ else
+ {
+ /* svn command-line format */
+ SVN_ERR(svn_client_layout_list(list_abspath,
+ output_svn_command_line, &llb,
+ ctx, scratch_pool));
+ }
+ return SVN_NO_ERROR;
+}
+
static svn_error_t *
svn_cl__info_print_time(apr_time_t atime,
const char *desc,
@@ -110,7 +349,9 @@ typedef enum
info_item_last_changed_author,
/* Working copy information */
- info_item_wc_root
+ info_item_wc_root,
+ info_item_schedule,
+ info_item_depth
} info_item_t;
/* Mapping between option keywords and info_item_t. */
@@ -133,7 +374,9 @@ static const info_item_map_t info_item_m
info_item_last_changed_rev },
{ MAKE_STRING("last-changed-date"), info_item_last_changed_date },
{ MAKE_STRING("last-changed-author"), info_item_last_changed_author },
- { MAKE_STRING("wc-root"), info_item_wc_root }
+ { MAKE_STRING("wc-root"), info_item_wc_root },
+ { MAKE_STRING("schedule"), info_item_schedule },
+ { MAKE_STRING("depth"), info_item_depth },
};
#undef MAKE_STRING
@@ -888,6 +1131,20 @@ print_info_item(void *baton,
target_path, pool));
break;
+ case info_item_schedule:
+ SVN_ERR(print_info_item_string(
+ (info->wc_info
+ ? schedule_str(info->wc_info->schedule) : NULL),
+ target_path, pool));
+ break;
+
+ case info_item_depth:
+ SVN_ERR(print_info_item_string(
+ ((info->wc_info && info->kind == svn_node_dir)
+ ? svn_depth_to_word(info->wc_info->depth) : NULL),
+ target_path, pool));
+ break;
+
default:
SVN_ERR_MALFUNCTION();
}
@@ -918,6 +1175,12 @@ svn_cl__info(apr_getopt_t *os,
opt_state->targets,
ctx, FALSE, pool));
+ if (opt_state->viewspec)
+ {
+ SVN_ERR(cl_layout_list(targets, baton, ctx, pool));
+ return SVN_NO_ERROR;
+ }
+
/* Add "." if user passed 0 arguments. */
svn_opt_push_implicit_dot_target(targets, pool);
Modified: subversion/branches/better-pristines/subversion/svn/log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/svn/log-cmd.c?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/svn/log-cmd.c (original)
+++ subversion/branches/better-pristines/subversion/svn/log-cmd.c Tue Apr 17 09:19:05 2018
@@ -334,7 +334,7 @@ svn_cl__log_entry_receiver(void *baton,
return SVN_NO_ERROR;
}
- /* ### See http://subversion.tigris.org/issues/show_bug.cgi?id=807
+ /* ### See https://issues.apache.org/jira/browse/SVN-807
for more on the fallback fuzzy conversions below. */
if (author == NULL)
Modified: subversion/branches/better-pristines/subversion/svn/propset-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/svn/propset-cmd.c?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/svn/propset-cmd.c (original)
+++ subversion/branches/better-pristines/subversion/svn/propset-cmd.c Tue Apr 17 09:19:05 2018
@@ -151,7 +151,7 @@ svn_cl__propset(apr_getopt_t *os,
* must always be explicitly provided when setting a versioned
* property. See
*
- * http://subversion.tigris.org/issues/show_bug.cgi?id=924
+ * https://issues.apache.org/jira/browse/SVN-924
*
* for more details.
*/
Modified: subversion/branches/better-pristines/subversion/svn/shelf-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/svn/shelf-cmd.c?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/svn/shelf-cmd.c (original)
+++ subversion/branches/better-pristines/subversion/svn/shelf-cmd.c Tue Apr 17 09:19:05 2018
@@ -131,77 +131,31 @@ targets_relative_to_a_wc(const char **wc
/* Return a human-friendly description of DURATION.
*/
static char *
-friendly_duration_str(apr_time_t duration,
- apr_pool_t *result_pool)
+friendly_age_str(apr_time_t mtime,
+ apr_time_t time_now,
+ apr_pool_t *result_pool)
{
- int minutes = (int)(duration / 1000000 / 60);
+ int minutes = (int)((time_now - mtime) / 1000000 / 60);
char *s;
if (minutes >= 60 * 24)
- s = apr_psprintf(result_pool, _("%d days"), minutes / 60 / 24);
+ s = apr_psprintf(result_pool,
+ Q_("%d day ago", "%d days ago",
+ minutes / 60 / 24),
+ minutes / 60 / 24);
else if (minutes >= 60)
- s = apr_psprintf(result_pool, _("%d hours"), minutes / 60);
+ s = apr_psprintf(result_pool,
+ Q_("%d hour ago", "%d hours ago",
+ minutes / 60),
+ minutes / 60);
else
- s = apr_psprintf(result_pool, _("%d minutes"), minutes);
+ s = apr_psprintf(result_pool,
+ Q_("%d minute ago", "%d minutes ago",
+ minutes),
+ minutes);
return s;
}
-#ifndef WIN32
-/* Run CMD with ARGS.
- * Send its stdout to the parent's stdout. Disconnect its stdin and stderr.
- */
-static svn_error_t *
-run_cmd(const char *cmd,
- const char *const *args,
- apr_pool_t *scratch_pool)
-{
- apr_status_t apr_err;
- apr_file_t *outfile;
- svn_error_t *err;
- int exitcode;
-
- apr_err = apr_file_open_stdout(&outfile, scratch_pool);
- if (apr_err)
- return svn_error_wrap_apr(apr_err, "Can't open stdout");
-
- err = svn_io_run_cmd(NULL /*path*/, cmd, args,
- &exitcode, NULL /*exitwhy*/,
- TRUE /*inherit*/,
- NULL /*infile*/, outfile, NULL /*errfile*/,
- scratch_pool);
- if (err || exitcode)
- return svn_error_createf(SVN_ERR_EXTERNAL_PROGRAM, err,
- _("Could not run external command '%s'"), cmd);
- return SVN_NO_ERROR;
-}
-#endif
-
-/* Print some details of the changes in the patch described by INFO.
- */
-static svn_error_t *
-show_diffstat(svn_client_shelf_version_t *shelf_version,
- apr_pool_t *scratch_pool)
-{
-#ifndef WIN32
- const char *patch_abspath;
- const char *args[4];
- svn_error_t *err;
-
- SVN_ERR(svn_client_shelf_get_patch_abspath(&patch_abspath, shelf_version,
- scratch_pool));
- args[0] = "diffstat";
- args[1] = "-p0";
- args[2] = patch_abspath;
- args[3] = NULL;
- err = run_cmd("diffstat", args, scratch_pool);
- if (err)
- svn_error_clear(err);
- else
- SVN_ERR(svn_cmdline_printf(scratch_pool, "\n"));
-#endif
- return SVN_NO_ERROR;
-}
-
/* A comparison function for svn_sort__hash(), comparing the mtime of two
svn_client_shelf_info_t's. */
static int
@@ -237,45 +191,39 @@ list_sorted_by_date(apr_array_header_t *
static svn_error_t *
stats(svn_client_shelf_t *shelf,
int version,
+ svn_client_shelf_version_t *shelf_version,
apr_time_t time_now,
svn_boolean_t with_logmsg,
apr_pool_t *scratch_pool)
{
- svn_client_shelf_version_t *shelf_version;
char *age_str;
char *version_str;
apr_hash_t *paths;
const char *paths_str = "";
- char *info_str;
- if (version == 0)
+ if (! shelf_version)
{
return SVN_NO_ERROR;
}
- SVN_ERR(svn_client_shelf_version_open(&shelf_version,
- shelf, version,
- scratch_pool, scratch_pool));
-
- age_str = friendly_duration_str(time_now - shelf_version->mtime, scratch_pool);
+ age_str = friendly_age_str(shelf_version->mtime, time_now, scratch_pool);
if (version == shelf->max_version)
version_str = apr_psprintf(scratch_pool,
_("version %d"), version);
else
version_str = apr_psprintf(scratch_pool,
- _("version %d of %d"),
+ Q_("version %d of %d", "version %d of %d",
+ shelf->max_version),
version, shelf->max_version);
SVN_ERR(svn_client_shelf_paths_changed(&paths, shelf_version,
scratch_pool, scratch_pool));
- if (paths)
- paths_str = apr_psprintf(scratch_pool,
- _(", %d paths changed"), apr_hash_count(paths));
- info_str = apr_psprintf(scratch_pool,
- _("%s, %s ago%s\n"),
- version_str, age_str, paths_str);
+ paths_str = apr_psprintf(scratch_pool,
+ Q_("%d path changed", "%d paths changed",
+ apr_hash_count(paths)),
+ apr_hash_count(paths));
SVN_ERR(svn_cmdline_printf(scratch_pool,
- "%-30s %s",
- shelf->name, info_str));
+ "%-30s %s, %s, %s\n",
+ shelf->name, version_str, age_str, paths_str));
if (with_logmsg)
{
@@ -298,7 +246,6 @@ stats(svn_client_shelf_t *shelf,
static svn_error_t *
shelves_list(const char *local_abspath,
svn_boolean_t quiet,
- svn_boolean_t with_diffstat,
svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool)
{
@@ -318,18 +265,13 @@ shelves_list(const char *local_abspath,
SVN_ERR(svn_client_shelf_open_existing(&shelf, name, local_abspath,
ctx, scratch_pool));
- SVN_ERR(svn_client_shelf_version_open(&shelf_version,
- shelf, shelf->max_version,
- scratch_pool, scratch_pool));
- if (quiet)
+ SVN_ERR(svn_client_shelf_get_newest_version(&shelf_version, shelf,
+ scratch_pool, scratch_pool));
+ if (quiet || !shelf_version)
SVN_ERR(svn_cmdline_printf(scratch_pool, "%s\n", shelf->name));
else
- SVN_ERR(stats(shelf, shelf->max_version, time_now,
+ SVN_ERR(stats(shelf, shelf->max_version, shelf_version, time_now,
TRUE /*with_logmsg*/, scratch_pool));
- if (with_diffstat)
- {
- SVN_ERR(show_diffstat(shelf_version, scratch_pool));
- }
SVN_ERR(svn_client_shelf_close(shelf, scratch_pool));
}
@@ -341,30 +283,25 @@ shelves_list(const char *local_abspath,
static svn_error_t *
shelf_log(const char *name,
const char *local_abspath,
- svn_boolean_t with_diffstat,
svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool)
{
apr_time_t time_now = apr_time_now();
svn_client_shelf_t *shelf;
+ apr_array_header_t *versions;
int i;
SVN_ERR(svn_client_shelf_open_existing(&shelf, name, local_abspath,
ctx, scratch_pool));
-
- for (i = 1; i <= shelf->max_version; i++)
+ SVN_ERR(svn_client_shelf_get_all_versions(&versions, shelf,
+ scratch_pool, scratch_pool));
+ for (i = 0; i < versions->nelts; i++)
{
- svn_client_shelf_version_t *shelf_version;
+ svn_client_shelf_version_t *shelf_version
+ = APR_ARRAY_IDX(versions, i, void *);
- SVN_ERR(svn_client_shelf_version_open(&shelf_version,
- shelf, i,
- scratch_pool, scratch_pool));
- SVN_ERR(stats(shelf, i, time_now,
+ SVN_ERR(stats(shelf, i + 1, shelf_version, time_now,
FALSE /*with_logmsg*/, scratch_pool));
- if (with_diffstat)
- {
- SVN_ERR(show_diffstat(shelf_version, scratch_pool));
- }
}
SVN_ERR(svn_client_shelf_close(shelf, scratch_pool));
@@ -527,14 +464,16 @@ shelve(int *new_version_p,
apr_pool_t *scratch_pool)
{
svn_client_shelf_t *shelf;
- int previous_version;
+ svn_client_shelf_version_t *previous_version;
+ svn_client_shelf_version_t *new_version;
const char *cwd_abspath;
struct status_baton sb;
SVN_ERR(svn_client_shelf_open_or_create(&shelf,
name, local_abspath,
ctx, scratch_pool));
- previous_version = shelf->max_version;
+ SVN_ERR(svn_client_shelf_get_newest_version(&previous_version, shelf,
+ scratch_pool, scratch_pool));
if (! quiet)
{
@@ -542,7 +481,7 @@ shelve(int *new_version_p,
? _("--- Save a new version of '%s' in WC root '%s'\n")
: _("--- Shelve '%s' in WC root '%s'\n"),
shelf->name, shelf->wc_root_abspath));
- SVN_ERR(stats(shelf, previous_version, apr_time_now(),
+ SVN_ERR(stats(shelf, shelf->max_version, previous_version, apr_time_now(),
TRUE /*with_logmsg*/, scratch_pool));
}
@@ -568,10 +507,10 @@ shelve(int *new_version_p,
SVN_ERR(svn_cmdline_printf(scratch_pool,
keep_local ? _("--- Saving...\n")
: _("--- Shelving...\n")));
- SVN_ERR(svn_client_shelf_save_new_version(shelf,
- paths, depth, changelists,
- scratch_pool));
- if (shelf->max_version == previous_version)
+ SVN_ERR(svn_client_shelf_save_new_version2(&new_version, shelf,
+ paths, depth, changelists,
+ scratch_pool));
+ if (! new_version)
{
SVN_ERR(svn_client_shelf_close(shelf, scratch_pool));
return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
@@ -582,12 +521,7 @@ shelve(int *new_version_p,
/* Un-apply the patch, if required. */
if (!keep_local)
{
- svn_client_shelf_version_t *shelf_version;
-
- SVN_ERR(svn_client_shelf_version_open(&shelf_version,
- shelf, shelf->max_version,
- scratch_pool, scratch_pool));
- SVN_ERR(svn_client_shelf_unapply(shelf_version,
+ SVN_ERR(svn_client_shelf_unapply(new_version,
dry_run, scratch_pool));
}
@@ -622,61 +556,37 @@ shelve(int *new_version_p,
if (dry_run)
{
- SVN_ERR(svn_client_shelf_set_current_version(shelf, previous_version,
- scratch_pool));
+ SVN_ERR(svn_client_shelf_delete_newer_versions(shelf, previous_version,
+ scratch_pool));
}
SVN_ERR(svn_client_shelf_close(shelf, scratch_pool));
return SVN_NO_ERROR;
}
-/* Throw an error if any paths affected by SHELF:VERSION are currently
- * modified in the WC. */
+/* Throw an error if any path affected by SHELF_VERSION gives a conflict
+ * when applied (as a dry-run) to the WC. */
static svn_error_t *
-check_no_modified_paths(const char *paths_base_abspath,
- svn_client_shelf_version_t *shelf_version,
- svn_boolean_t quiet,
- svn_client_ctx_t *ctx,
- apr_pool_t *scratch_pool)
+test_apply(svn_client_shelf_version_t *shelf_version,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *scratch_pool)
{
apr_hash_t *paths;
- struct status_baton sb;
apr_hash_index_t *hi;
- sb.target_abspath = shelf_version->shelf->wc_root_abspath;
- sb.target_path = "";
- sb.header = _("--- Paths modified in shelf and in WC:\n");
- sb.quiet = quiet;
- sb.modified = FALSE;
- sb.ctx = ctx;
-
SVN_ERR(svn_client_shelf_paths_changed(&paths, shelf_version,
scratch_pool, scratch_pool));
for (hi = apr_hash_first(scratch_pool, paths); hi; hi = apr_hash_next(hi))
{
const char *path = apr_hash_this_key(hi);
- const char *abspath = svn_dirent_join(paths_base_abspath, path,
- scratch_pool);
+ svn_boolean_t conflict;
- SVN_ERR(svn_client_status6(NULL /*result_rev*/,
- ctx, abspath,
- NULL /*revision*/,
- svn_depth_empty,
- FALSE /*get_all*/,
- FALSE /*check_out_of_date*/,
- TRUE /*check_working_copy*/,
- TRUE /*no_ignore*/,
- TRUE /*ignore_externals*/,
- FALSE /*depth_as_sticky*/,
- NULL /*changelists*/,
- modification_checker, &sb,
- scratch_pool));
- }
- if (sb.modified)
- {
- return svn_error_create(SVN_ERR_ILLEGAL_TARGET, NULL,
- _("Cannot unshelve/restore, as at least one "
- "path is modified in shelf and in WC"));
+ SVN_ERR(svn_client_shelf_test_apply_file(&conflict, shelf_version, path,
+ scratch_pool));
+ if (conflict)
+ return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+ _("Conflict in applying shelf '%s' path '%s'"),
+ shelf_version->shelf->name, path);
}
return SVN_NO_ERROR;
}
@@ -708,12 +618,15 @@ patch_notify(void *baton,
* or the newest version is @a arg is null.
*
* If @a dry_run is true, don't actually do it.
+ *
+ * Error if any path would have a conflict, unless @a force_if_conflict.
*/
static svn_error_t *
shelf_restore(const char *name,
const char *arg,
svn_boolean_t dry_run,
svn_boolean_t quiet,
+ svn_boolean_t force_if_conflict,
const char *local_abspath,
svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool)
@@ -731,10 +644,15 @@ shelf_restore(const char *name,
if (arg)
{
SVN_ERR(svn_cstring_atoi(&version, arg));
+ SVN_ERR(svn_client_shelf_version_open(&shelf_version,
+ shelf, version,
+ scratch_pool, scratch_pool));
}
else
{
version = shelf->max_version;
+ SVN_ERR(svn_client_shelf_get_newest_version(&shelf_version, shelf,
+ scratch_pool, scratch_pool));
}
if (! quiet)
@@ -742,14 +660,15 @@ shelf_restore(const char *name,
SVN_ERR(svn_cmdline_printf(scratch_pool,
_("--- Unshelve '%s' in WC root '%s'\n"),
shelf->name, shelf->wc_root_abspath));
- SVN_ERR(stats(shelf, version, time_now,
+ SVN_ERR(stats(shelf, version, shelf_version, time_now,
TRUE /*with_logmsg*/, scratch_pool));
}
- SVN_ERR(svn_client_shelf_version_open(&shelf_version,
- shelf, version,
- scratch_pool, scratch_pool));
- SVN_ERR(check_no_modified_paths(shelf->wc_root_abspath,
- shelf_version, quiet, ctx, scratch_pool));
+ if (! force_if_conflict)
+ {
+ SVN_ERR_W(test_apply(shelf_version, ctx, scratch_pool),
+ _("Cannot unshelve/restore, as at least one "
+ "path would conflict"));
+ }
b.rejects = FALSE;
b.notify_func = ctx->notify_func2;
@@ -770,16 +689,18 @@ shelf_restore(const char *name,
if (! dry_run)
{
- SVN_ERR(svn_client_shelf_set_current_version(shelf, version,
- scratch_pool));
+ SVN_ERR(svn_client_shelf_delete_newer_versions(shelf, shelf_version,
+ scratch_pool));
}
if (!quiet)
{
if (version < old_version)
SVN_ERR(svn_cmdline_printf(scratch_pool,
- _("restored '%s' version %d and deleted %d newer versions\n"),
- name, version, old_version - version));
+ Q_("restored '%s' version %d and deleted %d newer version\n",
+ "restored '%s' version %d and deleted %d newer versions\n",
+ old_version - version),
+ name, version, old_version - version));
else
SVN_ERR(svn_cmdline_printf(scratch_pool,
_("restored '%s' version %d (the newest version)\n"),
@@ -797,7 +718,6 @@ shelf_diff(const char *name,
svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool)
{
- int version;
svn_client_shelf_t *shelf;
svn_client_shelf_version_t *shelf_version;
svn_stream_t *stream;
@@ -807,15 +727,18 @@ shelf_diff(const char *name,
if (arg)
{
+ int version;
+
SVN_ERR(svn_cstring_atoi(&version, arg));
+ SVN_ERR(svn_client_shelf_version_open(&shelf_version,
+ shelf, version,
+ scratch_pool, scratch_pool));
}
else
{
- version = shelf->max_version;
+ SVN_ERR(svn_client_shelf_get_newest_version(&shelf_version, shelf,
+ scratch_pool, scratch_pool));
}
- SVN_ERR(svn_client_shelf_version_open(&shelf_version,
- shelf, version,
- scratch_pool, scratch_pool));
SVN_ERR(svn_stream_for_stdout(&stream, scratch_pool));
SVN_ERR(svn_client_shelf_export_patch(shelf_version, stream,
@@ -991,6 +914,7 @@ svn_cl__shelf_unshelve(apr_getopt_t *os,
SVN_ERR(shelf_restore(name, arg,
opt_state->dry_run, opt_state->quiet,
+ opt_state->force /*force_already_modified*/,
local_abspath, ctx, scratch_pool));
if (opt_state->drop)
@@ -1019,7 +943,6 @@ svn_cl__shelf_list(apr_getopt_t *os,
SVN_ERR(svn_dirent_get_absolute(&local_abspath, "", pool));
SVN_ERR(shelves_list(local_abspath,
opt_state->quiet,
- opt_state->verbose /*with_diffstat*/,
ctx, pool));
return SVN_NO_ERROR;
@@ -1067,9 +990,8 @@ shelf_list_by_paths(apr_array_header_t *
SVN_ERR(svn_client_shelf_open_existing(&shelf,
name, wc_root_abspath,
ctx, scratch_pool));
- SVN_ERR(svn_client_shelf_version_open(&shelf_version,
- shelf, shelf->max_version,
- scratch_pool, scratch_pool));
+ SVN_ERR(svn_client_shelf_get_newest_version(&shelf_version, shelf,
+ scratch_pool, scratch_pool));
SVN_ERR(svn_client_shelf_paths_changed(&shelf_paths,
shelf_version,
scratch_pool, scratch_pool));
@@ -1190,7 +1112,6 @@ svn_cl__shelf_log(apr_getopt_t *os,
void *baton,
apr_pool_t *pool)
{
- svn_cl__opt_state_t *opt_state = ((svn_cl__cmd_baton_t *) baton)->opt_state;
svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
const char *name;
const char *local_abspath;
@@ -1204,7 +1125,6 @@ svn_cl__shelf_log(apr_getopt_t *os,
SVN_ERR(svn_dirent_get_absolute(&local_abspath, "", pool));
SVN_ERR(shelf_log(name, local_abspath,
- opt_state->verbose /*with_diffstat*/,
ctx, pool));
return SVN_NO_ERROR;
Modified: subversion/branches/better-pristines/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/svn/svn.c?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/svn/svn.c (original)
+++ subversion/branches/better-pristines/subversion/svn/svn.c Tue Apr 17 09:19:05 2018
@@ -147,6 +147,7 @@ typedef enum svn_cl__longopt_t {
opt_adds_as_modification,
opt_vacuum_pristines,
opt_drop,
+ opt_viewspec,
opt_compatible_version
} svn_cl__longopt_t;
@@ -459,7 +460,11 @@ const apr_getopt_option_t svn_cl__option
" "
" author of 'last-changed-revision'\n"
" "
- " 'wc-root' root of TARGET's working copy")},
+ " 'wc-root' root of TARGET's working copy\n"
+ " "
+ " 'schedule' 'normal','add','delete','replace'\n"
+ " "
+ " 'depth' checkout depth of TARGET in WC")},
{"adds-as-modification", opt_adds_as_modification, 0,
N_("Local additions are merged with incoming additions\n"
@@ -476,6 +481,9 @@ const apr_getopt_option_t svn_cl__option
{"drop", opt_drop, 0,
N_("drop shelf after successful unshelve")},
+ {"viewspec", opt_viewspec, 0,
+ N_("print the working copy layout")},
+
{"compatible-version", opt_compatible_version, 1,
N_("use working copy format compatible with Subversion\n"
" "
@@ -820,9 +828,13 @@ const svn_opt_subcommand_desc3_t svn_cl_
"\n"), N_(
" With --show-item, print only the value of one item of information\n"
" about TARGET.\n"
+ "\n"), N_(
+ " EXPERIMENTAL:\n"
+ " With --viewspec, print the working copy layout.\n"
)},
{'r', 'R', opt_depth, opt_targets, opt_incremental, opt_xml,
- opt_changelist, opt_include_externals, opt_show_item, opt_no_newline}
+ opt_changelist, opt_include_externals, opt_show_item, opt_no_newline,
+ opt_viewspec}
},
{ "list", svn_cl__list, {"ls"},
@@ -1726,129 +1738,6 @@ const svn_opt_subcommand_desc3_t svn_cl_
)},
{opt_targets, 'R', opt_depth, 'q', opt_changelist} },
- { "shelf-diff", svn_cl__shelf_diff, {0}, {N_(
- "Show shelved changes as a diff.\n"
- "usage: shelf-diff NAME [VERSION]\n"
- "\n"), N_(
- " Show the changes in shelf NAME:VERSION (default: latest) as a diff.\n"
- "\n"), N_(
- " The shelving feature is EXPERIMENTAL. This command is likely to change\n"
- " in the next release, and there is no promise of backward compatibility.\n"
- )},
- },
-
- { "shelf-drop", svn_cl__shelf_drop, {0}, {N_(
- "Delete a shelf.\n"
- "usage: shelf-drop NAME\n"
- "\n"), N_(
- " Delete the shelf named NAME.\n"
- "\n"), N_(
- " The shelving feature is EXPERIMENTAL. This command is likely to change\n"
- " in the next release, and there is no promise of backward compatibility.\n"
- )},
- },
-
- { "shelf-list", svn_cl__shelf_list, {"shelves"}, {N_(
- "List shelves.\n"
- "usage: shelf-list\n"
- "\n"), N_(
- " List shelves. Include the first line of any log message\n"
- " and some details about the contents of the shelf, unless '-q' is\n"
- " given.\n"
- "\n"), N_(
- " The shelving feature is EXPERIMENTAL. This command is likely to change\n"
- " in the next release, and there is no promise of backward compatibility.\n"
- )},
- {'q', 'v'}
- },
-
- { "shelf-list-by-paths", svn_cl__shelf_list_by_paths, {0}, {N_(
- "List which shelf affects each path.\n"
- "usage: shelf-list-by-paths [PATH...]\n"
- "\n"), N_(
- " List which shelf most recently affects each path below the given PATHs.\n"
- "\n"), N_(
- " The shelving feature is EXPERIMENTAL. This command is likely to change\n"
- " in the next release, and there is no promise of backward compatibility.\n"
- )},
- },
-
- { "shelf-log", svn_cl__shelf_log, {0}, {N_(
- "Show the versions of a shelf.\n"
- "usage: shelf-log NAME\n"
- "\n"), N_(
- " Show all versions of shelf NAME.\n"
- "\n"), N_(
- " The shelving feature is EXPERIMENTAL. This command is likely to change\n"
- " in the next release, and there is no promise of backward compatibility.\n"
- )},
- {'q', 'v'}
- },
-
- { "shelf-save", svn_cl__shelf_save, {0}, {N_(
- "Copy local changes onto a new version of a shelf.\n"
- "usage: shelf-save NAME [PATH...]\n"
- "\n"), N_(
- " Save local changes in the given PATHs as a new version of shelf NAME.\n"
- " The shelf's log message can be set with -m, -F, etc.\n"
- "\n"), N_(
- " The same as 'svn shelve --keep-local'.\n"
- "\n"), N_(
- " The shelving feature is EXPERIMENTAL. This command is likely to change\n"
- " in the next release, and there is no promise of backward compatibility.\n"
- )},
- {'q', opt_dry_run,
- opt_depth, opt_targets, opt_changelist,
- SVN_CL__LOG_MSG_OPTIONS,
- }
- },
-
- { "shelve", svn_cl__shelf_shelve, {0}, {N_(
- "Move local changes onto a shelf.\n"
- "usage: shelve [--keep-local] NAME [PATH...]\n"
- "\n"), N_(
- " Save the local changes in the given PATHs to a shelf named NAME.\n"
- " Revert those changes from the WC unless '--keep-local' is given.\n"
- " The shelf's log message can be set with -m, -F, etc.\n"
- "\n"), N_(
- " 'svn shelve --keep-local' is the same as 'svn shelf-save'.\n"
- "\n"), N_(
- " The kinds of change you can shelve are those supported by 'svn diff'\n"
- " and 'svn patch'. The following are currently NOT supported:\n"
- " copies, moves, mkdir, rmdir,\n"
- " 'binary' content, uncommittable states\n"
- "\n"), N_(
- " To bring back shelved changes, use 'svn unshelve NAME'.\n"
- "\n"), N_(
- " Shelves are stored in <WC>/.svn/shelves/\n"
- "\n"), N_(
- " The shelving feature is EXPERIMENTAL. This command is likely to change\n"
- " in the next release, and there is no promise of backward compatibility.\n"
- )},
- {'q', opt_dry_run, opt_keep_local,
- opt_depth, opt_targets, opt_changelist,
- SVN_CL__LOG_MSG_OPTIONS,
- } },
-
- { "unshelve", svn_cl__shelf_unshelve, {0}, {N_(
- "Copy shelved changes back into the WC.\n"
- "usage: unshelve [--drop] [NAME [VERSION]]\n"
- "\n"), N_(
- " Apply the shelf named NAME to the working copy.\n"
- " NAME defaults to the newest shelf.\n"
- "\n"), N_(
- " Any conflict between the change being unshelved and a change\n"
- " already in the WC is handled the same way as by 'svn patch',\n"
- " creating a 'reject' file.\n"
- "\n"), N_(
- " With --drop, delete the shelf (like shelf-drop) after successfully\n"
- " unshelving with no conflicts.\n"
- "\n"), N_(
- " The shelving feature is EXPERIMENTAL. This command is likely to change\n"
- " in the next release, and there is no promise of backward compatibility.\n"
- )},
- {opt_drop, 'q', opt_dry_run} },
-
{ "status", svn_cl__status, {"stat", "st"}, {N_(
"Print the status of working copy files and directories.\n"
"usage: status [PATH...]\n"
@@ -2067,6 +1956,131 @@ const svn_opt_subcommand_desc3_t svn_cl_
)},
{ 'q', opt_compatible_version } },
+ { "x-shelf-diff", svn_cl__shelf_diff, {"shelf-diff"}, {N_(
+ "Show shelved changes as a diff.\n"
+ "usage: x-shelf-diff NAME [VERSION]\n"
+ "\n"), N_(
+ " Show the changes in shelf NAME:VERSION (default: latest) as a diff.\n"
+ "\n"), N_(
+ " The shelving feature is EXPERIMENTAL. This command is likely to change\n"
+ " in the next release, and there is no promise of backward compatibility.\n"
+ )},
+ },
+
+ { "x-shelf-drop", svn_cl__shelf_drop, {"shelf-drop"}, {N_(
+ "Delete a shelf.\n"
+ "usage: x-shelf-drop NAME\n"
+ "\n"), N_(
+ " Delete the shelf named NAME.\n"
+ "\n"), N_(
+ " The shelving feature is EXPERIMENTAL. This command is likely to change\n"
+ " in the next release, and there is no promise of backward compatibility.\n"
+ )},
+ },
+
+ { "x-shelf-list", svn_cl__shelf_list, {"shelf-list", "shelves"}, {N_(
+ "List shelves.\n"
+ "usage: x-shelf-list\n"
+ "\n"), N_(
+ " List shelves. Include the first line of any log message\n"
+ " and some details about the contents of the shelf, unless '-q' is\n"
+ " given.\n"
+ "\n"), N_(
+ " The shelving feature is EXPERIMENTAL. This command is likely to change\n"
+ " in the next release, and there is no promise of backward compatibility.\n"
+ )},
+ {'q', 'v'}
+ },
+
+ { "x-shelf-list-by-paths", svn_cl__shelf_list_by_paths, {"shelf-list-by-paths"}, {N_(
+ "List which shelf affects each path.\n"
+ "usage: x-shelf-list-by-paths [PATH...]\n"
+ "\n"), N_(
+ " List which shelf most recently affects each path below the given PATHs.\n"
+ "\n"), N_(
+ " The shelving feature is EXPERIMENTAL. This command is likely to change\n"
+ " in the next release, and there is no promise of backward compatibility.\n"
+ )},
+ },
+
+ { "x-shelf-log", svn_cl__shelf_log, {"shelf-log"}, {N_(
+ "Show the versions of a shelf.\n"
+ "usage: x-shelf-log NAME\n"
+ "\n"), N_(
+ " Show all versions of shelf NAME.\n"
+ "\n"), N_(
+ " The shelving feature is EXPERIMENTAL. This command is likely to change\n"
+ " in the next release, and there is no promise of backward compatibility.\n"
+ )},
+ {'q', 'v'}
+ },
+
+ { "x-shelf-save", svn_cl__shelf_save, {"shelf-save"}, {N_(
+ "Copy local changes onto a new version of a shelf.\n"
+ "usage: x-shelf-save NAME [PATH...]\n"
+ "\n"), N_(
+ " Save local changes in the given PATHs as a new version of shelf NAME.\n"
+ " The shelf's log message can be set with -m, -F, etc.\n"
+ "\n"), N_(
+ " The same as 'svn shelve --keep-local'.\n"
+ "\n"), N_(
+ " The shelving feature is EXPERIMENTAL. This command is likely to change\n"
+ " in the next release, and there is no promise of backward compatibility.\n"
+ )},
+ {'q', opt_dry_run,
+ opt_depth, opt_targets, opt_changelist,
+ SVN_CL__LOG_MSG_OPTIONS,
+ }
+ },
+
+ { "x-shelve", svn_cl__shelf_shelve, {"shelve"}, {N_(
+ "Move local changes onto a shelf.\n"
+ "usage: x-shelve [--keep-local] NAME [PATH...]\n"
+ "\n"), N_(
+ " Save the local changes in the given PATHs to a shelf named NAME.\n"
+ " Revert those changes from the WC unless '--keep-local' is given.\n"
+ " The shelf's log message can be set with -m, -F, etc.\n"
+ "\n"), N_(
+ " 'svn shelve --keep-local' is the same as 'svn shelf-save'.\n"
+ "\n"), N_(
+ " The kinds of change you can shelve are those supported by 'svn diff'\n"
+ " and 'svn patch'. The following are currently NOT supported:\n"
+ " copies, moves, mkdir, rmdir,\n"
+ " 'binary' content, uncommittable states\n"
+ "\n"), N_(
+ " To bring back shelved changes, use 'svn unshelve NAME'.\n"
+ "\n"), N_(
+ " Shelves are stored in <WC>/.svn/shelves/\n"
+ "\n"), N_(
+ " The shelving feature is EXPERIMENTAL. This command is likely to change\n"
+ " in the next release, and there is no promise of backward compatibility.\n"
+ )},
+ {'q', opt_dry_run, opt_keep_local,
+ opt_depth, opt_targets, opt_changelist,
+ SVN_CL__LOG_MSG_OPTIONS,
+ } },
+
+ { "x-unshelve", svn_cl__shelf_unshelve, {"unshelve"}, {N_(
+ "Copy shelved changes back into the WC.\n"
+ "usage: x-unshelve [--drop] [NAME [VERSION]]\n"
+ "\n"), N_(
+ " Apply the shelf named NAME to the working copy.\n"
+ " NAME defaults to the newest shelf.\n"
+ "\n"), N_(
+ " Unshelve normally refuses to run if any of the files are already\n"
+ " modified in the WC. With --force, it does not check. In that case,\n"
+ " any conflict between the change being unshelved and a change\n"
+ " already in the WC is handled the same way as by 'svn patch',\n"
+ " creating a 'reject' file.\n"
+ "\n"), N_(
+ " With --drop, delete the shelf (like shelf-drop) after successfully\n"
+ " unshelving with no conflicts.\n"
+ "\n"), N_(
+ " The shelving feature is EXPERIMENTAL. This command is likely to change\n"
+ " in the next release, and there is no promise of backward compatibility.\n"
+ )},
+ {opt_drop, 'q', opt_dry_run, opt_force} },
+
{ NULL, NULL, {0}, {NULL}, {0} }
};
@@ -2817,6 +2831,9 @@ sub_main(int *exit_code, int argc, const
case opt_vacuum_pristines:
opt_state.vacuum_pristines = TRUE;
break;
+ case opt_viewspec:
+ opt_state.viewspec = TRUE;
+ break;
case opt_compatible_version:
SVN_ERR(parse_compatible_version(&opt_state, opt_arg, pool));
break;
Modified: subversion/branches/better-pristines/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/svnadmin/svnadmin.c?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/better-pristines/subversion/svnadmin/svnadmin.c Tue Apr 17 09:19:05 2018
@@ -385,8 +385,8 @@ static const svn_opt_subcommand_desc3_t
{{'F', N_("write to file ARG instead of stdout")}} },
{"freeze", subcommand_freeze, {0}, {N_(
- "usage: 1. svnadmin freeze REPOS_PATH PROGRAM [ARG...]\n"
- " 2. svnadmin freeze -F FILE PROGRAM [ARG...]\n"
+ "usage: 1. svnadmin freeze REPOS_PATH -- PROGRAM [ARG...]\n"
+ " 2. svnadmin freeze -F FILE -- PROGRAM [ARG...]\n"
"\n"), N_(
"1. Run PROGRAM passing ARGS while holding a write-lock on REPOS_PATH.\n"
" Allows safe use of third-party backup tools on a live repository.\n"
@@ -394,6 +394,9 @@ static const svn_opt_subcommand_desc3_t
"2. Like 1 except all repositories listed in FILE are locked. The file\n"
" format is repository paths separated by newlines. Repositories are\n"
" locked in the same order as they are listed in the file.\n"
+ "\n"
+ "The '--' tells svnadmin to stop looking for svnadmin options and pass\n"
+ "all later arguments to PROGRAM even if they begin with '-'.\n"
)},
{'F'},
{{'F', N_("read repository paths from file ARG")}} },
Modified: subversion/branches/better-pristines/subversion/svnmucc/svnmucc.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/svnmucc/svnmucc.c?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/svnmucc/svnmucc.c (original)
+++ subversion/branches/better-pristines/subversion/svnmucc/svnmucc.c Tue Apr 17 09:19:05 2018
@@ -342,7 +342,7 @@ display_version(apr_pool_t *pool)
version_footer = svn_stringbuf_create(ra_desc_start, pool);
SVN_ERR(svn_ra_print_modules(version_footer, pool));
- SVN_ERR(svn_opt_print_help4(NULL, "svnmucc", TRUE, FALSE, FALSE,
+ SVN_ERR(svn_opt_print_help5(NULL, "svnmucc", TRUE, FALSE, FALSE,
version_footer->data,
NULL, NULL, NULL, NULL, NULL, pool));
Modified: subversion/branches/better-pristines/subversion/svnrdump/load_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/svnrdump/load_editor.c?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/svnrdump/load_editor.c (original)
+++ subversion/branches/better-pristines/subversion/svnrdump/load_editor.c Tue Apr 17 09:19:05 2018
@@ -72,7 +72,7 @@ struct parse_baton
/* A mapping of svn_revnum_t * dump stream revisions to their
corresponding svn_revnum_t * target repository revisions. */
- /* ### See http://subversion.tigris.org/issues/show_bug.cgi?id=3903
+ /* ### See https://issues.apache.org/jira/browse/SVN-3903
### for discussion about improving the memory costs of this mapping. */
apr_hash_t *rev_map;
Modified: subversion/branches/better-pristines/subversion/svnrdump/svnrdump.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/svnrdump/svnrdump.c?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/svnrdump/svnrdump.c (original)
+++ subversion/branches/better-pristines/subversion/svnrdump/svnrdump.c Tue Apr 17 09:19:05 2018
@@ -344,7 +344,7 @@ init_client_context(svn_client_ctx_t **c
### auxiliary GETs/PROPFINDs to happening (well-ordered) on a
### single server connection.
###
- ### See http://subversion.tigris.org/issues/show_bug.cgi?id=4116.
+ ### See https://issues.apache.org/jira/browse/SVN-4116.
*/
cfg_servers = svn_hash_gets(ctx->config, SVN_CONFIG_CATEGORY_SERVERS);
svn_config_set_bool(cfg_servers, SVN_CONFIG_SECTION_GLOBAL,
@@ -429,7 +429,7 @@ dump_initial_full_revision(svn_ra_sessio
our update-driven dump generation work the way a replay-driven
one would.
- See http://subversion.tigris.org/issues/show_bug.cgi?id=4101
+ See https://issues.apache.org/jira/browse/SVN-4101
*/
SVN_ERR(svn_ra_get_session_url(session, &session_url, pool));
SVN_ERR(svn_ra_get_path_relative_to_root(session, &source_relpath,
@@ -618,7 +618,7 @@ version(const char *progname,
pool);
SVN_ERR(svn_ra_print_modules(version_footer, pool));
- return svn_opt_print_help4(NULL, ensure_appname(progname, pool),
+ return svn_opt_print_help5(NULL, ensure_appname(progname, pool),
TRUE, quiet, FALSE, version_footer->data,
NULL, NULL, NULL, NULL, NULL, pool);
}
Modified: subversion/branches/better-pristines/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/svnserve/serve.c?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/svnserve/serve.c (original)
+++ subversion/branches/better-pristines/subversion/svnserve/serve.c Tue Apr 17 09:19:05 2018
@@ -369,7 +369,7 @@ handle_config_error(svn_error_t *error,
/* Now that we've logged the error, clear it and return a
* nice, generic error to the user:
- * http://subversion.tigris.org/issues/show_bug.cgi?id=2271 */
+ * https://issues.apache.org/jira/browse/SVN-2271 */
svn_error_clear(error);
return svn_error_create(apr_err, NULL, NULL);
}
Modified: subversion/branches/better-pristines/subversion/svnserve/svnserve.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/svnserve/svnserve.c?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/svnserve/svnserve.c (original)
+++ subversion/branches/better-pristines/subversion/svnserve/svnserve.c Tue Apr 17 09:19:05 2018
@@ -479,7 +479,7 @@ static svn_error_t * version(svn_boolean
_("\nCyrus SASL authentication is available.\n"));
#endif
- return svn_opt_print_help4(NULL, "svnserve", TRUE, quiet, FALSE,
+ return svn_opt_print_help5(NULL, "svnserve", TRUE, quiet, FALSE,
version_footer->data,
NULL, NULL, NULL, NULL, NULL, pool);
}
Modified: subversion/branches/better-pristines/subversion/svnversion/svnversion.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/svnversion/svnversion.c?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/svnversion/svnversion.c (original)
+++ subversion/branches/better-pristines/subversion/svnversion/svnversion.c Tue Apr 17 09:19:05 2018
@@ -38,7 +38,7 @@
static svn_error_t *
version(svn_boolean_t quiet, apr_pool_t *pool)
{
- return svn_opt_print_help4(NULL, "svnversion", TRUE, quiet, FALSE,
+ return svn_opt_print_help5(NULL, "svnversion", TRUE, quiet, FALSE,
NULL, NULL, NULL, NULL, NULL, NULL, pool);
}
Modified: subversion/branches/better-pristines/subversion/tests/cmdline/authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/tests/cmdline/authz_tests.py?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/tests/cmdline/authz_tests.py (original)
+++ subversion/branches/better-pristines/subversion/tests/cmdline/authz_tests.py Tue Apr 17 09:19:05 2018
@@ -863,7 +863,7 @@ def authz_svnserve_anon_access_read(sbox
# is not really a branch (it's the same URL), but we only care about
# authz here, not the semantics of the merge. (Merges had been
# failing in authz, for the reasons summarized in
- # http://subversion.tigris.org/issues/show_bug.cgi?id=2712#desc13.)
+ # https://issues.apache.org/jira/browse/SVN-2712#desc13.)
svntest.actions.run_and_verify_svn(None, [],
'merge', '-c', '2',
B_url, B_path)
Modified: subversion/branches/better-pristines/subversion/tests/cmdline/commit_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/tests/cmdline/commit_tests.py?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/tests/cmdline/commit_tests.py (original)
+++ subversion/branches/better-pristines/subversion/tests/cmdline/commit_tests.py Tue Apr 17 09:19:05 2018
@@ -3113,6 +3113,39 @@ def commit_xml(sbox):
sbox.simple_append('index.html', '<Q></R>', True)
sbox.simple_commit()
+@Issue(4722)
+def commit_issue4722_checksum(sbox):
+ "commit that triggered checksum failure"
+
+ sbox.build()
+
+ # This bug only ever affected FSFS in 1.9.7. The test could be
+ # considered a bit "fragile" as any change to the on-disk
+ # representation may well make it pass trivially. On the other hand
+ # it should still pass irrespective of that representation, and for
+ # all other repository types.
+
+ # Enough data to allow the bug to occur
+ with open(sbox.ospath('f'), 'w') as fp:
+ for i in range(0, 2001):
+ fp.write('abcdefghijklmnopqrstuvwxyz')
+ sbox.simple_add('f')
+ sbox.simple_commit()
+
+ # Just the right data to trigger the bug
+ with open(sbox.ospath('f'), 'w') as fp:
+ for i in range(0, 8713):
+ fp.write(str(i))
+ fp.write("11111")
+ sbox.simple_commit()
+
+ # Trigger deduplication which is when the bug occurred
+ with open(sbox.ospath('f'), 'w') as fp:
+ for i in range(0, 2001):
+ fp.write('abcdefghijklmnopqrstuvwxyz')
+ sbox.simple_commit()
+
+
########################################################################
# Run the tests
@@ -3190,6 +3223,7 @@ test_list = [ None,
commit_mergeinfo_ood,
mkdir_conflict_proper_error,
commit_xml,
+ commit_issue4722_checksum,
]
if __name__ == '__main__':
Modified: subversion/branches/better-pristines/subversion/tests/cmdline/copy_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/tests/cmdline/copy_tests.py?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/branches/better-pristines/subversion/tests/cmdline/copy_tests.py Tue Apr 17 09:19:05 2018
@@ -4333,7 +4333,7 @@ def copy_added_dir_with_copy(sbox):
def copy_broken_symlink(sbox):
"""copy broken symlink"""
- ## See http://subversion.tigris.org/issues/show_bug.cgi?id=3303. ##
+ ## See https://issues.apache.org/jira/browse/SVN-3303. ##
sbox.build()
wc_dir = sbox.wc_dir
Modified: subversion/branches/better-pristines/subversion/tests/cmdline/dav-mirror-autocheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/tests/cmdline/dav-mirror-autocheck.sh?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/tests/cmdline/dav-mirror-autocheck.sh (original)
+++ subversion/branches/better-pristines/subversion/tests/cmdline/dav-mirror-autocheck.sh Tue Apr 17 09:19:05 2018
@@ -31,7 +31,7 @@
#
# The set of changes sent through the system is currently
# just the test case for issue 2939, using svnmucc
-# http://subversion.tigris.org/issues/show_bug.cgi?id=2939
+# https://issues.apache.org/jira/browse/SVN-2939
# But of course, any svn traffic liable to break over
# mirroring would be a good addition.
#
@@ -100,6 +100,7 @@ function setup_config() {
say "setting up config: " $1
cat > "$1" <<__EOF__
+$LOAD_MOD_MPM
$LOAD_MOD_LOG_CONFIG
$LOAD_MOD_MIME
$LOAD_MOD_UNIXD
@@ -114,9 +115,30 @@ $LOAD_MOD_AUTHZ_CORE
$LOAD_MOD_AUTHZ_USER
$LOAD_MOD_AUTHZ_HOST
+__EOF__
+
+if "$HTTPD" -v | grep '/2\.[012]' >/dev/null; then
+ cat >> "$1" <<__EOF__
LockFile lock
User $(id -un)
Group $(id -gn)
+__EOF__
+else
+HTTPD_LOCK="$HTTPD_ROOT/lock"
+mkdir "$HTTPD_LOCK" \
+ || fail "couldn't create lock directory '$HTTPD_LOCK'"
+ cat >> "$1" <<__EOF__
+# worker and prefork MUST have a mpm-accept lockfile in 2.3.0+
+<IfModule worker.c>
+ Mutex "file:$HTTPD_LOCK" mpm-accept
+</IfModule>
+<IfModule prefork.c>
+ Mutex "file:$HTTPD_LOCK" mpm-accept
+</IfModule>
+__EOF__
+fi
+
+cat >> "$1" <<__EOF__
Listen ${TEST_PORT}
ServerName localhost
PidFile "${HTTPD_ROOT}/pid"
@@ -133,6 +155,9 @@ MaxRequestsPerChild 0
<IfModule worker.c>
ThreadsPerChild 8
</IfModule>
+<IfModule event.c>
+ ThreadsPerChild 8
+</IfModule>
MaxClients 16
HostNameLookups Off
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" format
@@ -202,6 +227,12 @@ function usage() {
SCRIPT=$(basename $0)
+NO_TESTS=
+if [ "x$1" = 'x--no-tests' ]; then
+ NO_TESTS=1
+ shift
+fi
+
if [ $# -ne 1 ] ; then
usage
fi
@@ -249,7 +280,7 @@ HTPASSWD=$(get_prog_name htpasswd htpass
SVN=$ABS_BUILDDIR/subversion/svn/svn
SVNADMIN=$ABS_BUILDDIR/subversion/svnadmin/svnadmin
SVNSYNC=$ABS_BUILDDIR/subversion/svnsync/svnsync
-SVNMUCC=${SVNMUCC:-$ABS_BUILDDIR/tools/client-side/svnmucc/svnmucc}
+SVNMUCC=$ABS_BUILDDIR/subversion/svnmucc/svnmucc
SVNLOOK=$ABS_BUILDDIR/subversion/svnlook/svnlook
[ -x $HTTPD ] || fail "HTTPD '$HTTPD' not executable"
@@ -259,9 +290,7 @@ SVNLOOK=$ABS_BUILDDIR/subversion/svnlook
[ -x $SVNADMIN ] || fail "SVNADMIN $SVNADMIN not built"
[ -x $SVNSYNC ] || fail "SVNSYNC $SVNSYNC not built"
[ -x $SVNLOOK ] || fail "SVNLOOK $SVNLOOK not built"
-[ -x $SVNMUCC ] \
- || fail SVNMUCC $SVNMUCC executable not built, needed for test. \
- \'cd $ABS_BUILDDIR\; make svnmucc\' to fix.
+[ -x $SVNMUCC ] || fail "SVNMUCC $SVNMUCC not built"
say HTTPD: $HTTPD
say SVN: $SVN
@@ -309,6 +338,10 @@ LOAD_MOD_AUTHN_FILE="$(get_loadmodule_co
LOAD_MOD_AUTHZ_USER="$(get_loadmodule_config mod_authz_user)" \
|| fail "Authz_User module not found."
}
+if [ ${APACHE_MPM:+set} ]; then
+ LOAD_MOD_MPM=$(get_loadmodule_config mod_mpm_$APACHE_MPM) \
+ || fail "MPM module not found"
+fi
if [ ${MODULE_PATH:+set} ]; then
MOD_DAV_SVN="$MODULE_PATH/mod_dav_svn.so"
@@ -365,7 +398,9 @@ $SVNADMIN create "$SLAVE_REPOS" || fail
$SVNADMIN dump "$MASTER_REPOS" | $SVNADMIN load "$SLAVE_REPOS" \
|| fail "duplicate repositories failed"
# make sure uuid's match
-[ `cat "$SLAVE_REPOS/db/uuid"` = `cat "$MASTER_REPOS/db/uuid"` ] \
+read MASTER_UUID < "$MASTER_REPOS/db/uuid"
+read SLAVE_UUID < "$SLAVE_REPOS/db/uuid"
+[ "$SLAVE_UUID" = "$MASTER_UUID" ] \
|| fail "master/slave uuid mismatch"
# setup hooks:
# slave allows revprop changes
@@ -397,12 +432,18 @@ $SVNSYNC initialize --non-interactive "$
--username=svnsync --password=svnsync \
|| fail "svnsync initialize failed"
+if [ $NO_TESTS ]; then
+ echo "MASTER_URL=$MASTER_URL"
+ echo "SLAVE_URL=$SLAVE_URL"
+ exit
+fi
+
# OK, let's start testing! Commit changes to slave, expect
# them to proxy through to the master, and then
# svnsync back to the slave
#
# reproducible test case from:
-# http://subversion.tigris.org/issues/show_bug.cgi?id=2939
+# https://issues.apache.org/jira/browse/SVN-2939
#
BASE_URL="$SLAVE_URL"
say running svnmucc test to $BASE_URL
Modified: subversion/branches/better-pristines/subversion/tests/cmdline/davautocheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/tests/cmdline/davautocheck.sh?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/tests/cmdline/davautocheck.sh (original)
+++ subversion/branches/better-pristines/subversion/tests/cmdline/davautocheck.sh Tue Apr 17 09:19:05 2018
@@ -52,6 +52,7 @@
# Run this script with the test suite name and test number to execute just this
# test:
# subversion/tests/cmdline/davautocheck.sh basic 4
+# This script can also be invoked via "make davautocheck".
#
# If the temporary directory is not deleted, it can be reused for further
# manual DAV protocol interoperation testing. HTTPD must be started by
@@ -65,18 +66,19 @@
# APXS=/opt/svn/1.4.x/bin/apxs MODULE_PATH=/opt/svn/1.4.x/modules \
# subversion/tests/cmdline/davautocheck.sh
#
-# To prevent the server from advertising httpv2, pass USE_HTTPV1 in
-# the environment.
+# Other environment variables that are interpreted by this script:
#
-# To enable "SVNCacheRevProps on" set CACHE_REVPROPS in the environment.
+# make davautocheck CACHE_REVPROPS=1 # sets SVNCacheRevProps on
#
-# To test over https set USE_SSL in the environment.
+# make davautocheck BLOCK_READ=1 # sets SVNBlockRead on
#
-# To use value for "SVNPathAuthz" directive set SVN_PATH_AUTHZ with
-# appropriate value in the environment.
+# make davautocheck USE_SSL=1 # run over https
#
-# To load an MPM module for Apache 2.4 use APACHE_MPM=event in the
-# environment.
+# make davautocheck USE_HTTPV1=1 # sets SVNAdvertiseV2Protocol off
+#
+# make davautocheck APACHE_MPM=event # specifies the 2.4 MPM
+#
+# make davautocheck SVN_PATH_AUTHZ=short_circuit # SVNPathAuthz short_circuit
#
# Passing --no-tests as argv[1] will have the script start a server
# but not run any tests. Passing --gdb or --lldb will do the same, and in
@@ -222,6 +224,11 @@ if [ ${CACHE_REVPROPS:+set} ]; then
CACHE_REVPROPS_SETTING=on
fi
+BLOCK_READ_SETTING=off
+if [ ${BLOCK_READ:+set} ]; then
+ BLOCK_READ_SETTING=on
+fi
+
if [ ${MODULE_PATH:+set} ]; then
MOD_DAV_SVN="$MODULE_PATH/mod_dav_svn.so"
MOD_AUTHZ_SVN="$MODULE_PATH/mod_authz_svn.so"
@@ -539,39 +546,41 @@ Alias /fsdavroot $ABS_BUILDDIR/subversio
</Directory>
<Location /svn-test-work/repositories>
+__EOF__
+location_common() {
+cat >> "$HTTPD_CFG" <<__EOF__
DAV svn
- SVNParentPath "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/repositories"
AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile $HTTPD_USERS
- Require valid-user
SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
SVNCacheRevProps ${CACHE_REVPROPS_SETTING}
+ SVNListParentPath On
+ SVNBlockRead ${BLOCK_READ_SETTING}
+__EOF__
+}
+location_common
+cat >> "$HTTPD_CFG" <<__EOF__
+ SVNParentPath "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/repositories"
+ Require valid-user
${SVN_PATH_AUTHZ_LINE}
</Location>
<Location /ddt-test-work/repositories>
- DAV svn
+__EOF__
+location_common
+cat >> "$HTTPD_CFG" <<__EOF__
SVNParentPath "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/repositories"
- AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
- AuthType Basic
- AuthName "Subversion Repository"
- AuthUserFile $HTTPD_USERS
Require valid-user
- SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
- SVNCacheRevProps ${CACHE_REVPROPS_SETTING}
${SVN_PATH_AUTHZ_LINE}
DontDoThatConfigFile "$HTTPD_DONTDOTHAT"
</Location>
<Location /svn-test-work/local_tmp/repos>
- DAV svn
+__EOF__
+location_common
+cat >> "$HTTPD_CFG" <<__EOF__
SVNPath "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp/repos"
- AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
- AuthType Basic
- AuthName "Subversion Repository"
- AuthUserFile $HTTPD_USERS
Require valid-user
- SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
${SVN_PATH_AUTHZ_LINE}
</Location>
<Location /authz-test-work/anon>
@@ -594,84 +603,54 @@ Alias /fsdavroot $ABS_BUILDDIR/subversio
${SVN_PATH_AUTHZ_LINE}
</Location>
<Location /authz-test-work/mixed>
- DAV svn
+__EOF__
+location_common
+cat >> "$HTTPD_CFG" <<__EOF__
SVNParentPath "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
- AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
- SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
- SVNCacheRevProps ${CACHE_REVPROPS_SETTING}
- SVNListParentPath On
- AuthType Basic
- AuthName "Subversion Repository"
- AuthUserFile $HTTPD_USERS
Require valid-user
Satisfy Any
${SVN_PATH_AUTHZ_LINE}
</Location>
<Location /authz-test-work/mixed-noauthwhenanon>
- DAV svn
+__EOF__
+location_common
+cat >> "$HTTPD_CFG" <<__EOF__
SVNParentPath "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
- AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
- SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
- SVNCacheRevProps ${CACHE_REVPROPS_SETTING}
- SVNListParentPath On
- AuthType Basic
- AuthName "Subversion Repository"
- AuthUserFile $HTTPD_USERS
Require valid-user
AuthzSVNNoAuthWhenAnonymousAllowed On
SVNPathAuthz On
</Location>
<Location /authz-test-work/authn>
- DAV svn
+__EOF__
+location_common
+cat >> "$HTTPD_CFG" <<__EOF__
SVNParentPath "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
- AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
- SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
- SVNCacheRevProps ${CACHE_REVPROPS_SETTING}
- SVNListParentPath On
- AuthType Basic
- AuthName "Subversion Repository"
- AuthUserFile $HTTPD_USERS
Require valid-user
${SVN_PATH_AUTHZ_LINE}
</Location>
<Location /authz-test-work/authn-anonoff>
- DAV svn
+__EOF__
+location_common
+cat >> "$HTTPD_CFG" <<__EOF__
SVNParentPath "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
- AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
- SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
- SVNCacheRevProps ${CACHE_REVPROPS_SETTING}
- SVNListParentPath On
- AuthType Basic
- AuthName "Subversion Repository"
- AuthUserFile $HTTPD_USERS
Require valid-user
AuthzSVNAnonymous Off
SVNPathAuthz On
</Location>
<Location /authz-test-work/authn-lcuser>
- DAV svn
+__EOF__
+location_common
+cat >> "$HTTPD_CFG" <<__EOF__
SVNParentPath "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
- AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
- SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
- SVNCacheRevProps ${CACHE_REVPROPS_SETTING}
- SVNListParentPath On
- AuthType Basic
- AuthName "Subversion Repository"
- AuthUserFile $HTTPD_USERS
Require valid-user
AuthzForceUsernameCase Lower
${SVN_PATH_AUTHZ_LINE}
</Location>
<Location /authz-test-work/authn-group>
- DAV svn
+__EOF__
+location_common
+cat >> "$HTTPD_CFG" <<__EOF__
SVNParentPath "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
- AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
- SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
- SVNCacheRevProps ${CACHE_REVPROPS_SETTING}
- SVNListParentPath On
- AuthType Basic
- AuthName "Subversion Repository"
- AuthUserFile $HTTPD_USERS
AuthGroupFile $HTTPD_GROUPS
Require group random
AuthzSVNAuthoritative Off
@@ -679,15 +658,10 @@ Alias /fsdavroot $ABS_BUILDDIR/subversio
</Location>
<IfModule mod_authz_core.c>
<Location /authz-test-work/sallrany>
- DAV svn
+__EOF__
+location_common
+cat >> "$HTTPD_CFG" <<__EOF__
SVNParentPath "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
- AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
- SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
- SVNCacheRevProps ${CACHE_REVPROPS_SETTING}
- SVNListParentPath On
- AuthType Basic
- AuthName "Subversion Repository"
- AuthUserFile $HTTPD_USERS
AuthzSendForbiddenOnFailure On
Satisfy All
<RequireAny>
@@ -697,15 +671,10 @@ Alias /fsdavroot $ABS_BUILDDIR/subversio
${SVN_PATH_AUTHZ_LINE}
</Location>
<Location /authz-test-work/sallrall>
- DAV svn
+__EOF__
+location_common
+cat >> "$HTTPD_CFG" <<__EOF__
SVNParentPath "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
- AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
- SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
- SVNCacheRevProps ${CACHE_REVPROPS_SETTING}
- SVNListParentPath On
- AuthType Basic
- AuthName "Subversion Repository"
- AuthUserFile $HTTPD_USERS
AuthzSendForbiddenOnFailure On
Satisfy All
<RequireAll>
Modified: subversion/branches/better-pristines/subversion/tests/cmdline/depth_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/tests/cmdline/depth_tests.py?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/tests/cmdline/depth_tests.py (original)
+++ subversion/branches/better-pristines/subversion/tests/cmdline/depth_tests.py Tue Apr 17 09:19:05 2018
@@ -1073,7 +1073,7 @@ def commit_depth_immediates(sbox):
# Message-ID: <46...@collab.net>
# Date: Thu, 12 Jul 2007 15:59:45 -0400
#
- # See also http://subversion.tigris.org/issues/show_bug.cgi?id=2882.
+ # See also https://issues.apache.org/jira/browse/SVN-2882.
#
# Outline of the test:
# ====================
Modified: subversion/branches/better-pristines/subversion/tests/cmdline/export_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/tests/cmdline/export_tests.py?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/tests/cmdline/export_tests.py (original)
+++ subversion/branches/better-pristines/subversion/tests/cmdline/export_tests.py Tue Apr 17 09:19:05 2018
@@ -721,7 +721,7 @@ def export_working_copy_ignoring_keyword
def export_with_url_unsafe_characters(sbox):
"export file with URL unsafe characters"
- ## See http://subversion.tigris.org/issues/show_bug.cgi?id=3683 ##
+ ## See https://issues.apache.org/jira/browse/SVN-3683 ##
sbox.build()
wc_dir = sbox.wc_dir
Modified: subversion/branches/better-pristines/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/tests/cmdline/externals_tests.py?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/branches/better-pristines/subversion/tests/cmdline/externals_tests.py Tue Apr 17 09:19:05 2018
@@ -2818,7 +2818,7 @@ def remap_file_external_with_prop_del(sb
# Now update to bring the new external down.
# This previously segfaulted as described in
- # http://subversion.tigris.org/issues/show_bug.cgi?id=4093#desc1
+ # https://issues.apache.org/jira/browse/SVN-4093#desc1
svntest.actions.run_and_verify_svn(None, [], 'up', wc_dir)
Modified: subversion/branches/better-pristines/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout (original)
+++ subversion/branches/better-pristines/subversion/tests/cmdline/getopt_tests_data/svn--help_stdout Tue Apr 17 09:19:05 2018
@@ -42,19 +42,19 @@ Available subcommands:
resolve
resolved
revert
- shelf-diff
- shelf-drop
- shelf-list (shelves)
- shelf-list-by-paths
- shelf-log
- shelf-save
- shelve
- unshelve
status (stat, st)
switch (sw)
unlock
update (up)
upgrade
+ x-shelf-diff (shelf-diff)
+ x-shelf-drop (shelf-drop)
+ x-shelf-list (shelf-list, shelves)
+ x-shelf-list-by-paths (shelf-list-by-paths)
+ x-shelf-log (shelf-log)
+ x-shelf-save (shelf-save)
+ x-shelve (shelve)
+ x-unshelve (unshelve)
Subversion is a tool for version control.
For additional information, see http://subversion.apache.org/
Modified: subversion/branches/better-pristines/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout (original)
+++ subversion/branches/better-pristines/subversion/tests/cmdline/getopt_tests_data/svn_help_stdout Tue Apr 17 09:19:05 2018
@@ -42,19 +42,19 @@ Available subcommands:
resolve
resolved
revert
- shelf-diff
- shelf-drop
- shelf-list (shelves)
- shelf-list-by-paths
- shelf-log
- shelf-save
- shelve
- unshelve
status (stat, st)
switch (sw)
unlock
update (up)
upgrade
+ x-shelf-diff (shelf-diff)
+ x-shelf-drop (shelf-drop)
+ x-shelf-list (shelf-list, shelves)
+ x-shelf-list-by-paths (shelf-list-by-paths)
+ x-shelf-log (shelf-log)
+ x-shelf-save (shelf-save)
+ x-shelve (shelve)
+ x-unshelve (unshelve)
Subversion is a tool for version control.
For additional information, see http://subversion.apache.org/
Modified: subversion/branches/better-pristines/subversion/tests/cmdline/log_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/tests/cmdline/log_tests.py?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/branches/better-pristines/subversion/tests/cmdline/log_tests.py Tue Apr 17 09:19:05 2018
@@ -1592,7 +1592,7 @@ def merge_sensitive_log_added_mergeinfo_
# a merge results in added explicit mergeinfo on a path, but that
# path previously inherited mergeinfo (rather than had no explicit
# or inherited mergeinfo). See issue #3235, specifically
- # http://subversion.tigris.org/issues/show_bug.cgi?id=3235#desc8.
+ # https://issues.apache.org/jira/browse/SVN-3235#desc8.
sbox.build()
wc_dir = sbox.wc_dir
@@ -1752,7 +1752,7 @@ def merge_sensitive_log_added_mergeinfo_
def merge_sensitive_log_propmod_merge_inheriting_path(sbox):
"log -g and simple propmod to merge-inheriting path"
- # Issue #3285 (http://subversion.tigris.org/issues/show_bug.cgi?id=3285)
+ # Issue #3285 (https://issues.apache.org/jira/browse/SVN-3285)
sbox.build()
wc_dir = sbox.wc_dir
Modified: subversion/branches/better-pristines/subversion/tests/cmdline/merge_authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/tests/cmdline/merge_authz_tests.py?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/tests/cmdline/merge_authz_tests.py (original)
+++ subversion/branches/better-pristines/subversion/tests/cmdline/merge_authz_tests.py Tue Apr 17 09:19:05 2018
@@ -486,7 +486,7 @@ def mergeinfo_and_skipped_paths(sbox):
def merge_fails_if_subtree_is_deleted_on_src(sbox):
"merge fails if subtree is deleted on src"
- ## See http://subversion.tigris.org/issues/show_bug.cgi?id=2876. ##
+ ## See https://issues.apache.org/jira/browse/SVN-2876. ##
# Create a WC
sbox.build()
@@ -613,7 +613,7 @@ def reintegrate_fails_if_no_root_access(
# should be able to reintegrate, regardless of what authorization
# they have to parents of the source and target.
#
- # See http://subversion.tigris.org/issues/show_bug.cgi?id=3242#desc78
+ # See https://issues.apache.org/jira/browse/SVN-3242#desc78
# Some paths we'll care about
wc_dir = sbox.wc_dir
Modified: subversion/branches/better-pristines/subversion/tests/cmdline/merge_automatic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/tests/cmdline/merge_automatic_tests.py?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/tests/cmdline/merge_automatic_tests.py (original)
+++ subversion/branches/better-pristines/subversion/tests/cmdline/merge_automatic_tests.py Tue Apr 17 09:19:05 2018
@@ -1163,7 +1163,7 @@ def effective_sync_results_in_reintegrat
# Now try an explicit --reintegrate merge from ^/branch to A.
# This should work because since the resolution of
- # http://subversion.tigris.org/issues/show_bug.cgi?id=3577
+ # https://issues.apache.org/jira/browse/SVN-3577
# if B is *effectively* synced with A, then B can be reintegrated
# to A.
sbox.simple_update()
Modified: subversion/branches/better-pristines/subversion/tests/cmdline/merge_reintegrate_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/tests/cmdline/merge_reintegrate_tests.py?rev=1829347&r1=1829346&r2=1829347&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/tests/cmdline/merge_reintegrate_tests.py (original)
+++ subversion/branches/better-pristines/subversion/tests/cmdline/merge_reintegrate_tests.py Tue Apr 17 09:19:05 2018
@@ -1363,7 +1363,7 @@ def reintegrate_with_subtree_mergeinfo(s
# how can any prop changes be merged to it? The answer is that
# the merge code does some quiet housekeeping, merging gamma_moved's
# inherited mergeinfo into its incoming mergeinfo, see
- # http://subversion.tigris.org/issues/show_bug.cgi?id=4309
+ # https://issues.apache.org/jira/browse/SVN-4309
# This test is not covering issue #4309 so we let the current
# behavior pass.
# r17 - B) Synch merge from A to A_COPY