You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2018/02/01 11:17:41 UTC
svn commit: r1822868 [1/2] - in /subversion/branches/shelve-checkpoint: ./
build/ build/generator/templates/ build/win32/ subversion/include/
subversion/libsvn_client/ subversion/libsvn_diff/ subversion/libsvn_wc/
subversion/svn/ subversion/tests/cmdli...
Author: julianfoad
Date: Thu Feb 1 11:17:40 2018
New Revision: 1822868
URL: http://svn.apache.org/viewvc?rev=1822868&view=rev
Log:
On the 'shelve-checkpoint' branch: Catch up to trunk@1822866.
Removed:
subversion/branches/shelve-checkpoint/build/win32/vc6-build.bat.in
subversion/branches/shelve-checkpoint/tools/buildbot/slaves/xp-vc60-ia32/
Modified:
subversion/branches/shelve-checkpoint/ (props changed)
subversion/branches/shelve-checkpoint/CHANGES
subversion/branches/shelve-checkpoint/INSTALL
subversion/branches/shelve-checkpoint/Makefile.in
subversion/branches/shelve-checkpoint/build/generator/templates/vcnet_vcxproj.ezt
subversion/branches/shelve-checkpoint/build/run_tests.py
subversion/branches/shelve-checkpoint/gen-make.py
subversion/branches/shelve-checkpoint/subversion/include/svn_client.h
subversion/branches/shelve-checkpoint/subversion/include/svn_wc.h
subversion/branches/shelve-checkpoint/subversion/libsvn_client/conflicts.c
subversion/branches/shelve-checkpoint/subversion/libsvn_client/deprecated.c
subversion/branches/shelve-checkpoint/subversion/libsvn_client/diff.c
subversion/branches/shelve-checkpoint/subversion/libsvn_client/revert.c
subversion/branches/shelve-checkpoint/subversion/libsvn_client/shelf.c
subversion/branches/shelve-checkpoint/subversion/libsvn_client/shelve.c (contents, props changed)
subversion/branches/shelve-checkpoint/subversion/libsvn_diff/parse-diff.c
subversion/branches/shelve-checkpoint/subversion/libsvn_wc/deprecated.c
subversion/branches/shelve-checkpoint/subversion/libsvn_wc/revert.c
subversion/branches/shelve-checkpoint/subversion/svn/diff-cmd.c
subversion/branches/shelve-checkpoint/subversion/svn/log-cmd.c
subversion/branches/shelve-checkpoint/subversion/svn/revert-cmd.c
subversion/branches/shelve-checkpoint/subversion/svn/shelf-cmd.c
subversion/branches/shelve-checkpoint/subversion/svn/svn.c
subversion/branches/shelve-checkpoint/subversion/tests/cmdline/patch_tests.py
subversion/branches/shelve-checkpoint/subversion/tests/cmdline/shelf_tests.py
subversion/branches/shelve-checkpoint/subversion/tests/cmdline/svntest/main.py
subversion/branches/shelve-checkpoint/subversion/tests/cmdline/svntest/verify.py
subversion/branches/shelve-checkpoint/tools/buildbot/slaves/bb-openbsd/svnbuild.sh
subversion/branches/shelve-checkpoint/tools/buildbot/slaves/bb-openbsd/svncheck-bindings.sh
subversion/branches/shelve-checkpoint/tools/buildbot/slaves/bb-openbsd/svncheck.sh
subversion/branches/shelve-checkpoint/tools/buildbot/slaves/bb-openbsd/svnclean.sh
subversion/branches/shelve-checkpoint/tools/client-side/bash_completion
subversion/branches/shelve-checkpoint/tools/dev/unix-build/Makefile.svn
Propchange: subversion/branches/shelve-checkpoint/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 1 11:17:40 2018
@@ -98,4 +98,4 @@
/subversion/branches/verify-at-commit:1462039-1462408
/subversion/branches/verify-keep-going:1439280-1546110
/subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1801593-1821869
+/subversion/trunk:1801593-1822866
Modified: subversion/branches/shelve-checkpoint/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/CHANGES?rev=1822868&r1=1822867&r2=1822868&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/CHANGES (original)
+++ subversion/branches/shelve-checkpoint/CHANGES Thu Feb 1 11:17:40 2018
@@ -93,7 +93,7 @@ the 1.9 release: https://subversion.apa
* 'svn': --non-interactive uses recommended tree conflict resolution (r1805620)
* Evaluate 'old mode' and 'new mode' lines from git-syle diffs (r1705391)
* svnrdump, svndumpfilter: Enable buffered stdin (r1703074)
- * ra_serf: Receive svndiff1 and gzip compressed deltas (r1781282, -3, -4)
+ * ra_serf: Receive svndiff1 and gzip compressed deltas (r1791282, -3, -4)
* svnadmin: 'lock', 'unlock', 'rmlocks': Take the -q option (r1796406)
* New svndiff2 binary delta format using lz4 compression (r1801938, et al)
* gpg-agent: Support gpg â¥2.1.13 and unset GPG_AGENT_INFO (r1795087)
@@ -3003,7 +3003,7 @@ the 1.6 release: http://subversion.apac
* fixed: ra_serf doesn't support http-auth-types config (issue #3435)
* fixed: merge sets incorrect mergeinfo on skipped paths (issue #3440)
* fixed: ra_serf inconsistent handling of cached authn creds (issue #3450)
- * fixed: ra_serf sefault with using NTLM or Negotiate auth (r876910)
+ * fixed: ra_serf segfault with using NTLM or Negotiate auth (r876910)
* fixed: excluded subtrees are not detected by svnversion (issue #3461)
* fixed: submitting a changelist while obstructed item exists (issue #3484)
* fixed: crash when changing an external's URL (issue #3530)
Modified: subversion/branches/shelve-checkpoint/INSTALL
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/INSTALL?rev=1822868&r1=1822867&r2=1822868&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/INSTALL (original)
+++ subversion/branches/shelve-checkpoint/INSTALL Thu Feb 1 11:17:40 2018
@@ -856,11 +856,7 @@ II. INSTALLATION
E.4 Building the Binaries
- To build the binaries either follow the instructions here or use
- build\win32\vc6-build.bat.in after editing its default paths to match
- yours and saving it as vc6-build.bat. The vc6-build.bat does a full build
- using all options so it requires Apache 2 source and the other optional
- components.
+ To build the binaries either follow these instructions.
Start in the SVN directory you created.
Modified: subversion/branches/shelve-checkpoint/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/Makefile.in?rev=1822868&r1=1822867&r2=1822868&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/Makefile.in (original)
+++ subversion/branches/shelve-checkpoint/Makefile.in Thu Feb 1 11:17:40 2018
@@ -601,6 +601,9 @@ check: bin @TRANSFORM_LIBTOOL_SCRIPTS@ $
if test "$(FSFS_DIR_DELTIFICATION)" != ""; then \
flags="--fsfs-dir-deltification $(FSFS_DIR_DELTIFICATION) $$flags";\
fi; \
+ if test "$(SVN_BIN_DIR)" != ""; then \
+ flags="--bin $(SVN_BIN_DIR) $$flags"; \
+ fi; \
LD_LIBRARY_PATH='$(auth_plugin_dirs):$(LD_LIBRARY_PATH)' \
$(PYTHON) $(top_srcdir)/build/run_tests.py \
--config-file $(top_srcdir)/subversion/tests/tests.conf \
Modified: subversion/branches/shelve-checkpoint/build/generator/templates/vcnet_vcxproj.ezt
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/build/generator/templates/vcnet_vcxproj.ezt?rev=1822868&r1=1822867&r2=1822868&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/build/generator/templates/vcnet_vcxproj.ezt (original)
+++ subversion/branches/shelve-checkpoint/build/generator/templates/vcnet_vcxproj.ezt Thu Feb 1 11:17:40 2018
@@ -62,7 +62,6 @@
<PreprocessorDefinitions>[if-any instrument_apr_pools]APR_POOL_DEBUG=[instrument_apr_pools];[end][is platforms "x64"]WIN64;[end][for configs.defines][configs.defines];[end]%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<DisableSpecificWarnings>4100;4127;4206;4512;4701;4706;4800;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<TreatSpecificWarningsAsErrors>4002;4003;4013;4020;4022;4024;4028;4029;4030;4031;4033;4047;4089;4113;4115;4133;4204;4700;4715;4789;%(TreatSpecificWarningsAsErrors)</TreatSpecificWarningsAsErrors>
[if-any configs.forced_include_files] <ForcedIncludeFiles>[for configs.forced_include_files][configs.forced_include_files];[end]%(ForcedIncludeFiles)</ForcedIncludeFiles>
Modified: subversion/branches/shelve-checkpoint/build/run_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/build/run_tests.py?rev=1822868&r1=1822867&r2=1822868&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/build/run_tests.py (original)
+++ subversion/branches/shelve-checkpoint/build/run_tests.py Thu Feb 1 11:17:40 2018
@@ -24,7 +24,7 @@
#
'''usage: python run_tests.py
- [--verbose] [--log-to-stdout] [--cleanup]
+ [--verbose] [--log-to-stdout] [--cleanup] [--bin=<path>]
[--parallel | --parallel=<n>] [--global-scheduler]
[--url=<base-url>] [--http-library=<http-library>] [--enable-sasl]
[--fs-type=<fs-type>] [--fsfs-packing] [--fsfs-sharding=<n>]
Modified: subversion/branches/shelve-checkpoint/gen-make.py
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/gen-make.py?rev=1822868&r1=1822867&r2=1822868&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/gen-make.py (original)
+++ subversion/branches/shelve-checkpoint/gen-make.py Thu Feb 1 11:17:40 2018
@@ -48,7 +48,6 @@ sys.path.insert(1, 'build')
gen_modules = {
'make' : ('gen_make', 'Makefiles for POSIX systems'),
- 'dsp' : ('gen_msvc_dsp', 'MSVC 6.x project files'),
'vcproj' : ('gen_vcnet_vcproj', 'VC.Net project files'),
}
Modified: subversion/branches/shelve-checkpoint/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/include/svn_client.h?rev=1822868&r1=1822867&r2=1822868&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/include/svn_client.h (original)
+++ subversion/branches/shelve-checkpoint/subversion/include/svn_client.h Thu Feb 1 11:17:40 2018
@@ -3060,6 +3060,11 @@ svn_client_blame(const char *path_or_url
* The above two options are mutually exclusive. It is an error to set
* both to TRUE.
*
+ * If @a pretty_print_mergeinfo is true, then describe 'svn:mergeinfo'
+ * property changes in a human-readable form that says what changes were
+ * merged or reverse merged; otherwise (or if the mergeinfo property values
+ * don't parse correctly) display them just like any other property.
+ *
* Generated headers are encoded using @a header_encoding.
*
* Diff output will not be generated for binary files, unless @a
@@ -3090,8 +3095,39 @@ svn_client_blame(const char *path_or_url
* @note @a relative_to_dir doesn't affect the path index generated by
* external diff programs.
*
+ * @since New in 1.11.
+ */
+svn_error_t *
+svn_client_diff7(const apr_array_header_t *diff_options,
+ const char *path_or_url1,
+ const svn_opt_revision_t *revision1,
+ const char *path_or_url2,
+ const svn_opt_revision_t *revision2,
+ const char *relative_to_dir,
+ svn_depth_t depth,
+ svn_boolean_t ignore_ancestry,
+ svn_boolean_t no_diff_added,
+ svn_boolean_t no_diff_deleted,
+ svn_boolean_t show_copies_as_adds,
+ svn_boolean_t ignore_content_type,
+ svn_boolean_t ignore_properties,
+ svn_boolean_t properties_only,
+ svn_boolean_t use_git_diff_format,
+ svn_boolean_t pretty_print_mergeinfo,
+ const char *header_encoding,
+ svn_stream_t *outstream,
+ svn_stream_t *errstream,
+ const apr_array_header_t *changelists,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool);
+
+/** Similar to svn_client_diff7(), but with @a pretty_print_mergeinfo
+ * always passed as @c TRUE.
+ *
+ * @deprecated Provided for backward compatibility with the 1.10 API.
* @since New in 1.8.
*/
+SVN_DEPRECATED
svn_error_t *
svn_client_diff6(const apr_array_header_t *diff_options,
const char *path_or_url1,
@@ -3249,14 +3285,45 @@ svn_client_diff(const apr_array_header_t
* be either a working-copy path or URL.
*
* If @a peg_revision is #svn_opt_revision_unspecified, behave
- * identically to svn_client_diff6(), using @a path_or_url for both of that
+ * identically to svn_client_diff7(), using @a path_or_url for both of that
* function's @a path_or_url1 and @a path_or_url2 arguments.
*
- * All other options are handled identically to svn_client_diff6().
+ * All other options are handled identically to svn_client_diff7().
*
* @since New in 1.8.
*/
svn_error_t *
+svn_client_diff_peg7(const apr_array_header_t *diff_options,
+ const char *path_or_url,
+ const svn_opt_revision_t *peg_revision,
+ const svn_opt_revision_t *start_revision,
+ const svn_opt_revision_t *end_revision,
+ const char *relative_to_dir,
+ svn_depth_t depth,
+ svn_boolean_t ignore_ancestry,
+ svn_boolean_t no_diff_added,
+ svn_boolean_t no_diff_deleted,
+ svn_boolean_t show_copies_as_adds,
+ svn_boolean_t ignore_content_type,
+ svn_boolean_t ignore_properties,
+ svn_boolean_t properties_only,
+ svn_boolean_t use_git_diff_format,
+ svn_boolean_t pretty_print_mergeinfo,
+ const char *header_encoding,
+ svn_stream_t *outstream,
+ svn_stream_t *errstream,
+ const apr_array_header_t *changelists,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool);
+
+/** Similar to svn_client_diff_peg7(), but with @a pretty_print_mergeinfo
+ * always passed as @c TRUE.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
+ * @since New in 1.7.
+ */
+SVN_DEPRECATED
+svn_error_t *
svn_client_diff_peg6(const apr_array_header_t *diff_options,
const char *path_or_url,
const svn_opt_revision_t *peg_revision,
@@ -3419,7 +3486,7 @@ svn_client_diff_peg(const apr_array_head
* Calls @a summarize_func with @a summarize_baton for each difference
* with a #svn_client_diff_summarize_t structure describing the difference.
*
- * See svn_client_diff6() for a description of the other parameters.
+ * See svn_client_diff7() for a description of the other parameters.
*
* @since New in 1.5.
*/
@@ -4274,17 +4341,23 @@ svn_client_relocate(const char *dir,
/**
* Restore the pristine version of working copy @a paths,
- * effectively undoing any local mods. For each path in @a paths,
- * revert it if it is a file. Else if it is a directory, revert
- * according to @a depth:
+ * effectively undoing any local mods. This means returning each
+ * path's versioned status to 'unmodified' and changing its on-disk
+ * state to match that.
+ *
+ * If an item was in a state of conflict, reverting also marks the
+ * conflict as resolved. If there are conflict marker files attached
+ * to the item, these are removed.
*
* @a paths is an array of (const char *) local WC paths.
*
- * If @a depth is #svn_depth_empty, revert just the properties on
- * the directory; else if #svn_depth_files, revert the properties
+ * For each path in @a paths, revert it if it is a file. Else if it is
+ * a directory, revert according to @a depth:
+ * If @a depth is #svn_depth_empty, revert just
+ * the directory; else if #svn_depth_files, revert the directory
* and any files immediately under the directory; else if
* #svn_depth_immediates, revert all of the preceding plus
- * properties on immediate subdirectories; else if #svn_depth_infinity,
+ * immediate subdirectories; else if #svn_depth_infinity,
* revert path and everything under it fully recursively.
*
* @a changelists is an array of <tt>const char *</tt> changelist
@@ -4296,9 +4369,14 @@ svn_client_relocate(const char *dir,
* If @a clear_changelists is TRUE, then changelist information for the
* paths is cleared while reverting.
*
- * If @a metadata_only is TRUE, the files and directories aren't changed
- * by the operation. If there are conflict marker files attached to the
- * targets these are removed.
+ * The @a metadata_only and @a added_keep_local options control the
+ * extent of reverting. If @a metadata_only is TRUE, the working copy
+ * files are untouched, but if there are conflict marker files attached
+ * to these files these markers are removed. Otherwise, if
+ * @a added_keep_local is TRUE, then all items are reverted except an
+ * item that was scheduled as plain 'add' (not a copy) will not be
+ * removed from the working copy. Otherwise, all items are reverted and
+ * their on-disk state changed to match.
*
* If @a ctx->notify_func2 is non-NULL, then for each item reverted,
* call @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of
@@ -4308,8 +4386,28 @@ svn_client_relocate(const char *dir,
* then do not error, just invoke @a ctx->notify_func2 with @a
* ctx->notify_baton2, using notification code #svn_wc_notify_skip.
*
+ * @warn The 'revert' command intentionally and permanently loses
+ * local modifications.
+ *
+ * @since New in 1.11.
+ */
+svn_error_t *
+svn_client_revert4(const apr_array_header_t *paths,
+ svn_depth_t depth,
+ const apr_array_header_t *changelists,
+ svn_boolean_t clear_changelists,
+ svn_boolean_t metadata_only,
+ svn_boolean_t added_keep_local,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *scratch_pool);
+
+/** Similar to svn_client_revert4(), but with @a remove_added_from_disk set to
+ * FALSE.
+ *
* @since New in 1.9.
+ * @deprecated Provided for backwards compatibility with the 1.10 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_client_revert3(const apr_array_header_t *paths,
svn_depth_t depth,
@@ -6735,7 +6833,7 @@ typedef struct svn_client_shelf_t
/* Private fields */
const char *wc_root_abspath;
const char *shelves_dir;
- apr_hash_t *revprops;
+ apr_hash_t *revprops; /* non-null; allocated in POOL */
svn_client_ctx_t *ctx;
apr_pool_t *pool;
} svn_client_shelf_t;
@@ -6770,6 +6868,21 @@ svn_client_shelf_open(svn_client_shelf_t
svn_client_ctx_t *ctx,
apr_pool_t *result_pool);
+/** Open an existing shelf or error if it doesn't exist.
+ *
+ * The shelf should be closed after use by calling svn_client_shelf_close().
+ *
+ * @since New in 1.X.
+ * @warning EXPERIMENTAL.
+ */
+SVN_EXPERIMENTAL
+svn_error_t *
+svn_client_shelf_open_existing(svn_client_shelf_t **shelf_p,
+ const char *name,
+ const char *local_abspath,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *result_pool);
+
/** Close @a shelf.
*
* If @a shelf is NULL, do nothing; otherwise @a shelf must be an open shelf.
@@ -6798,6 +6911,8 @@ svn_client_shelf_delete(const char *name
/** Save the local modifications found by @a paths, @a depth,
* @a changelists as a new version of @a shelf.
*
+ * @a paths are relative to the CWD, or absolute.
+ *
* If there are no local modifications in the specified locations, do not
* create a new version of @a shelf.
*
@@ -6900,7 +7015,7 @@ svn_client_shelf_paths_changed(apr_hash_
apr_pool_t *scratch_pool);
/** Set the log message in @a shelf, using the log message callbacks in
- * the client context.
+ * the client context, and set other revprops to @a revprop_table.
*
* @since New in 1.X.
* @warning EXPERIMENTAL.
@@ -6908,6 +7023,7 @@ svn_client_shelf_paths_changed(apr_hash_
SVN_EXPERIMENTAL
svn_error_t *
svn_client_shelf_set_log_message(svn_client_shelf_t *shelf,
+ apr_hash_t *revprop_table,
svn_boolean_t dry_run,
apr_pool_t *scratch_pool);
@@ -7045,26 +7161,6 @@ svn_client_shelves_list(apr_hash_t **she
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-/** Set @a *any_shelved to indicate if there are any shelved changes in this WC.
- *
- * This shall provide the answer fast, regardless of how many changes
- * are stored, unlike svn_client_shelves_list().
- *
- * ### Initial implementation isn't O(1) fast -- it just calls
- * svn_client_shelves_list().
- *
- * @a local_abspath is any path in the WC and is used to find the WC root.
- *
- * @since New in 1.10.
- * @warning EXPERIMENTAL.
- */
-SVN_EXPERIMENTAL
-svn_error_t *
-svn_client_shelves_any(svn_boolean_t *any_shelved,
- const char *local_abspath,
- svn_client_ctx_t *ctx,
- apr_pool_t *scratch_pool);
-
/** Set @a *affected_paths to a hash with one entry for each path affected
* by the shelf @a name. The hash key is the old path and value is
* the new path, both relative to the WC root. The key and value are the
Modified: subversion/branches/shelve-checkpoint/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/include/svn_wc.h?rev=1822868&r1=1822867&r2=1822868&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/include/svn_wc.h (original)
+++ subversion/branches/shelve-checkpoint/subversion/include/svn_wc.h Thu Feb 1 11:17:40 2018
@@ -7602,9 +7602,14 @@ svn_wc_relocate(const char *path,
* If @a clear_changelists is TRUE, then changelist information for the
* paths is cleared.
*
- * If @a metadata_only is TRUE, the working copy files are untouched, but
- * if there are conflict marker files attached to these files these
- * markers are removed.
+ * The @a metadata_only and @a added_keep_local options control the
+ * extent of reverting. If @a metadata_only is TRUE, the working copy
+ * files are untouched, but if there are conflict marker files attached
+ * to these files these markers are removed. Otherwise, if
+ * @a added_keep_local is TRUE, then all items are reverted except an
+ * item that was scheduled as plain 'add' (not a copy) will not be
+ * removed from the working copy. Otherwise, all items are reverted and
+ * their on-disk state changed to match.
*
* If @a cancel_func is non-NULL, call it with @a cancel_baton at
* various points during the reversion process. If it returns an
@@ -7622,8 +7627,30 @@ svn_wc_relocate(const char *path,
* If @a path is not under version control, return the error
* #SVN_ERR_UNVERSIONED_RESOURCE.
*
+ * @since New in 1.11.
+ */
+svn_error_t *
+svn_wc_revert6(svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ svn_depth_t depth,
+ svn_boolean_t use_commit_times,
+ const apr_array_header_t *changelist_filter,
+ svn_boolean_t clear_changelists,
+ svn_boolean_t metadata_only,
+ svn_boolean_t added_keep_local,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ apr_pool_t *scratch_pool);
+
+/** Similar to svn_wc_revert6() but with @a remove_added_from_disk always
+ * set to FALSE.
+ *
* @since New in 1.9.
+ * @deprecated Provided for backward compatibility with the 1.10 API.
*/
+SVN_DEPRECATED
svn_error_t *
svn_wc_revert5(svn_wc_context_t *wc_ctx,
const char *local_abspath,
Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_client/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_client/conflicts.c?rev=1822868&r1=1822867&r2=1822868&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_client/conflicts.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_client/conflicts.c Thu Feb 1 11:17:40 2018
@@ -9841,12 +9841,6 @@ configure_option_incoming_move_file_merg
const char *incoming_new_repos_relpath;
svn_revnum_t incoming_new_pegrev;
svn_node_kind_t incoming_new_kind;
- struct conflict_tree_incoming_delete_details *details;
-
- details = conflict->tree_conflict_incoming_details;
- if (details == NULL || details->moves == NULL)
- return SVN_NO_ERROR;
-
incoming_change = svn_client_conflict_get_incoming_change(conflict);
victim_node_kind = svn_client_conflict_tree_get_victim_node_kind(conflict);
SVN_ERR(svn_client_conflict_get_incoming_old_repos_location(
@@ -9863,8 +9857,13 @@ configure_option_incoming_move_file_merg
incoming_new_kind == svn_node_none &&
incoming_change == svn_wc_conflict_action_delete)
{
+ struct conflict_tree_incoming_delete_details *details;
const char *description;
+ details = conflict->tree_conflict_incoming_details;
+ if (details == NULL || details->moves == NULL)
+ return SVN_NO_ERROR;
+
if (apr_hash_count(details->wc_move_targets) == 0)
return SVN_NO_ERROR;
@@ -9899,11 +9898,6 @@ configure_option_incoming_dir_merge(svn_
const char *incoming_new_repos_relpath;
svn_revnum_t incoming_new_pegrev;
svn_node_kind_t incoming_new_kind;
- struct conflict_tree_incoming_delete_details *details;
-
- details = conflict->tree_conflict_incoming_details;
- if (details == NULL || details->moves == NULL)
- return SVN_NO_ERROR;
incoming_change = svn_client_conflict_get_incoming_change(conflict);
victim_node_kind = svn_client_conflict_tree_get_victim_node_kind(conflict);
@@ -9921,8 +9915,13 @@ configure_option_incoming_dir_merge(svn_
incoming_new_kind == svn_node_none &&
incoming_change == svn_wc_conflict_action_delete)
{
+ struct conflict_tree_incoming_delete_details *details;
const char *description;
+ details = conflict->tree_conflict_incoming_details;
+ if (details == NULL || details->moves == NULL)
+ return SVN_NO_ERROR;
+
if (apr_hash_count(details->wc_move_targets) == 0)
return SVN_NO_ERROR;
Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_client/deprecated.c?rev=1822868&r1=1822867&r2=1822868&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_client/deprecated.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_client/deprecated.c Thu Feb 1 11:17:40 2018
@@ -936,6 +936,42 @@ svn_client_delete(svn_client_commit_info
/*** From diff.c ***/
svn_error_t *
+svn_client_diff6(const apr_array_header_t *diff_options,
+ const char *path_or_url1,
+ const svn_opt_revision_t *revision1,
+ const char *path_or_url2,
+ const svn_opt_revision_t *revision2,
+ const char *relative_to_dir,
+ svn_depth_t depth,
+ svn_boolean_t ignore_ancestry,
+ svn_boolean_t no_diff_added,
+ svn_boolean_t no_diff_deleted,
+ svn_boolean_t show_copies_as_adds,
+ svn_boolean_t ignore_content_type,
+ svn_boolean_t ignore_properties,
+ svn_boolean_t properties_only,
+ svn_boolean_t use_git_diff_format,
+ const char *header_encoding,
+ svn_stream_t *outstream,
+ svn_stream_t *errstream,
+ const apr_array_header_t *changelists,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool)
+{
+ return svn_client_diff7(diff_options,
+ path_or_url1, revision1,
+ path_or_url2, revision2,
+ relative_to_dir, depth,
+ ignore_ancestry, no_diff_added,
+ no_diff_deleted, show_copies_as_adds,
+ ignore_content_type, ignore_properties,
+ properties_only, use_git_diff_format,
+ TRUE /*pretty_print_mergeinfo*/,
+ header_encoding,
+ outstream, errstream, changelists, ctx, pool);
+}
+
+svn_error_t *
svn_client_diff5(const apr_array_header_t *diff_options,
const char *path1,
const svn_opt_revision_t *revision1,
@@ -1058,6 +1094,53 @@ svn_client_diff(const apr_array_header_t
}
svn_error_t *
+svn_client_diff_peg6(const apr_array_header_t *options,
+ const char *path_or_url,
+ const svn_opt_revision_t *peg_revision,
+ const svn_opt_revision_t *start_revision,
+ const svn_opt_revision_t *end_revision,
+ const char *relative_to_dir,
+ svn_depth_t depth,
+ svn_boolean_t ignore_ancestry,
+ svn_boolean_t no_diff_added,
+ svn_boolean_t no_diff_deleted,
+ svn_boolean_t show_copies_as_adds,
+ svn_boolean_t ignore_content_type,
+ svn_boolean_t ignore_properties,
+ svn_boolean_t properties_only,
+ svn_boolean_t use_git_diff_format,
+ const char *header_encoding,
+ svn_stream_t *outstream,
+ svn_stream_t *errstream,
+ const apr_array_header_t *changelists,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool)
+{
+ return svn_client_diff_peg7(options,
+ path_or_url,
+ peg_revision,
+ start_revision,
+ end_revision,
+ relative_to_dir,
+ depth,
+ ignore_ancestry,
+ no_diff_added,
+ no_diff_deleted,
+ show_copies_as_adds,
+ ignore_content_type,
+ ignore_properties,
+ properties_only,
+ use_git_diff_format,
+ TRUE /*pretty_print_mergeinfo*/,
+ header_encoding,
+ outstream,
+ errstream,
+ changelists,
+ ctx,
+ pool);
+}
+
+svn_error_t *
svn_client_diff_peg5(const apr_array_header_t *diff_options,
const char *path,
const svn_opt_revision_t *peg_revision,
@@ -2853,6 +2936,22 @@ svn_client_resolved(const char *path,
}
/*** From revert.c ***/
svn_error_t *
+svn_client_revert3(const apr_array_header_t *paths,
+ svn_depth_t depth,
+ const apr_array_header_t *changelists,
+ svn_boolean_t clear_changelists,
+ svn_boolean_t metadata_only,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool)
+{
+ SVN_ERR(svn_client_revert4(paths, depth, changelists,
+ clear_changelists, metadata_only,
+ TRUE /*added_keep_local*/,
+ ctx, pool));
+ return SVN_NO_ERROR;
+}
+
+svn_error_t *
svn_client_revert2(const apr_array_header_t *paths,
svn_depth_t depth,
const apr_array_header_t *changelists,
Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_client/diff.c?rev=1822868&r1=1822867&r2=1822868&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_client/diff.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_client/diff.c Thu Feb 1 11:17:40 2018
@@ -489,7 +489,7 @@ print_git_diff_header(svn_stream_t *os,
/* A helper func that writes out verbal descriptions of property diffs
to OUTSTREAM. Of course, OUTSTREAM will probably be whatever was
- passed to svn_client_diff6(), which is probably stdout.
+ passed to svn_client_diff7(), which is probably stdout.
### FIXME needs proper docstring
@@ -498,6 +498,11 @@ print_git_diff_header(svn_stream_t *os,
needed to normalize paths relative the repository root, and are ignored
if USE_GIT_DIFF_FORMAT is FALSE.
+ If @a pretty_print_mergeinfo is true, then describe 'svn:mergeinfo'
+ property changes in a human-readable form that says what changes were
+ merged or reverse merged; otherwise (or if the mergeinfo property values
+ don't parse correctly) display them just like any other property.
+
ANCHOR is the local path where the diff editor is anchored. */
static svn_error_t *
display_prop_diffs(const apr_array_header_t *propchanges,
@@ -514,6 +519,7 @@ display_prop_diffs(const apr_array_heade
const char *relative_to_dir,
svn_boolean_t show_diff_header,
svn_boolean_t use_git_diff_format,
+ svn_boolean_t pretty_print_mergeinfo,
const char *ra_session_relpath,
svn_cancel_func_t cancel_func,
void *cancel_baton,
@@ -588,7 +594,7 @@ display_prop_diffs(const apr_array_heade
SVN_ERR(svn_diff__display_prop_diffs(
outstream, encoding, propchanges, left_props,
- TRUE /* pretty_print_mergeinfo */,
+ pretty_print_mergeinfo,
-1 /* context_size */,
cancel_func, cancel_baton, scratch_pool));
@@ -668,6 +674,9 @@ typedef struct diff_writer_info_t
/* Whether to ignore copyfrom information when showing adds */
svn_boolean_t show_copies_as_adds;
+ /* Whether to show mergeinfo prop changes in human-readable form */
+ svn_boolean_t pretty_print_mergeinfo;
+
/* Empty files for creating diffs or NULL if not used yet */
const char *empty_file;
@@ -718,6 +727,7 @@ diff_props_changed(const char *diff_relp
dwi->relative_to_dir,
show_diff_header,
dwi->use_git_diff_format,
+ dwi->pretty_print_mergeinfo,
dwi->ddi.session_relpath,
dwi->cancel_func,
dwi->cancel_baton,
@@ -1766,8 +1776,8 @@ diff_prepare_repos_repos(const char **ur
/* A Theoretical Note From Ben, regarding do_diff().
- This function is really svn_client_diff6(). If you read the public
- API description for svn_client_diff6(), it sounds quite Grand. It
+ This function is really svn_client_diff7(). If you read the public
+ API description for svn_client_diff7(), it sounds quite Grand. It
sounds really generalized and abstract and beautiful: that it will
diff any two paths, be they working-copy paths or URLs, at any two
revisions.
@@ -1791,7 +1801,7 @@ diff_prepare_repos_repos(const char **ur
pigeonholed into one of these use-cases, we currently bail with a
friendly apology.
- Perhaps someday a brave soul will truly make svn_client_diff6()
+ Perhaps someday a brave soul will truly make svn_client_diff7()
perfectly general. For now, we live with the 90% case. Certainly,
the commandline client only calls this function in legal ways.
When there are other users of svn_client.h, maybe this will become
@@ -1804,7 +1814,7 @@ static svn_error_t *
unsupported_diff_error(svn_error_t *child_err)
{
return svn_error_create(SVN_ERR_INCORRECT_PARAMS, child_err,
- _("Sorry, svn_client_diff6 was called in a way "
+ _("Sorry, svn_client_diff7 was called in a way "
"that is not yet supported"));
}
@@ -1813,7 +1823,7 @@ unsupported_diff_error(svn_error_t *chil
PATH1 and PATH2 are both working copy paths. REVISION1 and
REVISION2 are their respective revisions.
- All other options are the same as those passed to svn_client_diff6(). */
+ All other options are the same as those passed to svn_client_diff7(). */
static svn_error_t *
diff_wc_wc(const char **root_relpath,
svn_boolean_t *root_is_dir,
@@ -1844,8 +1854,9 @@ diff_wc_wc(const char **root_relpath,
&& (revision2->kind == svn_opt_revision_working))))
return unsupported_diff_error(
svn_error_create(SVN_ERR_INCORRECT_PARAMS, NULL,
- _("Only diffs between a path's text-base "
- "and its working files are supported at this time"
+ _("A non-URL diff at this time must be either from "
+ "a path's base to the same path's working version "
+ "or between the working versions of two paths"
)));
if (ddi)
@@ -1878,7 +1889,7 @@ diff_wc_wc(const char **root_relpath,
and the actual two paths compared are determined by following copy
history from PATH_OR_URL2.
- All other options are the same as those passed to svn_client_diff6(). */
+ All other options are the same as those passed to svn_client_diff7(). */
static svn_error_t *
diff_repos_repos(const char **root_relpath,
svn_boolean_t *root_is_dir,
@@ -2048,7 +2059,7 @@ diff_repos_repos(const char **root_relpa
If REVERSE is TRUE, the diff will be reported in reverse.
- All other options are the same as those passed to svn_client_diff6(). */
+ All other options are the same as those passed to svn_client_diff7(). */
static svn_error_t *
diff_repos_wc(const char **root_relpath,
svn_boolean_t *root_is_dir,
@@ -2519,7 +2530,7 @@ create_diff_writer_info(diff_writer_info
* These cases require server communication.
*/
svn_error_t *
-svn_client_diff6(const apr_array_header_t *options,
+svn_client_diff7(const apr_array_header_t *options,
const char *path_or_url1,
const svn_opt_revision_t *revision1,
const char *path_or_url2,
@@ -2534,6 +2545,7 @@ svn_client_diff6(const apr_array_header_
svn_boolean_t ignore_properties,
svn_boolean_t properties_only,
svn_boolean_t use_git_diff_format,
+ svn_boolean_t pretty_print_mergeinfo,
const char *header_encoding,
svn_stream_t *outstream,
svn_stream_t *errstream,
@@ -2573,6 +2585,7 @@ svn_client_diff6(const apr_array_header_
dwi.no_diff_added = no_diff_added;
dwi.no_diff_deleted = no_diff_deleted;
dwi.show_copies_as_adds = show_copies_as_adds;
+ dwi.pretty_print_mergeinfo = pretty_print_mergeinfo;
dwi.cancel_func = ctx->cancel_func;
dwi.cancel_baton = ctx->cancel_baton;
@@ -2607,7 +2620,7 @@ svn_client_diff6(const apr_array_header_
}
svn_error_t *
-svn_client_diff_peg6(const apr_array_header_t *options,
+svn_client_diff_peg7(const apr_array_header_t *options,
const char *path_or_url,
const svn_opt_revision_t *peg_revision,
const svn_opt_revision_t *start_revision,
@@ -2622,6 +2635,7 @@ svn_client_diff_peg6(const apr_array_hea
svn_boolean_t ignore_properties,
svn_boolean_t properties_only,
svn_boolean_t use_git_diff_format,
+ svn_boolean_t pretty_print_mergeinfo,
const char *header_encoding,
svn_stream_t *outstream,
svn_stream_t *errstream,
@@ -2657,6 +2671,7 @@ svn_client_diff_peg6(const apr_array_hea
dwi.no_diff_added = no_diff_added;
dwi.no_diff_deleted = no_diff_deleted;
dwi.show_copies_as_adds = show_copies_as_adds;
+ dwi.pretty_print_mergeinfo = pretty_print_mergeinfo;
dwi.cancel_func = ctx->cancel_func;
dwi.cancel_baton = ctx->cancel_baton;
Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_client/revert.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_client/revert.c?rev=1822868&r1=1822867&r2=1822868&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_client/revert.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_client/revert.c Thu Feb 1 11:17:40 2018
@@ -51,6 +51,7 @@ struct revert_with_write_lock_baton {
const apr_array_header_t *changelists;
svn_boolean_t clear_changelists;
svn_boolean_t metadata_only;
+ svn_boolean_t added_keep_local;
svn_client_ctx_t *ctx;
};
@@ -80,13 +81,14 @@ revert(void *baton, apr_pool_t *result_p
struct revert_with_write_lock_baton *b = baton;
svn_error_t *err;
- err = svn_wc_revert5(b->ctx->wc_ctx,
+ err = svn_wc_revert6(b->ctx->wc_ctx,
b->local_abspath,
b->depth,
b->use_commit_times,
b->changelists,
b->clear_changelists,
b->metadata_only,
+ b->added_keep_local,
b->ctx->cancel_func, b->ctx->cancel_baton,
b->ctx->notify_func2, b->ctx->notify_baton2,
scratch_pool);
@@ -123,11 +125,12 @@ revert(void *baton, apr_pool_t *result_p
svn_error_t *
-svn_client_revert3(const apr_array_header_t *paths,
+svn_client_revert4(const apr_array_header_t *paths,
svn_depth_t depth,
const apr_array_header_t *changelists,
svn_boolean_t clear_changelists,
svn_boolean_t metadata_only,
+ svn_boolean_t added_keep_local,
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
@@ -183,6 +186,7 @@ svn_client_revert3(const apr_array_heade
baton.changelists = changelists;
baton.clear_changelists = clear_changelists;
baton.metadata_only = metadata_only;
+ baton.added_keep_local = added_keep_local;
baton.ctx = ctx;
err = svn_wc__is_wcroot(&wc_root, ctx->wc_ctx, local_abspath, iterpool);
Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_client/shelf.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_client/shelf.c?rev=1822868&r1=1822867&r2=1822868&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_client/shelf.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_client/shelf.c Thu Feb 1 11:17:40 2018
@@ -35,6 +35,7 @@
#include "svn_hash.h"
#include "svn_utf.h"
#include "svn_ctype.h"
+#include "svn_props.h"
#include "client.h"
#include "private/svn_client_private.h"
@@ -98,10 +99,12 @@ shelf_name_from_filename(char **name,
apr_pool_t *result_pool)
{
size_t len = strlen(filename);
+ static const char suffix[] = ".current";
+ int suffix_len = sizeof(suffix) - 1;
- if (len > 8 && strcmp(filename + len - 8, ".current") == 0)
+ if (len > suffix_len && strcmp(filename + len - suffix_len, suffix) == 0)
{
- char *codename = apr_pstrndup(result_pool, filename, len - 6);
+ char *codename = apr_pstrndup(result_pool, filename, len - suffix_len);
SVN_ERR(shelf_name_decode(name, codename, result_pool));
}
else
@@ -199,7 +202,7 @@ shelf_read_revprops(svn_client_shelf_t *
shelf->revprops = apr_hash_make(shelf->pool);
err = svn_stream_open_readonly(&stream, log_abspath,
scratch_pool, scratch_pool);
- if (err && err->apr_err == APR_ENOENT)
+ if (err && APR_STATUS_IS_ENOENT(err->apr_err))
{
svn_error_clear(err);
return SVN_NO_ERROR;
@@ -362,7 +365,7 @@ write_patch(const char *patch_abspath,
_("'%s' is not a local path"), path);
SVN_ERR(svn_dirent_get_absolute(&path, path, scratch_pool));
- SVN_ERR(svn_client_diff_peg6(
+ SVN_ERR(svn_client_diff_peg7(
NULL /*options*/,
path,
&peg_revision,
@@ -378,6 +381,7 @@ write_patch(const char *patch_abspath,
FALSE /*ignore_properties*/,
FALSE /*properties_only*/,
FALSE /*use_git_diff_format*/,
+ FALSE /*pretty_print_mergeinfo*/,
SVN_APR_LOCALE_CHARSET,
outstream,
errstream,
@@ -390,12 +394,15 @@ write_patch(const char *patch_abspath,
return SVN_NO_ERROR;
}
-svn_error_t *
-svn_client_shelf_open(svn_client_shelf_t **shelf_p,
- const char *name,
- const char *local_abspath,
- svn_client_ctx_t *ctx,
- apr_pool_t *result_pool)
+/* Construct a shelf object representing an empty shelf: no versions,
+ * no revprops, no looking to see if such a shelf exists on disk.
+ */
+static svn_error_t *
+shelf_construct(svn_client_shelf_t **shelf_p,
+ const char *name,
+ const char *local_abspath,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *result_pool)
{
svn_client_shelf_t *shelf = apr_palloc(result_pool, sizeof(*shelf));
char *shelves_dir;
@@ -411,14 +418,48 @@ svn_client_shelf_open(svn_client_shelf_t
shelf->pool = result_pool;
shelf->name = apr_pstrdup(result_pool, name);
- SVN_ERR(shelf_read_revprops(shelf, result_pool));
- SVN_ERR(shelf_read_current(shelf, result_pool));
+ shelf->revprops = apr_hash_make(result_pool);
+ shelf->max_version = 0;
*shelf_p = shelf;
return SVN_NO_ERROR;
}
svn_error_t *
+svn_client_shelf_open_existing(svn_client_shelf_t **shelf_p,
+ const char *name,
+ const char *local_abspath,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *result_pool)
+{
+ SVN_ERR(shelf_construct(shelf_p, name,
+ local_abspath, ctx, result_pool));
+ SVN_ERR(shelf_read_revprops(*shelf_p, result_pool));
+ SVN_ERR(shelf_read_current(*shelf_p, result_pool));
+ if ((*shelf_p)->max_version <= 0)
+ {
+ return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+ _("Shelf '%s' not found"),
+ name);
+ }
+ return SVN_NO_ERROR;
+}
+
+svn_error_t *
+svn_client_shelf_open(svn_client_shelf_t **shelf_p,
+ const char *name,
+ const char *local_abspath,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *result_pool)
+{
+ SVN_ERR(shelf_construct(shelf_p, name,
+ local_abspath, ctx, result_pool));
+ SVN_ERR(shelf_read_revprops(*shelf_p, result_pool));
+ SVN_ERR(shelf_read_current(*shelf_p, result_pool));
+ return SVN_NO_ERROR;
+}
+
+svn_error_t *
svn_client_shelf_close(svn_client_shelf_t *shelf,
apr_pool_t *scratch_pool)
{
@@ -436,8 +477,8 @@ svn_client_shelf_delete(const char *name
int i;
char *abspath;
- SVN_ERR(svn_client_shelf_open(&shelf,
- name, local_abspath, ctx, scratch_pool));
+ SVN_ERR(svn_client_shelf_open_existing(&shelf, name,
+ local_abspath, ctx, scratch_pool));
/* Remove the patches. */
for (i = shelf->max_version; i > 0; i--)
@@ -455,22 +496,31 @@ svn_client_shelf_delete(const char *name
return SVN_NO_ERROR;
}
-svn_error_t *
-svn_client_shelf_paths_changed(apr_hash_t **affected_paths,
- svn_client_shelf_version_t *shelf_version,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
+/* Get the paths changed, relative to WC root, as a hash and/or an array.
+ */
+static svn_error_t *
+shelf_paths_changed(apr_hash_t **paths_hash_p,
+ apr_array_header_t **paths_array_p,
+ svn_client_shelf_version_t *shelf_version,
+ svn_boolean_t as_abspath,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
+ svn_client_shelf_t *shelf = shelf_version->shelf;
svn_patch_file_t *patch_file;
apr_pool_t *iterpool = svn_pool_create(scratch_pool);
- apr_hash_t *paths = apr_hash_make(result_pool);
+ if (paths_hash_p)
+ *paths_hash_p = apr_hash_make(result_pool);
+ if (paths_array_p)
+ *paths_array_p = apr_array_make(result_pool, 0, sizeof(void *));
SVN_ERR(svn_diff_open_patch_file(&patch_file, shelf_version->patch_abspath,
result_pool));
while (1)
{
svn_patch_t *patch;
+ char *old_path, *new_path;
svn_pool_clear(iterpool);
SVN_ERR(svn_diff_parse_next_patch(&patch, patch_file,
@@ -479,14 +529,41 @@ svn_client_shelf_paths_changed(apr_hash_
iterpool, iterpool));
if (! patch)
break;
- svn_hash_sets(paths,
- apr_pstrdup(result_pool, patch->old_filename),
- apr_pstrdup(result_pool, patch->new_filename));
+
+ old_path = (as_abspath
+ ? svn_dirent_join(shelf->wc_root_abspath,
+ patch->old_filename, result_pool)
+ : apr_pstrdup(result_pool, patch->old_filename));
+ new_path = (as_abspath
+ ? svn_dirent_join(shelf->wc_root_abspath,
+ patch->new_filename, result_pool)
+ : apr_pstrdup(result_pool, patch->new_filename));
+ if (paths_hash_p)
+ {
+ svn_hash_sets(*paths_hash_p, old_path, new_path);
+ }
+ if (paths_array_p)
+ {
+ APR_ARRAY_PUSH(*paths_array_p, void *) = old_path;
+ if (strcmp(old_path, new_path) != 0)
+ APR_ARRAY_PUSH(*paths_array_p, void *) = new_path;
+ }
}
SVN_ERR(svn_diff_close_patch_file(patch_file, iterpool));
svn_pool_destroy(iterpool);
- *affected_paths = paths;
+ return SVN_NO_ERROR;
+}
+
+svn_error_t *
+svn_client_shelf_paths_changed(apr_hash_t **affected_paths,
+ svn_client_shelf_version_t *shelf_version,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ SVN_ERR(shelf_paths_changed(affected_paths, NULL, shelf_version,
+ FALSE /*as_abspath*/,
+ result_pool, scratch_pool));
return SVN_NO_ERROR;
}
@@ -511,14 +588,20 @@ svn_client_shelf_unapply(svn_client_shel
svn_boolean_t dry_run,
apr_pool_t *scratch_pool)
{
- SVN_ERR(svn_client_patch(shelf_version->patch_abspath,
- shelf_version->shelf->wc_root_abspath,
- dry_run, 0 /*strip*/,
- TRUE /*reverse*/,
- FALSE /*ignore_whitespace*/,
- TRUE /*remove_tempfiles*/, NULL, NULL,
- shelf_version->shelf->ctx, scratch_pool));
+ apr_array_header_t *targets;
+ SVN_ERR(shelf_paths_changed(NULL, &targets, shelf_version,
+ TRUE /*as_abspath*/,
+ scratch_pool, scratch_pool));
+ if (!dry_run)
+ {
+ SVN_ERR(svn_client_revert4(targets, svn_depth_empty,
+ NULL /*changelists*/,
+ FALSE /*clear_changelists*/,
+ FALSE /*metadata_only*/,
+ FALSE /*added_keep_local*/,
+ shelf_version->shelf->ctx, scratch_pool));
+ }
return SVN_NO_ERROR;
}
@@ -607,6 +690,7 @@ svn_client_shelf_get_log_message(char **
svn_error_t *
svn_client_shelf_set_log_message(svn_client_shelf_t *shelf,
+ apr_hash_t *revprop_table,
svn_boolean_t dry_run,
apr_pool_t *scratch_pool)
{
@@ -625,6 +709,12 @@ svn_client_shelf_set_log_message(svn_cli
if (! message)
return SVN_NO_ERROR;
}
+
+ if (revprop_table)
+ shelf->revprops = svn_prop_hash_dup(revprop_table, shelf->pool);
+ else
+ shelf->revprops = apr_hash_make(shelf->pool);
+
if (message && !dry_run)
{
svn_string_t *propval = svn_string_create(message, shelf->pool);
Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_client/shelve.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_client/shelve.c?rev=1822868&r1=1822867&r2=1822868&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_client/shelve.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_client/shelve.c Thu Feb 1 11:17:40 2018
@@ -536,17 +536,3 @@ svn_client_shelves_list(apr_hash_t **she
return SVN_NO_ERROR;
}
-
-svn_error_t *
-svn_client_shelves_any(svn_boolean_t *any_shelved,
- const char *local_abspath,
- svn_client_ctx_t *ctx,
- apr_pool_t *scratch_pool)
-{
- apr_hash_t *shelved_patch_infos;
-
- SVN_ERR(svn_client_shelves_list(&shelved_patch_infos, local_abspath,
- ctx, scratch_pool, scratch_pool));
- *any_shelved = apr_hash_count(shelved_patch_infos) != 0;
- return SVN_NO_ERROR;
-}
Propchange: subversion/branches/shelve-checkpoint/subversion/libsvn_client/shelve.c
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb 1 11:17:40 2018
@@ -99,4 +99,4 @@
/subversion/branches/verify-at-commit/subversion/libsvn_client/shelve.c:1462039-1462408
/subversion/branches/verify-keep-going/subversion/libsvn_client/shelve.c:1439280-1546110
/subversion/branches/wc-collate-path/subversion/libsvn_client/shelve.c:1402685-1480384
-/subversion/trunk/subversion/libsvn_client/shelve.c:1815228-1817400
+/subversion/trunk/subversion/libsvn_client/shelve.c:1815228-1822866
Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_diff/parse-diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_diff/parse-diff.c?rev=1822868&r1=1822867&r2=1822868&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_diff/parse-diff.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_diff/parse-diff.c Thu Feb 1 11:17:40 2018
@@ -69,6 +69,11 @@ struct svn_diff_hunk_t {
/* APR file handle to the patch file this hunk came from. */
apr_file_t *apr_file;
+ /* Whether the hunk was interpreted as pretty-print mergeinfo. If so,
+ the hunk content is in PATCH and the rest of this hunk object is
+ mostly uninitialized. */
+ svn_boolean_t is_pretty_print_mergeinfo;
+
/* Ranges used to keep track of this hunk's texts positions within
* the patch file. */
struct svn_diff__hunk_range diff_text_range;
@@ -899,10 +904,6 @@ parse_prop_name(const char **prop_name,
* The hunk header has the following format:
* ## -0,NUMBER_OF_REVERSE_MERGES +0,NUMBER_OF_FORWARD_MERGES ##
*
- * At this point, the number of reverse merges has already been
- * parsed into HUNK->ORIGINAL_LENGTH, and the number of forward
- * merges has been parsed into HUNK->MODIFIED_LENGTH.
- *
* The header is followed by a list of mergeinfo, one path per line.
* This function parses such lines. Lines describing reverse merges
* appear first, and then all lines describing forward merges appear.
@@ -914,18 +915,27 @@ parse_prop_name(const char **prop_name,
* ":r", which in turn is followed by a mergeinfo revision range,
* which is terminated by whitespace or end-of-string.
*
- * If the current line meets the above criteria and we're able
- * to parse valid mergeinfo from it, the resulting mergeinfo
- * is added to patch->mergeinfo or patch->reverse_mergeinfo,
- * and we proceed to the next line.
+ * *NUMBER_OF_REVERSE_MERGES and *NUMBER_OF_FORWARD_MERGES are the
+ * numbers of reverse and forward merges remaining to be read. This
+ * function decrements *NUMBER_OF_REVERSE_MERGES for each LINE
+ * parsed until that is zero, then *NUMBER_OF_FORWARD_MERGES for
+ * each LINE parsed until that is zero. If both are zero, it parses
+ * and discards LINE.
+ *
+ * If LINE is successfully parsed, *FOUND_MERGEINFO is set to TRUE,
+ * otherwise to FALSE.
+ *
+ * If LINE is successfully parsed and counted, the resulting mergeinfo
+ * is added to PATCH->mergeinfo or PATCH->reverse_mergeinfo.
*/
static svn_error_t *
-parse_mergeinfo(svn_boolean_t *found_mergeinfo,
- svn_stringbuf_t *line,
- svn_diff_hunk_t *hunk,
- svn_patch_t *patch,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
+parse_pretty_mergeinfo_line(svn_boolean_t *found_mergeinfo,
+ svn_linenum_t *number_of_reverse_merges,
+ svn_linenum_t *number_of_forward_merges,
+ svn_stringbuf_t *line,
+ svn_patch_t *patch,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
char *slash = strchr(line->data, '/');
char *colon = strrchr(line->data, ':');
@@ -972,7 +982,7 @@ parse_mergeinfo(svn_boolean_t *found_mer
if (mergeinfo)
{
- if (hunk->original_length > 0) /* reverse merges */
+ if (*number_of_reverse_merges > 0) /* reverse merges */
{
if (patch->reverse)
{
@@ -994,9 +1004,9 @@ parse_mergeinfo(svn_boolean_t *found_mer
result_pool,
scratch_pool));
}
- hunk->original_length--;
+ (*number_of_reverse_merges)--;
}
- else if (hunk->modified_length > 0) /* forward merges */
+ else if (number_of_forward_merges > 0) /* forward merges */
{
if (patch->reverse)
{
@@ -1018,7 +1028,7 @@ parse_mergeinfo(svn_boolean_t *found_mer
result_pool,
scratch_pool));
}
- hunk->modified_length--;
+ (*number_of_forward_merges)--;
}
*found_mergeinfo = TRUE;
@@ -1165,18 +1175,48 @@ parse_next_hunk(svn_diff_hunk_t **hunk,
if (in_hunk && *is_property && *prop_name &&
strcmp(*prop_name, SVN_PROP_MERGEINFO) == 0)
{
- svn_boolean_t found_mergeinfo;
+ svn_boolean_t found_pretty_mergeinfo_line;
- SVN_ERR(parse_mergeinfo(&found_mergeinfo, line, *hunk, patch,
- result_pool, iterpool));
- if (found_mergeinfo)
- continue; /* Proceed to the next line in the svn:mergeinfo hunk. */
- else
+ if (! hunk_seen)
+ {
+ /* We're reading the first line of the hunk, so the start
+ * of the line just read is the hunk text's byte offset. */
+ start = last_line;
+ }
+
+ SVN_ERR(parse_pretty_mergeinfo_line(&found_pretty_mergeinfo_line,
+ &original_lines, &modified_lines,
+ line, patch,
+ result_pool, iterpool));
+ if (found_pretty_mergeinfo_line)
{
- /* Perhaps we can also use original_lines/modified_lines here */
+ hunk_seen = TRUE;
+ (*hunk)->is_pretty_print_mergeinfo = TRUE;
+ continue; /* Proceed to the next line in the svn:mergeinfo hunk. */
+ }
- in_hunk = FALSE; /* On to next property */
+ if ((*hunk)->is_pretty_print_mergeinfo)
+ {
+ /* We have reached the end of the pretty-print-mergeinfo hunk.
+ (This format uses only one hunk.) */
+ if (eof)
+ {
+ /* The hunk ends at EOF. */
+ end = pos;
+ }
+ else
+ {
+ /* The start of the current line marks the first byte
+ * after the hunk text. */
+ end = last_line;
+ }
+ original_end = end;
+ modified_end = end;
+ break;
}
+
+ /* Otherwise, this is a property diff in the
+ regular format so fall through to normal processing. */
}
if (in_hunk)
@@ -1971,10 +2011,10 @@ parse_hunks(svn_patch_t *patch, apr_file
else
last_prop_name = prop_name;
- /* Skip svn:mergeinfo properties.
- * Mergeinfo data cannot be represented as a hunk and
+ /* Skip pretty-printed svn:mergeinfo property hunks.
+ * Pretty-printed mergeinfo data cannot be represented as a hunk and
* is therefore stored in PATCH itself. */
- if (strcmp(prop_name, SVN_PROP_MERGEINFO) == 0)
+ if (hunk->is_pretty_print_mergeinfo)
continue;
SVN_ERR(add_property_hunk(patch, prop_name, hunk, prop_operation,
Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_wc/deprecated.c?rev=1822868&r1=1822867&r2=1822868&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_wc/deprecated.c Thu Feb 1 11:17:40 2018
@@ -1091,6 +1091,33 @@ svn_wc_add(const char *path,
/*** From revert.c ***/
svn_error_t *
+svn_wc_revert5(svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ svn_depth_t depth,
+ svn_boolean_t use_commit_times,
+ const apr_array_header_t *changelist_filter,
+ svn_boolean_t clear_changelists,
+ svn_boolean_t metadata_only,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ apr_pool_t *scratch_pool)
+{
+ SVN_ERR(svn_wc_revert6(wc_ctx, local_abspath,
+ depth,
+ use_commit_times,
+ changelist_filter,
+ clear_changelists,
+ metadata_only,
+ TRUE /*added_keep_local*/,
+ cancel_func, cancel_baton,
+ notify_func, notify_baton,
+ scratch_pool));
+ return SVN_NO_ERROR;
+}
+
+svn_error_t *
svn_wc_revert4(svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_depth_t depth,
Modified: subversion/branches/shelve-checkpoint/subversion/libsvn_wc/revert.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/libsvn_wc/revert.c?rev=1822868&r1=1822867&r2=1822868&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/libsvn_wc/revert.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/libsvn_wc/revert.c Thu Feb 1 11:17:40 2018
@@ -285,6 +285,7 @@ revert_restore(svn_boolean_t *run_wq,
svn_boolean_t metadata_only,
svn_boolean_t use_commit_times,
svn_boolean_t revert_root,
+ svn_boolean_t added_keep_local,
const struct svn_wc__db_info_t *info,
svn_cancel_func_t cancel_func,
void *cancel_baton,
@@ -344,8 +345,9 @@ revert_restore(svn_boolean_t *run_wq,
}
else
{
- if (!copied_here)
+ if (added_keep_local && !copied_here)
{
+ /* It is a plain add, and we want to keep the local file/dir. */
if (notify_func && notify_required)
notify_func(notify_baton,
svn_wc_create_notify(local_abspath,
@@ -359,8 +361,17 @@ revert_restore(svn_boolean_t *run_wq,
scratch_pool));
return SVN_NO_ERROR;
}
+ else if (!copied_here)
+ {
+ /* It is a plain add, and we don't want to keep the local file/dir. */
+ status = svn_wc__db_status_not_present;
+ kind = svn_node_none;
+ recorded_size = SVN_INVALID_FILESIZE;
+ recorded_time = 0;
+ }
else
{
+ /* It is a copy, so we don't want to keep the local file/dir. */
/* ### Initialise to values which prevent the code below from
* ### trying to restore anything to disk.
* ### 'status' should be status_unknown but that doesn't exist. */
@@ -429,6 +440,7 @@ revert_restore(svn_boolean_t *run_wq,
SVN_ERR(revert_restore(run_wq,
db, child_abspath, depth, metadata_only,
use_commit_times, FALSE /* revert root */,
+ added_keep_local,
apr_hash_this_val(hi),
cancel_func, cancel_baton,
notify_func, notify_baton,
@@ -536,11 +548,7 @@ revert_wc_data(svn_boolean_t *run_wq,
/* If we expect a versioned item to be present then check that any
item on disk matches the versioned item, if it doesn't match then
fix it or delete it. */
- if (on_disk != svn_node_none
- && status != svn_wc__db_status_server_excluded
- && status != svn_wc__db_status_deleted
- && status != svn_wc__db_status_excluded
- && status != svn_wc__db_status_not_present)
+ if (on_disk != svn_node_none)
{
if (on_disk == svn_node_dir && kind != svn_node_dir)
{
@@ -560,7 +568,11 @@ revert_wc_data(svn_boolean_t *run_wq,
on_disk = svn_node_none;
}
}
- else if (on_disk == svn_node_file)
+ else if (on_disk == svn_node_file
+ && status != svn_wc__db_status_server_excluded
+ && status != svn_wc__db_status_deleted
+ && status != svn_wc__db_status_excluded
+ && status != svn_wc__db_status_not_present)
{
svn_boolean_t modified;
apr_hash_t *props;
@@ -712,6 +724,7 @@ revert(svn_wc__db_t *db,
svn_boolean_t use_commit_times,
svn_boolean_t clear_changelists,
svn_boolean_t metadata_only,
+ svn_boolean_t added_keep_local,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
@@ -762,6 +775,7 @@ revert(svn_wc__db_t *db,
err = svn_error_trace(
revert_restore(&run_queue, db, local_abspath, depth, metadata_only,
use_commit_times, TRUE /* revert root */,
+ added_keep_local,
info, cancel_func, cancel_baton,
notify_func, notify_baton,
scratch_pool));
@@ -791,6 +805,7 @@ revert_changelist(svn_wc__db_t *db,
apr_hash_t *changelist_hash,
svn_boolean_t clear_changelists,
svn_boolean_t metadata_only,
+ svn_boolean_t added_keep_local,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
@@ -809,7 +824,7 @@ revert_changelist(svn_wc__db_t *db,
scratch_pool))
SVN_ERR(revert(db, local_abspath,
svn_depth_empty, use_commit_times, clear_changelists,
- metadata_only,
+ metadata_only, added_keep_local,
cancel_func, cancel_baton,
notify_func, notify_baton,
scratch_pool));
@@ -845,6 +860,7 @@ revert_changelist(svn_wc__db_t *db,
SVN_ERR(revert_changelist(db, child_abspath, depth,
use_commit_times, changelist_hash,
clear_changelists, metadata_only,
+ added_keep_local,
cancel_func, cancel_baton,
notify_func, notify_baton,
iterpool));
@@ -871,6 +887,7 @@ revert_partial(svn_wc__db_t *db,
svn_boolean_t use_commit_times,
svn_boolean_t clear_changelists,
svn_boolean_t metadata_only,
+ svn_boolean_t added_keep_local,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
@@ -892,6 +909,7 @@ revert_partial(svn_wc__db_t *db,
children. */
SVN_ERR(revert(db, local_abspath, svn_depth_empty,
use_commit_times, clear_changelists, metadata_only,
+ added_keep_local,
cancel_func, cancel_baton,
notify_func, notify_baton, iterpool));
@@ -926,7 +944,7 @@ revert_partial(svn_wc__db_t *db,
/* Revert just this node (depth=empty). */
SVN_ERR(revert(db, child_abspath,
svn_depth_empty, use_commit_times, clear_changelists,
- metadata_only,
+ metadata_only, added_keep_local,
cancel_func, cancel_baton,
notify_func, notify_baton,
iterpool));
@@ -939,13 +957,14 @@ revert_partial(svn_wc__db_t *db,
svn_error_t *
-svn_wc_revert5(svn_wc_context_t *wc_ctx,
+svn_wc_revert6(svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_depth_t depth,
svn_boolean_t use_commit_times,
const apr_array_header_t *changelist_filter,
svn_boolean_t clear_changelists,
svn_boolean_t metadata_only,
+ svn_boolean_t added_keep_local,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
@@ -963,6 +982,7 @@ svn_wc_revert5(svn_wc_context_t *wc_ctx,
changelist_hash,
clear_changelists,
metadata_only,
+ added_keep_local,
cancel_func, cancel_baton,
notify_func, notify_baton,
scratch_pool));
@@ -972,6 +992,7 @@ svn_wc_revert5(svn_wc_context_t *wc_ctx,
return svn_error_trace(revert(wc_ctx->db, local_abspath,
depth, use_commit_times, clear_changelists,
metadata_only,
+ added_keep_local,
cancel_func, cancel_baton,
notify_func, notify_baton,
scratch_pool));
@@ -986,6 +1007,7 @@ svn_wc_revert5(svn_wc_context_t *wc_ctx,
return svn_error_trace(revert_partial(wc_ctx->db, local_abspath,
depth, use_commit_times,
clear_changelists, metadata_only,
+ added_keep_local,
cancel_func, cancel_baton,
notify_func, notify_baton,
scratch_pool));
Modified: subversion/branches/shelve-checkpoint/subversion/svn/diff-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/svn/diff-cmd.c?rev=1822868&r1=1822867&r2=1822868&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/svn/diff-cmd.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/svn/diff-cmd.c Thu Feb 1 11:17:40 2018
@@ -463,7 +463,7 @@ svn_cl__diff(apr_getopt_t *os,
ctx, iterpool));
}
else
- SVN_ERR(svn_client_diff6(
+ SVN_ERR(svn_client_diff7(
options,
target1,
&(opt_state->start_revision),
@@ -479,6 +479,7 @@ svn_cl__diff(apr_getopt_t *os,
ignore_properties,
opt_state->diff.properties_only,
opt_state->diff.use_git_diff_format,
+ TRUE /*pretty_print_mergeinfo*/,
svn_cmdline_output_encoding(pool),
outstream,
errstream,
@@ -515,7 +516,7 @@ svn_cl__diff(apr_getopt_t *os,
ctx, iterpool));
}
else
- SVN_ERR(svn_client_diff_peg6(
+ SVN_ERR(svn_client_diff_peg7(
options,
truepath,
&peg_revision,
@@ -531,6 +532,7 @@ svn_cl__diff(apr_getopt_t *os,
ignore_properties,
opt_state->diff.properties_only,
opt_state->diff.use_git_diff_format,
+ TRUE /*pretty_print_mergeinfo*/,
svn_cmdline_output_encoding(pool),
outstream,
errstream,
Modified: subversion/branches/shelve-checkpoint/subversion/svn/log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/svn/log-cmd.c?rev=1822868&r1=1822867&r2=1822868&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/svn/log-cmd.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/svn/log-cmd.c Thu Feb 1 11:17:40 2018
@@ -88,7 +88,7 @@ display_diff(const svn_log_entry_t *log_
end_revision.value.number = log_entry->revision;
SVN_ERR(svn_stream_puts(outstream, "\n"));
- SVN_ERR(svn_client_diff_peg6(diff_options,
+ SVN_ERR(svn_client_diff_peg7(diff_options,
target_path_or_url,
target_peg_revision,
&start_revision, &end_revision,
@@ -102,6 +102,7 @@ display_diff(const svn_log_entry_t *log_
FALSE /* ignore prop diff */,
FALSE /* properties only */,
FALSE /* use git diff format */,
+ TRUE /* pretty_print_mergeinfo */,
svn_cmdline_output_encoding(pool),
outstream,
errstream,
Modified: subversion/branches/shelve-checkpoint/subversion/svn/revert-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/svn/revert-cmd.c?rev=1822868&r1=1822867&r2=1822868&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/svn/revert-cmd.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/svn/revert-cmd.c Thu Feb 1 11:17:40 2018
@@ -67,10 +67,11 @@ svn_cl__revert(apr_getopt_t *os,
SVN_ERR(svn_cl__check_targets_are_local_paths(targets));
- err = svn_client_revert3(targets, opt_state->depth,
+ err = svn_client_revert4(targets, opt_state->depth,
opt_state->changelists,
FALSE /* clear_changelists */,
FALSE /* metadata_only */,
+ TRUE /*added_keep_local*/,
ctx, scratch_pool);
if (err
&& (err->apr_err == SVN_ERR_WC_INVALID_OPERATION_DEPTH)
Modified: subversion/branches/shelve-checkpoint/subversion/svn/shelf-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/svn/shelf-cmd.c?rev=1822868&r1=1822867&r2=1822868&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/svn/shelf-cmd.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/svn/shelf-cmd.c Thu Feb 1 11:17:40 2018
@@ -187,7 +187,7 @@ stats(svn_client_shelf_t *shelf,
/* Display a list of shelves */
static svn_error_t *
shelves_list(const char *local_abspath,
- svn_boolean_t with_logmsg,
+ svn_boolean_t quiet,
svn_boolean_t with_diffstat,
svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool)
@@ -206,13 +206,16 @@ shelves_list(const char *local_abspath,
svn_client_shelf_t *shelf;
svn_client_shelf_version_t *shelf_version;
- SVN_ERR(svn_client_shelf_open(&shelf,
- name, local_abspath, ctx, scratch_pool));
+ 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));
- SVN_ERR(stats(shelf, shelf->max_version, time_now,
- with_logmsg, scratch_pool));
+ if (quiet)
+ SVN_ERR(svn_cmdline_printf(scratch_pool, "%s\n", shelf->name));
+ else
+ SVN_ERR(stats(shelf, shelf->max_version, time_now,
+ TRUE /*with_logmsg*/, scratch_pool));
if (with_diffstat)
{
SVN_ERR(show_diffstat(shelf_version, scratch_pool));
@@ -236,8 +239,8 @@ shelf_log(const char *name,
svn_client_shelf_t *shelf;
int i;
- SVN_ERR(svn_client_shelf_open(&shelf, name, local_abspath,
- ctx, scratch_pool));
+ SVN_ERR(svn_client_shelf_open_existing(&shelf, name, local_abspath,
+ ctx, scratch_pool));
for (i = 1; i <= shelf->max_version; i++)
{
@@ -405,6 +408,7 @@ shelve(int *new_version_p,
const apr_array_header_t *paths,
svn_depth_t depth,
const apr_array_header_t *changelists,
+ apr_hash_t *revprop_table,
svn_boolean_t keep_local,
svn_boolean_t dry_run,
svn_boolean_t quiet,
@@ -464,12 +468,11 @@ shelve(int *new_version_p,
: _("None of the local modifications could be shelved"));
}
+ /* Un-apply the patch, if required. */
if (!keep_local)
{
svn_client_shelf_version_t *shelf_version;
- /* Reverse-apply the patch. This should be a safer way to remove those
- changes from the WC than running a 'revert' operation. */
SVN_ERR(svn_client_shelf_version_open(&shelf_version,
shelf, shelf->max_version,
scratch_pool, scratch_pool));
@@ -477,7 +480,8 @@ shelve(int *new_version_p,
dry_run, scratch_pool));
}
- SVN_ERR(svn_client_shelf_set_log_message(shelf, dry_run, scratch_pool));
+ SVN_ERR(svn_client_shelf_set_log_message(shelf, revprop_table,
+ dry_run, scratch_pool));
if (new_version_p)
*new_version_p = shelf->max_version;
@@ -564,14 +568,8 @@ shelf_restore(const char *name,
svn_client_shelf_t *shelf;
svn_client_shelf_version_t *shelf_version;
- SVN_ERR(svn_client_shelf_open(&shelf, name, local_abspath,
- ctx, scratch_pool));
- if (shelf->max_version <= 0)
- {
- return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
- _("Shelf '%s' not found"),
- name);
- }
+ SVN_ERR(svn_client_shelf_open_existing(&shelf, name, local_abspath,
+ ctx, scratch_pool));
old_version = shelf->max_version;
if (arg)
@@ -634,14 +632,8 @@ shelf_diff(const char *name,
svn_client_shelf_version_t *shelf_version;
svn_stream_t *stream;
- SVN_ERR(svn_client_shelf_open(&shelf, name, local_abspath,
- ctx, scratch_pool));
- if (shelf->max_version <= 0)
- {
- return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
- _("Shelf '%s' not found"),
- name);
- }
+ SVN_ERR(svn_client_shelf_open_existing(&shelf, name, local_abspath,
+ ctx, scratch_pool));
if (arg)
{
@@ -689,6 +681,7 @@ shelf_shelve(int *new_version,
apr_array_header_t *targets,
svn_depth_t depth,
apr_array_header_t *changelists,
+ apr_hash_t *revprop_table,
svn_boolean_t keep_local,
svn_boolean_t dry_run,
svn_boolean_t quiet,
@@ -713,6 +706,7 @@ shelf_shelve(int *new_version,
SVN_ERR(shelve(new_version, name,
targets, depth, changelists,
+ revprop_table,
keep_local, dry_run, quiet,
local_abspath, ctx, scratch_pool));
@@ -762,6 +756,7 @@ svn_cl__shelf_shelve(apr_getopt_t *os,
pool));
err = shelf_shelve(&new_version, name,
targets, opt_state->depth, opt_state->changelists,
+ opt_state->revprop_table,
opt_state->keep_local, opt_state->dry_run,
opt_state->quiet, ctx, pool);
if (ctx->log_msg_func3)
@@ -847,8 +842,8 @@ 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 /*with_logmsg*/,
- ! opt_state->quiet /*with_diffstat*/,
+ opt_state->quiet,
+ opt_state->verbose /*with_diffstat*/,
ctx, pool));
return SVN_NO_ERROR;
@@ -927,7 +922,7 @@ 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->quiet /*with_diffstat*/,
+ opt_state->verbose /*with_diffstat*/,
ctx, pool));
return SVN_NO_ERROR;
Modified: subversion/branches/shelve-checkpoint/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint/subversion/svn/svn.c?rev=1822868&r1=1822867&r2=1822868&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint/subversion/svn/svn.c (original)
+++ subversion/branches/shelve-checkpoint/subversion/svn/svn.c Thu Feb 1 11:17:40 2018
@@ -1730,7 +1730,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
" 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'}
+ {'q', 'v'}
},
{ "shelf-log", svn_cl__shelf_log, {0}, N_
@@ -1742,15 +1742,15 @@ const svn_opt_subcommand_desc2_t svn_cl_
" 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'}
+ {'q', 'v'}
},
{ "shelf-save", svn_cl__shelf_save, {0}, N_
("Copy local changes onto a new version of a shelf.\n"
- "usage: shelf-log NAME\n"
+ "usage: shelf-save NAME [PATH...]\n"
"\n"
" Save local changes in the given PATHs as a new version of shelf NAME.\n"
- " A new log message can be given with -m, -F, etc.\n"
+ " The shelf's log message can be set with -m, -F, etc.\n"
"\n"
" The same as 'svn shelve --keep-local'.\n"
"\n"
@@ -1759,8 +1759,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
),
{'q', opt_dry_run,
opt_depth, opt_targets, opt_changelist,
- /* almost SVN_CL__LOG_MSG_OPTIONS but not currently opt_with_revprop: */
- 'm', 'F', opt_force_log, opt_editor_cmd, opt_encoding,
+ SVN_CL__LOG_MSG_OPTIONS,
}
},
@@ -1770,14 +1769,13 @@ const svn_opt_subcommand_desc2_t svn_cl_
"\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"
- " If a log message is given with '-m' or '-F', replace the shelf's\n"
- " current log message (if any).\n"
+ " The shelf's log message can be set with -m, -F, etc.\n"
"\n"
" 'svn shelve --keep-local' is the same as 'svn shelf-save'.\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"
- " mergeinfo changes, copies, moves, mkdir, rmdir,\n"
+ " copies, moves, mkdir, rmdir,\n"
" 'binary' content, uncommittable states\n"
"\n"
" To bring back shelved changes, use 'svn unshelve NAME'.\n"
@@ -1789,8 +1787,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
),
{'q', opt_dry_run, opt_keep_local,
opt_depth, opt_targets, opt_changelist,
- /* almost SVN_CL__LOG_MSG_OPTIONS but not currently opt_with_revprop: */
- 'm', 'F', opt_force_log, opt_editor_cmd, opt_encoding,
+ SVN_CL__LOG_MSG_OPTIONS,
} },
{ "unshelve", svn_cl__shelf_unshelve, {0}, N_