You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2011/08/25 21:33:48 UTC
svn commit: r1161713 - in /subversion/branches/fs-py: ./ notes/
subversion/include/ subversion/libsvn_client/ subversion/libsvn_fs_base/
subversion/libsvn_fs_fs/ subversion/libsvn_wc/ subversion/mod_dav_svn/
subversion/mod_dav_svn/reports/ subversion/s...
Author: hwright
Date: Thu Aug 25 19:33:47 2011
New Revision: 1161713
URL: http://svn.apache.org/viewvc?rev=1161713&view=rev
Log:
On the fs-py branch:
Bring up-to-date with trunk, in order to pick up an improved fs test.
Modified:
subversion/branches/fs-py/ (props changed)
subversion/branches/fs-py/CHANGES
subversion/branches/fs-py/notes/hold
subversion/branches/fs-py/notes/moves
subversion/branches/fs-py/subversion/include/svn_diff.h
subversion/branches/fs-py/subversion/include/svn_repos.h
subversion/branches/fs-py/subversion/include/svn_wc.h
subversion/branches/fs-py/subversion/libsvn_client/merge.c
subversion/branches/fs-py/subversion/libsvn_client/repos_diff.c
subversion/branches/fs-py/subversion/libsvn_fs_base/fs.c
subversion/branches/fs-py/subversion/libsvn_fs_fs/fs_fs.c
subversion/branches/fs-py/subversion/libsvn_wc/merge.c
subversion/branches/fs-py/subversion/libsvn_wc/props.h
subversion/branches/fs-py/subversion/mod_dav_svn/dav_svn.h
subversion/branches/fs-py/subversion/mod_dav_svn/reports/update.c
subversion/branches/fs-py/subversion/mod_dav_svn/util.c
subversion/branches/fs-py/subversion/svn/main.c
subversion/branches/fs-py/subversion/tests/cmdline/merge_tests.py
subversion/branches/fs-py/subversion/tests/cmdline/tree_conflict_tests.py
subversion/branches/fs-py/subversion/tests/libsvn_fs/fs-test.c
Propchange: subversion/branches/fs-py/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 25 19:33:47 2011
@@ -1,4 +1,5 @@
/subversion/branches/1.5.x-r30215:870312
+/subversion/branches/1.7.x-fs-verify:1146708,1161180
/subversion/branches/atomic-revprop:965046-1000689
/subversion/branches/bdb-reverse-deltas:872050-872529
/subversion/branches/diff-callbacks3:870059-870761
@@ -55,4 +56,4 @@
/subversion/branches/tree-conflicts:868291-873154
/subversion/branches/tree-conflicts-notify:873926-874008
/subversion/branches/uris-as-urls:1060426-1064427
-/subversion/trunk:1154223-1161132
+/subversion/trunk:1154223-1161710
Modified: subversion/branches/fs-py/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/CHANGES?rev=1161713&r1=1161712&r2=1161713&view=diff
==============================================================================
--- subversion/branches/fs-py/CHANGES (original)
+++ subversion/branches/fs-py/CHANGES Thu Aug 25 19:33:47 2011
@@ -94,6 +94,9 @@ the 1.6 release: http://subversion.apac
* 'svn delete --force' removes tree conflicts (issue #3805)
* don't throw an error when skipping tree conflicts in update (issue #3329)
* don't break commits of wc->wc copies with file externals (issue #3589)
+ * allow 'svn info' to work on symlinks to working copies (issue #2305)
+ * allow 'svn st --show-updates' to work across symlinks (issue #3117)
+ * 'svn revert' shouldn't loop on symlinks (issue #3972)
* fixed: wc-to-wc copy of a switch source (issue #1802)
* fixed: 'svn st' reports symlinks as obstructed items (issue #2284)
* fixed: 'cd e:\; svn up e:\' fails (issue #2556)
@@ -135,6 +138,9 @@ the 1.6 release: http://subversion.apac
* fixed: spurious prop conflict with 'merge --reintegrate' (issue #3919)
* fixed: 'svn --version' fails with non-existant $HOME (issue #3947)
* fixed: unforced export silently overwites existing file (issue #3799)
+ * fixed: reverse merge which adds subtree mergeinfo fails (issue #3978)
+ * fixed: 'svn up -r{R>HEAD}' hangs client over ra_svn (issue #3963)
+ * fixed: 'svn up' updates file externals in target siblings (issue #3819)
* many other minor bugfixes, optimizations, plugs of memory leaks, etc
- Server-side bugfixes:
@@ -155,6 +161,7 @@ the 1.6 release: http://subversion.apac
* svnserve can now force usernames to upper/lower case (issue #3726)
* reduce duplicate log messages in 'log -g' (issue #3650)
* don't crash on shutdown with SASL in inetd mode (issue #3664)
+ * disallow arbitrary HTTP headers from committers (issue #2872)
* many other minor bugfixes too numerous to list here
- Other tool improvements and bugfixes:
@@ -184,7 +191,9 @@ the 1.6 release: http://subversion.apac
* notifications sent when mergeinfo changes (r877588)
* add information on text and property mods in log APIs (r877688)
* fixed: svn_ra_local__get_file() leaks file descriptors (issue #3290)
+ * svn_ra_neon__get_dir() returns correct dir set for URLs (issue #3093)
* swig-py: always set ChangedPath.path (issue #2630)
+ * improve conflict resolver API for a specific direction (issue #3049)
- Bindings:
* New JavaHL package: org.apache.subversion
Modified: subversion/branches/fs-py/notes/hold
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/notes/hold?rev=1161713&r1=1161712&r2=1161713&view=diff
==============================================================================
--- subversion/branches/fs-py/notes/hold (original)
+++ subversion/branches/fs-py/notes/hold Thu Aug 25 19:33:47 2011
@@ -5,9 +5,9 @@ This text describes plans and concerns a
automatically omits paths from commits that have this property set. WIP.
$Date$
-When there are multiple options, I made my preferred solution the a) option,
-and the less preferred one the b) option. This is just my personal opinion.
-Actually, at the time of writing, this whole file is ;)
+This whole file is just my personal opinion, with some additions by other
+people. The whole feature is under heavy discussion at the time of writing,
+and it is doubtful if it will ever be implemented in this way.
USE CASES
@@ -16,25 +16,48 @@ USE CASES
Do not commit modifications on selected files, which do have to be versioned,
because...
-(1) CONVENIENCE
-File 'foo' is modified with every click made in my IDE. I want 'foo' to be
-skipped on commits unless I explicitly ask svn to commit it. (Instead of
-having to take explicit care on every commit to omit the file.)
-
-(2) LOCAL/GLOBAL
-Since all other developers use the same IDE, I want to have the option to tell
-all other working copies to hold back 'foo' as well -- but only if all agreed
-to that. Else I want to just hold locally.
-
-(3) SECRET
-Every user must locally add their passwords and PIN numbers to file 'foo'.
-By default, every working copy should exclude 'foo' from commits. We don't
-want any user's mods of 'foo' to even go over the wire (ruling out hooks).
+(UC1) DO NOT COMMIT MODIFICATIONS, LOCAL
+ File 'foo' has to be modified to be able to work with my checkout.
+ E.g. with every click made in my IDE, it updates a time stamp;
+ or, the file is a config template which needs local configuration.
+ I want 'foo' to be skipped on commits unless I explicitly ask svn to commit
+ it. (Instead of having to take explicit care on every commit to omit the
+ file.)
+
+(UC2) DO NOT COMMIT MODIFICATIONS, GLOBAL
+ Building on [UC1]. All developers face the same issue and want to skip 'foo'
+ during commit. I want every new checkout to behave such that 'foo' is
+ omitted from commit, without further local config necessary.
+ (All developers must agree before we set up such a global hold, so it should
+ be optional to have a global hold or just a local hold as [UC1].)
+
+(UC3) DO NOT COMMIT MODIFICATIONS, SECRET AND GLOBAL
+ Building on [UC2]. Every user must locally add their passwords and PIN
+ numbers to file 'foo'. By default, every working copy should exclude
+ 'foo' from commits. We don't want any user's mods of 'foo' to even go
+ over the wire. (This last point rules out hooks.)
+
+(UC4) Eclipse directory, from issue #3028.
+ (Not supported by this proposal, see [6])
+ "We have a complete Eclipse instance in our svn repository and we want
+ to ignore every change in its directory and below. Because Eclipse
+ more or less at random creates and deletes file from its own directory
+ we have no way of knowing which individual files may be change or
+ deleted by starting Eclipse." An update should not re-create files
+ that were deleted from disk by Eclipse. Let's say a 'global' hold is
+ required as in [UC2].
-LEGEND:
+LEGEND
+======
+
'held-back file': A file that's excluded from a commit by svn:hold.
+ 'overridden': The effect of the 'hold' may be overridden by telling
+ Subversion not to ignore the modifications on a held-back file that it
+ otherwise would have ignored. The syntax and scope (per file, per
+ command or per user) of the override is described in [8].
+
DETAILS
=======
@@ -43,33 +66,26 @@ DETAILS
The property is called "svn:hold".
(5) VALUE
-(5a) BOOLEAN
- A file is held-back iff it has an svn:hold property, with whichever
- value, even empty. A fixed set of subcommands heeds svn:hold.
- OR
-(5b) LIST OF STRINGS
- The value of 'svn:hold' determines which subcommands hold the file:
- - commit: holding back upon commit is *always* implied.
- - diff: Omit local mods of held-back files from diff.
- - status: Entirely omit the file from 'svn status' output.
- - copy: The file should only be copied without the local modifications.
- - merge: Don't merge onto the file.
- - update: Don't update the file, and, in consequence, don't commit it.
- - ...?
-
+ A file is held-back iff it has an svn:hold property, with whichever
+ value, even empty. A fixed set of subcommands heeds svn:hold,
+ as discussed under SUBCOMMANDS, below.
(6) NODE KINDS
Only files should be held-back. 'svn:hold' should not act recursively (for
performance and implementation complexity reasons?), and actually, 'svn:hold'
should not be allowed to be set on directories. If an entire subtree should be
-put on hold, users can do 'svn propset -R'. Such a recursive propset should
-not error out on the first dir encountered, but instead print a warning that
-svn:hold was only added to the files, ignoring the dirs.
+put on hold, users can do 'svn propset -R'.
(7) LOCAL HOLD
The svn:hold property already acts when it is added locally. This provides a
way to hold back files in only the local working copy, no other users nor the
-repository is affected. See [2].
+repository is affected. See [UC2].
+
+Specifically, a file is held back iff the 'svn:hold' property as described in
+[5] is set on the working version in the WC, regardless whether it's set on
+the WC base version. One consequence is that a file scheduled for delete is no
+longer held back from commit, while a locally added file with a locally added
+svn:hold prop *is* held back from commit.
(8) GLOBAL HOLD
There must be a --do-not-hold option to 'svn commit'. This allows committing
@@ -81,63 +97,102 @@ could mean "ignore the held-back files"
or even "commit everything except the svn:hold propadd". --do-not-hold and
--disable-hold are the only ones I found that aren't ambiguous like that.
+One consequence of a global hold is that the 'svn:hold' prop will propagate to
+other branches as the propget gets merged into them along with the other text
+edits.
+
+An alternative to adding the --do-not-hold option would be to not hold back
+files if they are explicitly named targets to the 'commit' (or other) command.
+That has the advantages of consistency with the way svn:ignore and depth
+behave, and of avoiding another command-line option. It does not provide an
+easy way to specify all the files in a subtree -- a disadvantage when users
+have used a recursive propset to set many files on hold.
+
SUBCOMMANDS
-So far, no real point has been made to justify ignoring file mods on any other
-command except 'commit'. I am adding some as I type:
+This discusses how svn:hold may affect other subcommands so that it rounds off
+the user experience with that feature and avoids pitfalls arising from it.
+
+ (10) DIFF: The currently prevailing opinion is that a local diff should not
+ be affected by svn:hold. Nevertheless, some use 'svn diff' to look at
+ exactly those changes that will get committed; for these users, there should
+ be a local configuration option that makes 'svn diff' not show local
+ modifications on held-back files. (Note, when 'svn diff -rN' displays the
+ differences between a revision and the working state, the output should show
+ all diffs with BASE, ignoring only the local changes. As a general rule, if
+ 'svn:hold' is set on a file, 'svn diff' should act exactly as if the file
+ was not locally modified.)
- (10) DIFF: if local modifications don't get committed, then there's no need
- to read about them in a diff of local mods. (Held-back files should *not*
- omit already-committed modifications.)
(11) COPY:
- (12) WC-TO-URL: Copying locally added secrets [3] to a URL is fatal. Any
- WC-to-URL copy of held-back files should
- (12a) exclude local mods, or
- (12b) just bail if there are local mods, unless they get a --do-not-hold
- option. (probably easier to do, until [12a] gets implemented)
+ (12) WC-TO-URL: Copying locally added secrets [UC3] to a URL is fatal. Any
+ WC-to-URL copy of held-back files that have local mods should warn the
+ user and refuse to work unless --do-not-hold (or --do-hold) are passed
+ explicitly.
+
(13) WC-TO-WC: A WC copy or move will also copy the svn:hold property, and
- thus isn't that dangerous for [3]. But when a WC-to-WC copy of a subtree
+ thus isn't that dangerous for [UC3]. But when a WC-to-WC copy of a subtree
that has a held-back file inside is finally committed, the BASE node of
the held-back file should indeed be added. Omitting the held-back file
completely would imply a delete within the added tree. So a commit
- should take care to add files that are held-back, but skip all local
- modifications.
- (14a) Committing BASE nodes for added held-back files should be limited to
- copied/moved files, i.e. where the BASE is nonempty. Simply-added
- held-back files should not be added to the repos at all.
- OR
- (14b) If a held-back file is simply-added (not copied/moved), just add an
- empty file with no props except svn:hold to the repository.
+ noticing this situation should again warn the user and refuse to work
+ unless --do-not-hold (or --do-hold) are passed explicitly.
(15) STATUS:
(15a) 'svn status' should show mods on held-back files iff they are
modified, with an added status indicator like 'H'.
+ (And show added/deleted/replaced held-back files as usual.)
OR
(15b) 'svn status' should omit held-back files even if modified,
unless --show-hold is supplied.
+ (And show added/deleted/replaced held-back files as usual.)
- (16) UPDATE: Holding off updates from a file could be desirable, but I can't
- think of any real situation that needs this. If holding back updates is ever
- implemented, it should definitely be optional, as in [5b]. See also [19]!
-
- (17) MERGE: Holding off merges from single files is pure madness. Alas, the
- whole topic of svn:hold is a nightmare in merge land. Users have to take
- great care to do The Right Thing: If you merge committed modifications on a
- locally held-back file, the merge result for it will not be committed --
- even if there had not been any local modifications on the held-back file.
- 'svn merge' should issue a warning that it has merged files that (now) have
- the 'svn:hold' property in the local working copy, and that, for basic
- sanity, --do-not-hold should be supplied at commit time. See also [19]!
+ (16) UPDATE: Update shall issue a warning if it removes the held-back status
+ from a file that currently has local modifications. In all other
+ respects, update shall act as usual. For example, if update deletes a
+ held-back file with local mods, it shall raise a tree conflict in the
+ usual way. See also [19]!
+
+ (17) MERGE:
+ (171) 'merge' should merge modifications to held-back files exactly the
+ way it does to other files. If a change on a held-back file has been
+ committed, it is considered an intentional change. So this change should
+ definitely be merged to the local file.
+
+ (172) like update, 'merge' might issue a warning if it removes the
+ held-back status from a file that had local modifications prior to the
+ merge. Finding local mods before a merge is uncommon, considering
+ that the merger follows common practice of merging only into unmodified
+ working copies. However, it can happen when multiple merges need to be
+ applied to the same working copy; the warning is useless in such a case,
+ as if there have only been merges, only intentional changes account for
+ the local modifications. The proposed warning is for the specific case
+ where the user merges into a WC that had private changes to held-back
+ files which should not be committed. (This point is very debatable.)
+
+ (173) Say a 'merge' brings in an intentional change on a held-back file,
+ and assuming there were no local mods before the 'merge'. The next commit
+ should definitely not skip these changes -- they are part of the merge and
+ make up an intentional change. Forgetting to commit a modified held-back
+ file after a merge is almost certainly an error. So when merge brings in a
+ change on a held-back file, it should probably set a flag on the file that
+ persists up to the next successful commit, which causes the commit to
+ complain and abort the entire commit unless the user explicitly passes
+ --do-not-hold. This gives a safety point for the user to remember to
+ remove any private data that might still be lying around in (also other)
+ held-back files.
(18) SWITCH: Switch should go ahead as always. All it does is pull other
BASE nodes in under the local mods, so there is no danger of anything
- leaking around. But see [19]!
+ leaking around. Switch is very similar to update. See [16], [19]
(19) UPSTREAM REMOVES 'svn:hold': Users must be warned when update, switch
or merge remove the 'svn:hold' property from a file that had local mods.
They should maybe even flag some (new??) kind of conflict. See also [31].
+ ### JAF: This is a principle of the design. Maybe you could move all the
+ principles to a section before this SUBCOMMANDS section.
+
PERFORMANCE DURING COMMIT
(20) USUALLY FAST:
Modified: subversion/branches/fs-py/notes/moves
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/notes/moves?rev=1161713&r1=1161712&r2=1161713&view=diff
==============================================================================
--- subversion/branches/fs-py/notes/moves (original)
+++ subversion/branches/fs-py/notes/moves Thu Aug 25 19:33:47 2011
@@ -118,13 +118,16 @@ Interfaces which have changed behaviour:
- svn_client_patch: Patch uses move information to apply changes to files
which have been moved locally.
-Interfaces which have not changed behaviour yet but will change in 1.8.0:
-
- - svn_client_update/svn_client_merge: Update and Merge will use move
+ - svn_client_update/svn_client_merge: Update and Merge use move
information to auto-resolve the "local move vs. incoming edit"
tree conflict scenario.
- - diff: Diff will use move information to generate 'rename from' headers
+Interfaces which have not changed behaviour yet but might change in 1.8.0:
+
+ - svn_client_update/svn_client_merge: Update and Merge might use move
+ information to auto-resolve some additional tree conflict scenarios.
+
+ - diff: Diff might use move information to generate 'rename from' headers
when the --git option is used. (A related problem is making diff use
correct copyfrom in repos-repos diffs, which is not trivial.)
Modified: subversion/branches/fs-py/subversion/include/svn_diff.h
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/include/svn_diff.h?rev=1161713&r1=1161712&r2=1161713&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/include/svn_diff.h (original)
+++ subversion/branches/fs-py/subversion/include/svn_diff.h Thu Aug 25 19:33:47 2011
@@ -477,6 +477,7 @@ svn_diff_file_options_create(apr_pool_t
* - --ignore-space-change, -b
* - --ignore-all-space, -w
* - --ignore-eol-style
+ * - --show-c-function, -p @since New in 1.5.
* - --unified, -u (for compatibility, does nothing).
*/
svn_error_t *
Modified: subversion/branches/fs-py/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/include/svn_repos.h?rev=1161713&r1=1161712&r2=1161713&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/include/svn_repos.h (original)
+++ subversion/branches/fs-py/subversion/include/svn_repos.h Thu Aug 25 19:33:47 2011
@@ -2474,7 +2474,7 @@ svn_repos_verify_fs(svn_repos_t *repos,
* revision up through @a end_rev. Use @a pool for all allocation. If
* non-@c NULL, send feedback to @a feedback_stream. If @a dumpstream is
* @c NULL, this is effectively a primitive verify. It is not complete,
- * however; see svn_fs_verify instead.
+ * however; svn_repos_verify_fs2() and svn_fs_verify().
*
* If @a start_rev is #SVN_INVALID_REVNUM, then start dumping at revision
* 0. If @a end_rev is #SVN_INVALID_REVNUM, then dump through the @c HEAD
Modified: subversion/branches/fs-py/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/include/svn_wc.h?rev=1161713&r1=1161712&r2=1161713&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/include/svn_wc.h (original)
+++ subversion/branches/fs-py/subversion/include/svn_wc.h Thu Aug 25 19:33:47 2011
@@ -6534,7 +6534,8 @@ typedef enum svn_wc_merge_outcome_t
* control, then set @a *merge_outcome to #svn_wc_merge_no_merge and
* return success without merging anything. (The reasoning is that if
* the file is not versioned, then it is probably unrelated to the
- * changes being considered, so they should not be merged into it.)
+ * changes being considered, so they should not be merged into it.
+ * Furtheremore, merging into an unversioned file is a lossy operation.)
*
* @a dry_run determines whether the working copy is modified. When it
* is @c FALSE the merge will cause @a target_abspath to be modified, when
Modified: subversion/branches/fs-py/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_client/merge.c?rev=1161713&r1=1161712&r2=1161713&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_client/merge.c Thu Aug 25 19:33:47 2011
@@ -1460,8 +1460,9 @@ merge_file_changed(svn_wc_notify_state_t
way svn_wc_merge4() can do the merge. */
if (wc_kind != svn_node_file || is_deleted)
{
- svn_boolean_t moved_away;
+ const char *moved_to_abspath;
svn_wc_conflict_reason_t reason;
+ svn_error_t *err;
/* Maybe the node is excluded via depth filtering? */
@@ -1491,23 +1492,39 @@ merge_file_changed(svn_wc_notify_state_t
/* This is use case 4 described in the paper attached to issue
* #2282. See also notes/tree-conflicts/detection.txt
*/
- SVN_ERR(check_moved_away(&moved_away, merge_b->ctx->wc_ctx,
- mine_abspath, scratch_pool));
- if (moved_away)
- reason = svn_wc_conflict_reason_moved_away;
- else if (is_deleted)
- reason = svn_wc_conflict_reason_deleted;
+ err = svn_wc__node_was_moved_away(&moved_to_abspath, NULL,
+ merge_b->ctx->wc_ctx, mine_abspath,
+ scratch_pool, scratch_pool);
+ if (err)
+ {
+ if (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+ svn_error_clear(err);
+ else
+ return svn_error_trace(err);
+ }
+
+ if (moved_to_abspath)
+ {
+ /* File has been moved away locally -- apply incoming
+ * changes at the new location. */
+ mine_abspath = moved_to_abspath;
+ }
else
- reason = svn_wc_conflict_reason_missing;
- SVN_ERR(tree_conflict(merge_b, mine_abspath, svn_node_file,
- svn_wc_conflict_action_edit, reason));
- if (tree_conflicted)
- *tree_conflicted = TRUE;
- if (content_state)
- *content_state = svn_wc_notify_state_missing;
- if (prop_state)
- *prop_state = svn_wc_notify_state_missing;
- return SVN_NO_ERROR;
+ {
+ if (is_deleted)
+ reason = svn_wc_conflict_reason_deleted;
+ else
+ reason = svn_wc_conflict_reason_missing;
+ SVN_ERR(tree_conflict(merge_b, mine_abspath, svn_node_file,
+ svn_wc_conflict_action_edit, reason));
+ if (tree_conflicted)
+ *tree_conflicted = TRUE;
+ if (content_state)
+ *content_state = svn_wc_notify_state_missing;
+ if (prop_state)
+ *prop_state = svn_wc_notify_state_missing;
+ return SVN_NO_ERROR;
+ }
}
/* ### TODO: Thwart attempts to merge into a path that has
Modified: subversion/branches/fs-py/subversion/libsvn_client/repos_diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_client/repos_diff.c?rev=1161713&r1=1161712&r2=1161713&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_client/repos_diff.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_client/repos_diff.c Thu Aug 25 19:33:47 2011
@@ -1052,6 +1052,7 @@ close_file(void *file_baton,
svn_wc_notify_t *notify;
svn_wc_notify_action_t action;
svn_node_kind_t kind = svn_node_file;
+ const char *moved_to_abspath = NULL;
/* Find out if a pending delete notification for this path is
* still around. */
@@ -1087,9 +1088,30 @@ close_file(void *file_baton,
else if (b->added)
action = svn_wc_notify_update_add;
else
- action = svn_wc_notify_update_update;
+ {
+ svn_error_t *err;
+
+ action = svn_wc_notify_update_update;
+
+ /* If the file was moved-away, use its new path in the
+ * notification.
+ * ### This is redundant. The file_changed() callback should
+ * ### pass the moved-to path back up here. */
+ err = svn_wc__node_was_moved_away(&moved_to_abspath, NULL,
+ eb->wc_ctx, b->wcpath,
+ scratch_pool, scratch_pool);
+ if (err)
+ {
+ if (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+ svn_error_clear(err);
+ else
+ return svn_error_trace(err);
+ }
+ }
- notify = svn_wc_create_notify(b->wcpath, action, scratch_pool);
+ notify = svn_wc_create_notify(moved_to_abspath ? moved_to_abspath
+ : b->wcpath,
+ action, scratch_pool);
notify->kind = kind;
notify->content_state = content_state;
notify->prop_state = prop_state;
Modified: subversion/branches/fs-py/subversion/libsvn_fs_base/fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_fs_base/fs.c?rev=1161713&r1=1161712&r2=1161713&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_fs_base/fs.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_fs_base/fs.c Thu Aug 25 19:33:47 2011
@@ -880,7 +880,6 @@ base_verify(svn_fs_t *fs, const char *pa
apr_pool_t *pool,
apr_pool_t *common_pool)
{
- /* ### Any boilerplate needed here? */
/* Verifying is currently a no op for BDB. */
return SVN_NO_ERROR;
}
Modified: subversion/branches/fs-py/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_fs_fs/fs_fs.c?rev=1161713&r1=1161712&r2=1161713&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_fs_fs/fs_fs.c Thu Aug 25 19:33:47 2011
@@ -2436,33 +2436,40 @@ svn_fs_fs__get_node_revision(node_revisi
that represents the location of representation REP. If
MUTABLE_REP_TRUNCATED is given, the rep is for props or dir contents,
and only a "-1" revision number will be given for a mutable rep.
+ If MAY_BE_CORRUPT is true, guard for NULL when constructing the string.
Perform the allocation from POOL. */
static const char *
representation_string(representation_t *rep,
int format,
svn_boolean_t mutable_rep_truncated,
+ svn_boolean_t may_be_corrupt,
apr_pool_t *pool)
{
if (rep->txn_id && mutable_rep_truncated)
return "-1";
+#define DISPLAY_MAYBE_NULL_CHECKSUM(checksum) \
+ ((may_be_corrupt == FALSE || (checksum) != NULL) \
+ ? svn_checksum_to_cstring_display((checksum), pool) \
+ : "(null)")
+
if (format < SVN_FS_FS__MIN_REP_SHARING_FORMAT || rep->sha1_checksum == NULL)
return apr_psprintf(pool, "%ld %" APR_OFF_T_FMT " %" SVN_FILESIZE_T_FMT
" %" SVN_FILESIZE_T_FMT " %s",
rep->revision, rep->offset, rep->size,
rep->expanded_size,
- svn_checksum_to_cstring_display(rep->md5_checksum,
- pool));
+ DISPLAY_MAYBE_NULL_CHECKSUM(rep->md5_checksum));
return apr_psprintf(pool, "%ld %" APR_OFF_T_FMT " %" SVN_FILESIZE_T_FMT
" %" SVN_FILESIZE_T_FMT " %s %s %s",
rep->revision, rep->offset, rep->size,
rep->expanded_size,
- svn_checksum_to_cstring_display(rep->md5_checksum,
- pool),
- svn_checksum_to_cstring_display(rep->sha1_checksum,
- pool),
+ DISPLAY_MAYBE_NULL_CHECKSUM(rep->md5_checksum),
+ DISPLAY_MAYBE_NULL_CHECKSUM(rep->sha1_checksum),
rep->uniquifier);
+
+#undef DISPLAY_MAYBE_NULL_CHECKSUM
+
}
@@ -2495,12 +2502,13 @@ svn_fs_fs__write_noderev(svn_stream_t *o
format,
(noderev->kind
== svn_node_dir),
+ FALSE,
pool)));
if (noderev->prop_rep)
SVN_ERR(svn_stream_printf(outfile, pool, HEADER_PROPS ": %s\n",
representation_string(noderev->prop_rep, format,
- TRUE, pool)));
+ TRUE, FALSE, pool)));
SVN_ERR(svn_stream_printf(outfile, pool, HEADER_CPATH ": %s\n",
noderev->created_path));
@@ -3136,7 +3144,7 @@ create_rep_state(struct rep_state **rep_
"Corrupt representation '%s'",
rep
? representation_string(rep, ffd->format, TRUE,
- pool)
+ TRUE, pool)
: "(null)");
}
/* ### Call representation_string() ? */
@@ -6501,10 +6509,11 @@ svn_fs_fs__commit(svn_revnum_t *new_rev_
SVN_ERR(svn_fs_fs__with_write_lock(fs, commit_body, &cb, pool));
+ /* At this point, *NEW_REV_P has been set, so errors below won't affect
+ the success of the commit. (See svn_fs_commit_txn().) */
+
if (ffd->rep_sharing_allowed)
{
- /* At this point, *NEW_REV_P has been set, so errors here won't affect
- the success of the commit. (See svn_fs_commit_txn().) */
SVN_ERR(svn_fs_fs__open_rep_cache(fs, pool));
SVN_ERR(svn_sqlite__with_transaction(ffd->rep_cache_db,
commit_sqlite_txn_callback,
Modified: subversion/branches/fs-py/subversion/libsvn_wc/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/merge.c?rev=1161713&r1=1161712&r2=1161713&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/merge.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/merge.c Thu Aug 25 19:33:47 2011
@@ -1320,7 +1320,6 @@ svn_wc__internal_merge(svn_skel_t **work
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
- apr_pool_t *pool = scratch_pool; /* ### temporary rename */
const char *detranslated_target_abspath;
svn_boolean_t is_binary = FALSE;
const svn_prop_t *mimeprop;
@@ -1357,13 +1356,15 @@ svn_wc__internal_merge(svn_skel_t **work
SVN_ERR(detranslate_wc_file(&detranslated_target_abspath, &mt,
(! is_binary) && diff3_cmd != NULL,
target_abspath,
- cancel_func, cancel_baton, pool, pool));
+ cancel_func, cancel_baton,
+ scratch_pool, scratch_pool));
/* We cannot depend on the left file to contain the same eols as the
right file. If the merge target has mods, this will mark the entire
file as conflicted, so we need to compensate. */
SVN_ERR(maybe_update_target_eols(&left_abspath, &mt, left_abspath,
- cancel_func, cancel_baton, pool, pool));
+ cancel_func, cancel_baton,
+ scratch_pool, scratch_pool));
if (is_binary)
{
Modified: subversion/branches/fs-py/subversion/libsvn_wc/props.h
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/props.h?rev=1161713&r1=1161712&r2=1161713&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/props.h (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/props.h Thu Aug 25 19:33:47 2011
@@ -45,7 +45,7 @@ extern "C" {
For 1.7, we're removing this support. Some old code is being left around
in case we decide to change this.
- For more information, see ^/notes/api-errata/wc006.txt
+ For more information, see ^/notes/api-errata/1.7/wc006.txt
*/
#undef SVN__SUPPORT_BASE_MERGE
Modified: subversion/branches/fs-py/subversion/mod_dav_svn/dav_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/mod_dav_svn/dav_svn.h?rev=1161713&r1=1161712&r2=1161713&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/mod_dav_svn/dav_svn.h (original)
+++ subversion/branches/fs-py/subversion/mod_dav_svn/dav_svn.h Thu Aug 25 19:33:47 2011
@@ -808,7 +808,8 @@ enum dav_svn__build_what {
DAV_SVN__BUILD_URI_BC, /* a Baseline Collection */
DAV_SVN__BUILD_URI_PUBLIC, /* the "public" VCR */
DAV_SVN__BUILD_URI_VERSION, /* a Version Resource */
- DAV_SVN__BUILD_URI_VCC /* a Version Controlled Configuration */
+ DAV_SVN__BUILD_URI_VCC, /* a Version Controlled Configuration */
+ DAV_SVN__BUILD_URI_REVROOT /* HTTPv2: Revision Root resource */
};
const char *
Modified: subversion/branches/fs-py/subversion/mod_dav_svn/reports/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/mod_dav_svn/reports/update.c?rev=1161713&r1=1161712&r2=1161713&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/mod_dav_svn/reports/update.c (original)
+++ subversion/branches/fs-py/subversion/mod_dav_svn/reports/update.c Thu Aug 25 19:33:47 2011
@@ -82,6 +82,11 @@ typedef struct update_ctx_t {
/* SVNDIFF version to send to client. */
int svndiff_version;
+
+ /* Did the client submit this REPORT request via the HTTPv2 "me
+ resource" and are we advertising support for as much? */
+ svn_boolean_t enable_v2_response;
+
} update_ctx_t;
typedef struct item_baton_t {
@@ -219,9 +224,18 @@ send_vsn_url(item_baton_t *baton, apr_po
path = get_real_fs_path(baton, pool);
revision = dav_svn__get_safe_cr(baton->uc->rev_root, path, pool);
- href = dav_svn__build_uri(baton->uc->resource->info->repos,
- DAV_SVN__BUILD_URI_VERSION,
- revision, path, 0 /* add_href */, pool);
+ if (baton->uc->enable_v2_response)
+ {
+ href = dav_svn__build_uri(baton->uc->resource->info->repos,
+ DAV_SVN__BUILD_URI_REVROOT,
+ revision, path, 0 /* add_href */, pool);
+ }
+ else
+ {
+ href = dav_svn__build_uri(baton->uc->resource->info->repos,
+ DAV_SVN__BUILD_URI_VERSION,
+ revision, path, 0 /* add_href */, pool);
+ }
return dav_svn__brigade_printf(baton->uc->bb, baton->uc->output,
"<D:checked-in><D:href>%s</D:href>"
@@ -1073,6 +1087,9 @@ dav_svn__update_report(const dav_resourc
uc.target = target;
uc.bb = apr_brigade_create(resource->pool, output->c->bucket_alloc);
uc.pathmap = NULL;
+ uc.enable_v2_response = ((resource->info->restype == DAV_SVN_RESTYPE_ME)
+ && (resource->info->repos->v2_protocol));
+
if (dst_path) /* we're doing a 'switch' */
{
if (*target)
Modified: subversion/branches/fs-py/subversion/mod_dav_svn/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/mod_dav_svn/util.c?rev=1161713&r1=1161712&r2=1161713&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/mod_dav_svn/util.c (original)
+++ subversion/branches/fs-py/subversion/mod_dav_svn/util.c Thu Aug 25 19:33:47 2011
@@ -264,6 +264,11 @@ dav_svn__build_uri(const dav_svn_repos *
href1, root_path, special_uri,
revision, path_uri, href2);
+ case DAV_SVN__BUILD_URI_REVROOT:
+ return apr_psprintf(pool, "%s%s/%s/rvr/%ld%s%s",
+ href1, root_path, special_uri,
+ revision, path_uri, href2);
+
case DAV_SVN__BUILD_URI_VCC:
return apr_psprintf(pool, "%s%s/%s/vcc/" DAV_SVN__DEFAULT_VCC_NAME "%s",
href1, root_path, special_uri, href2);
Modified: subversion/branches/fs-py/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/svn/main.c?rev=1161713&r1=1161712&r2=1161713&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/svn/main.c (original)
+++ subversion/branches/fs-py/subversion/svn/main.c Thu Aug 25 19:33:47 2011
@@ -1147,7 +1147,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
" 2. relocate TO-URL [PATH]\n"
"\n"
" Rewrite working copy URL metadata to reflect a syntactic change only.\n"
- " This is used when repository's root URL changes (such as a scheme\n"
+ " This is used when a repository's root URL changes (such as a scheme\n"
" or hostname change) but your working copy still reflects the same\n"
" directory within the same repository.\n"
"\n"
Modified: subversion/branches/fs-py/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/tests/cmdline/merge_tests.py?rev=1161713&r1=1161712&r2=1161713&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/fs-py/subversion/tests/cmdline/merge_tests.py Thu Aug 25 19:33:47 2011
@@ -17022,6 +17022,94 @@ def merged_deletion_causes_tree_conflict
None, None, None, None,
None, 1, False)
+#----------------------------------------------------------------------
+# A test for issue #3976 'record-only merges which add new subtree mergeinfo
+# don't record mergeinfo describing merge'.
+@Issue(3976)
+@XFail()
+@SkipUnless(server_has_mergeinfo)
+def record_only_merge_adds_new_subtree_mergeinfo(sbox):
+ "record only merge adds new subtree mergeinfo"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ wc_disk, wc_status = set_up_branch(sbox)
+
+ psi_path = os.path.join(wc_dir, 'A', 'D', 'H', 'psi')
+ psi_COPY_path = os.path.join(wc_dir, 'A_COPY', 'D', 'H', 'psi')
+ H_COPY2_path = os.path.join(wc_dir, 'A_COPY_2', 'D', 'H')
+
+ # r7 - Copy ^/A_COPY to ^/A_COPY_2
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'copy', '-m', 'copy A_COPY to A_COPY_2',
+ sbox.repo_url + '/A_COPY',
+ sbox.repo_url + '/A_COPY_2')
+
+ # r8 - Set a property on A/D/H/psi. It doesn't matter what property
+ # we use, just as long as we have a change that can be merged independently
+ # of the text change to A/D/H/psi in r3.
+ svntest.main.run_svn(None, 'propset', 'svn:eol-style', 'native', psi_path)
+ svntest.main.run_svn(None, 'commit', '-m', 'set svn:eol-style', wc_dir)
+
+ # r9 - Merge r3 from ^/A/D/H/psi to A_COPY/D/H/psi.
+ svntest.actions.run_and_verify_svn(None, None, [], 'merge',
+ sbox.repo_url + '/A/D/H/psi',
+ psi_COPY_path, '-c3')
+ svntest.main.run_svn(None, 'commit', '-m', 'Subtree merge', wc_dir)
+
+ # r10 - Merge r8 from ^/A/D/H/psi to A_COPY/D/H/psi.
+ svntest.actions.run_and_verify_svn(None, None, [], 'merge',
+ sbox.repo_url + '/A/D/H/psi',
+ psi_COPY_path, '-c8')
+ svntest.main.run_svn(None, 'commit', '-m', 'Subtree merge', wc_dir)
+
+ # Merge r10 from ^/A_COPY/D/H to A_COPY_2/D/H. This should leave
+ # A_COPY_2/D/H/psi with three new property changes:
+ #
+ # 1) The 'svn:eol-style=native' from r10 via r8.
+ #
+ # 2) The mergeinfo '/A/D/H/psi:8' from r10.
+ #
+ # 3) The mergeinfo '/A_COPY/D/H/psi:10' describing the merge itself.
+ #
+ # Currently this test fails because #3 doesn't happen.
+ svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
+ expected_output = wc.State(H_COPY2_path, {
+ 'psi' : Item(status=' U'),
+ })
+ expected_mergeinfo_output = wc.State(H_COPY2_path, {
+ '' : Item(status=' U'),
+ 'psi' : Item(status=' G'),
+ })
+ expected_elision_output = wc.State(H_COPY2_path, {})
+ expected_status = wc.State(H_COPY2_path, {
+ '' : Item(status=' M'),
+ 'chi' : Item(status=' '),
+ 'psi' : Item(status=' M'),
+ 'omega' : Item(status=' '),
+ })
+ expected_status.tweak(wc_rev=10)
+ expected_disk = wc.State('', {
+ '' : Item(props={SVN_PROP_MERGEINFO : '/A_COPY/D/H:10'}),
+ 'psi' : Item("This is the file 'psi'.\n",
+ props={SVN_PROP_MERGEINFO :
+ '/A/D/H/psi:8\n/A_COPY/D/H/psi:10',
+ 'svn:eol-style' : 'native'}),
+ 'chi' : Item("This is the file 'chi'.\n"),
+ 'omega' : Item("This is the file 'omega'.\n"),
+ })
+ expected_skip = wc.State('.', { })
+ svntest.actions.run_and_verify_merge(H_COPY2_path, 9, 10,
+ sbox.repo_url + '/A_COPY/D/H', None,
+ expected_output,
+ expected_mergeinfo_output,
+ expected_elision_output,
+ expected_disk,
+ expected_status,
+ expected_skip,
+ None, None, None, None,
+ None, 1, False)
+
########################################################################
# Run the tests
@@ -17149,6 +17237,7 @@ test_list = [ None,
merge_adds_subtree_with_mergeinfo,
reverse_merge_adds_subtree,
merged_deletion_causes_tree_conflict,
+ record_only_merge_adds_new_subtree_mergeinfo,
]
if __name__ == '__main__':
Modified: subversion/branches/fs-py/subversion/tests/cmdline/tree_conflict_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/tests/cmdline/tree_conflict_tests.py?rev=1161713&r1=1161712&r2=1161713&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/tests/cmdline/tree_conflict_tests.py (original)
+++ subversion/branches/fs-py/subversion/tests/cmdline/tree_conflict_tests.py Thu Aug 25 19:33:47 2011
@@ -657,7 +657,7 @@ def merge_file_mod_onto_not_file(sbox):
"merge file: modify onto not-file"
sbox2 = sbox.clone_dependent()
test_tc_merge(sbox, f_mods, br_scen = f_dels + f_moves + f_rpl_d)
- test_tc_merge(sbox2, f_mods, wc_scen = f_dels + f_moves)
+ test_tc_merge(sbox2, f_mods, wc_scen = f_dels)
# Note: See UC4 in notes/tree-conflicts/use-cases.txt.
def merge_file_del_onto_not_same(sbox):
Modified: subversion/branches/fs-py/subversion/tests/libsvn_fs/fs-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/tests/libsvn_fs/fs-test.c?rev=1161713&r1=1161712&r2=1161713&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/tests/libsvn_fs/fs-test.c (original)
+++ subversion/branches/fs-py/subversion/tests/libsvn_fs/fs-test.c Thu Aug 25 19:33:47 2011
@@ -658,6 +658,7 @@ revision_props(const svn_test_opts_t *op
/* Copy a property's value into a new property. */
SVN_ERR(svn_fs_revision_prop(&value, fs, 0, "color", pool));
+ SVN_TEST_ASSERT(value);
s1.data = value->data;
s1.len = value->len;
@@ -694,6 +695,7 @@ revision_props(const svn_test_opts_t *op
/* Obtain a list of all current properties, and make sure it matches
the expected values. */
SVN_ERR(svn_fs_revision_proplist(&proplist, fs, 0, pool));
+ SVN_TEST_ASSERT(proplist);
{
svn_string_t *prop_value;