Author: stsp
Date: Wed Aug 23 14:26:02 2017
New Revision: 1805898
URL: http://svn.apache.org/viewvc?rev=1805898&view=rev
Log:
On the addremove branch, merge outstanding changes from trunk.
Modified:
subversion/branches/addremove/ (props changed)
subversion/branches/addremove/notes/resolve-moves
subversion/branches/addremove/subversion/libsvn_fs_fs/fs_fs.c
subversion/branches/addremove/subversion/svn/conflict-callbacks.c
subversion/branches/addremove/subversion/svn/svn.c
subversion/branches/addremove/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c
Propchange: subversion/branches/addremove/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Aug 23 14:26:02 2017
@@ -97,4 +97,4 @@
/subversion/branches/verify-at-commit:1462039-1462408
/subversion/branches/verify-keep-going:1439280-1546110
/subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1802696-1805764
+/subversion/trunk:1802696-1805897
Modified: subversion/branches/addremove/notes/resolve-moves
URL:
http://svn.apache.org/viewvc/subversion/branches/addremove/notes/resolve-moves?rev=1805898&r1=1805897&r2=1805898&view=diff
==============================================================================
--- subversion/branches/addremove/notes/resolve-moves (original)
+++ subversion/branches/addremove/notes/resolve-moves Wed Aug 23 14:26:02 2017
@@ -163,7 +163,17 @@ The repository location of the conflict
cannot be found in the working copy ("local missing").
To find such missing nodes, SVN must first find all moves in the entire
-history of the parent directory of the conflict victim.
+history of the parent directory of the conflict victim. Additionally,
+in the case of a merge operation, SVN must also find all moves in the
+history of the parent directory of path@old-rev, all the way up to the
+common ancestor of the root of the merge operation. This is because such
+moves might not have been applied to the target branch (working copy),
+for instance when cherry-picking a file modification, after the file has
+been moved on the source branch (see example at the end of this section).
+
+### jcorvel: Maybe this additional search for moves on the source branch
+ (in case of a merge operation) can be optional? Only do it if
+ the moves found in the first search don't suffice?
For each such move it checks whether the moved node is related to the known
node at path@old-rev, or, if that does not exist, path@new-rev, by tracing
@@ -185,6 +195,34 @@ a path-wise closest node to the conflict
If no such node can be found, SVN assumes that the conflict victim was
deleted instead of moved.
+=== Missing conflict victim due to skipped move in merge source history ===
+
+This can typically happen when cherry-picking a revision with a file
+modification, where this file has been moved on the source branch of the
+merge (and this move was not applied to the target branch):
+
+In r1, create directory A with file mu:
+ Changed paths:
+ A /A
+ A /A/mu
+
+In r2, directory A is copied to A1 (branched):
+ Changed paths:
+ A /A1 (from /A:1)
+
+In r3, A/mu is moved:
+ Changed paths:
+ D /A/mu
+ A /A/mu-moved (from /A/mu:2)
+
+In r4, A/mu-moved is edited:
+ Changed paths:
+ M /A/mu-moved
+
+If we now want to cherry-pick r4 from /A to a working copy of /A1, we get a
+tree conflict because mu-moved is missing. The relevant move we need to
+resolve this happened on /A, in r3.
+
== Determining which, if any, moves apply ==
Next, SVN must determine whether any moves found between old-rev and
Modified: subversion/branches/addremove/subversion/libsvn_fs_fs/fs_fs.c
URL:
http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/libsvn_fs_fs/fs_fs.c?rev=1805898&r1=1805897&r2=1805898&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/addremove/subversion/libsvn_fs_fs/fs_fs.c Wed Aug 23
14:26:02 2017
@@ -904,8 +904,13 @@ read_config(fs_fs_data_t *ffd,
}
else
{
- /* Nothing specified explicitly, use default settings. */
- ffd->delta_compression_type = compression_type_zlib;
+ /* Nothing specified explicitly, use the default settings:
+ * LZ4 compression for formats supporting it and zlib otherwise. */
+ if (ffd->format >= SVN_FS_FS__MIN_SVNDIFF2_FORMAT)
+ ffd->delta_compression_type = compression_type_lz4;
+ else
+ ffd->delta_compression_type = compression_type_zlib;
+
ffd->delta_compression_level = SVN_DELTA_COMPRESSION_LEVEL_DEFAULT;
}
}
@@ -1059,11 +1064,14 @@ write_config(svn_fs_t *fs,
"### incompressible files. Note that the compression ratio of lz4 is" NL
"### usually lower than the one provided by zlib, but using it can" NL
"### significantly speed up commits as well as reading the data." NL
+"### lz4 compression algorithm is supported, starting from format 8" NL
+"### repositories, available in Subversion 1.10 and higher." NL
"### The syntax of this option is:" NL
"### " CONFIG_OPTION_COMPRESSION " = none | lz4 | zlib | zlib-1 ... zlib-9"
NL
"### Versions prior to Subversion 1.10 will ignore this option." NL
-"### The default value is 'zlib', which is currently equivalent to 'zlib-5'."
NL
-"# " CONFIG_OPTION_COMPRESSION " = zlib" NL
+"### The default value is 'lz4' if supported by the repository format and" NL
+"### 'zlib' otherwise. 'zlib' is currently equivalent to 'zlib-5'." NL
+"# " CONFIG_OPTION_COMPRESSION " = lz4" NL
"###" NL
"### DEPRECATED: The new '" CONFIG_OPTION_COMPRESSION "' option deprecates
previously used" NL
"### '" CONFIG_OPTION_COMPRESSION_LEVEL "' option, which was used to configure
zlib compression." NL
Modified: subversion/branches/addremove/subversion/svn/conflict-callbacks.c
URL:
http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/svn/conflict-callbacks.c?rev=1805898&r1=1805897&r2=1805898&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/addremove/subversion/svn/conflict-callbacks.c Wed Aug
23 14:26:02 2017
@@ -79,7 +79,7 @@ svn_cl__accept_from_word(const char *wor
|| strcmp(word, "l") == 0 || strcmp(word, ":-l") == 0)
return svn_cl__accept_launch;
if (strcmp(word, SVN_CL__ACCEPT_RECOMMENDED) == 0
- || strcmp(word, "r"))
+ || strcmp(word, "r") == 0)
return svn_cl__accept_recommended;
/* word is an invalid action. */
return svn_cl__accept_invalid;
Modified: subversion/branches/addremove/subversion/svn/svn.c
URL:
http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/svn/svn.c?rev=1805898&r1=1805897&r2=1805898&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/svn/svn.c (original)
+++ subversion/branches/addremove/subversion/svn/svn.c Wed Aug 23 14:26:02 2017
@@ -544,7 +544,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
" or more patterns. With the --remove option, remove cached
authentication\n"
" credentials matching one or more patterns.\n"
"\n"
- " If more than one pattern is specified credentials are considered only
they\n"
+ " If more than one pattern is specified credentials are considered only
if they\n"
" match all specified patterns. Patterns are matched case-sensitively and
may\n"
" contain glob wildcards:\n"
" ? matches any single character\n"
@@ -660,8 +660,9 @@ const svn_opt_subcommand_desc2_t svn_cl_
"\n"
" A log message must be provided, but it can be empty. If it is not\n"
" given by a --message or --file option, an editor will be started.\n"
+ "\n"
" If any targets are (or contain) locked items, those will be\n"
- " unlocked after a successful commit.\n"
+ " unlocked after a successful commit, unless --no-unlock is given.\n"
"\n"
" If --include-externals is given, also commit file and directory\n"
" externals reached by recursion. Do not commit externals with a\n"
Modified:
subversion/branches/addremove/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c
URL:
http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c?rev=1805898&r1=1805897&r2=1805898&view=diff
==============================================================================
---
subversion/branches/addremove/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c
(original)
+++
subversion/branches/addremove/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c
Wed Aug 23 14:26:02 2017
@@ -85,8 +85,10 @@ verify_representation_stats(const svn_fs
SVN_TEST_ASSERT(stats->total.count == expected_count);
SVN_TEST_ASSERT( stats->total.packed_size >= 10 * expected_count
&& stats->total.packed_size <= 1000 * expected_count);
- SVN_TEST_ASSERT( stats->total.packed_size >= stats->total.expanded_size
- && stats->total.packed_size <= 2 *
stats->total.expanded_size);
+ /* Expect the packed size to be sane, keeping in mind that it might
+ * be less or more than the expanded size due differences in the
+ * compression algorithms or options such as directory deltification. */
+ SVN_TEST_ASSERT(stats->total.packed_size <= 2 * stats->total.expanded_size);
SVN_TEST_ASSERT( stats->total.overhead_size >= 5 * expected_count
&& stats->total.overhead_size <= 100 * expected_count);