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/30 16:51:34 UTC
svn commit: r1163242 - in /subversion/branches/fs-py: ./
contrib/client-side/ subversion/bindings/swig/perl/native/
subversion/include/private/ subversion/libsvn_client/
subversion/libsvn_repos/ subversion/libsvn_wc/ subversion/svn/
subversion/tests/ s...
Author: hwright
Date: Tue Aug 30 14:51:33 2011
New Revision: 1163242
URL: http://svn.apache.org/viewvc?rev=1163242&view=rev
Log:
On the fs-py branch:
Bring up-to-date with trunk.
Modified:
subversion/branches/fs-py/ (props changed)
subversion/branches/fs-py/contrib/client-side/svn-clean
subversion/branches/fs-py/subversion/bindings/swig/perl/native/Makefile.PL.in
subversion/branches/fs-py/subversion/include/private/svn_wc_private.h
subversion/branches/fs-py/subversion/libsvn_client/commit_util.c
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_client/repos_diff_summarize.c
subversion/branches/fs-py/subversion/libsvn_repos/dump.c
subversion/branches/fs-py/subversion/libsvn_wc/entries.c
subversion/branches/fs-py/subversion/libsvn_wc/merge.c
subversion/branches/fs-py/subversion/svn/info-cmd.c
subversion/branches/fs-py/subversion/svn/main.c
subversion/branches/fs-py/subversion/tests/cmdline/authz_tests.py
subversion/branches/fs-py/subversion/tests/cmdline/info_tests.py
subversion/branches/fs-py/subversion/tests/cmdline/merge_reintegrate_tests.py
subversion/branches/fs-py/subversion/tests/cmdline/merge_tests.py
subversion/branches/fs-py/subversion/tests/svn_test.h
Propchange: subversion/branches/fs-py/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 30 14:51:33 2011
@@ -56,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-1161710
+/subversion/trunk:1154223-1163240
Modified: subversion/branches/fs-py/contrib/client-side/svn-clean
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/contrib/client-side/svn-clean?rev=1163242&r1=1163241&r2=1163242&view=diff
==============================================================================
--- subversion/branches/fs-py/contrib/client-side/svn-clean (original)
+++ subversion/branches/fs-py/contrib/client-side/svn-clean Tue Aug 30 14:51:33 2011
@@ -35,7 +35,7 @@ my $print = 0;
my $help = 0;
my $man = 0;
my $nonrecursive = 0;
-my $path = $CWD;
+my @paths = ($CWD);
GetOptions(
"exclude=s" => \@exclude,
"force" => \$force,
@@ -47,7 +47,7 @@ GetOptions(
) or pod2usage(2);
pod2usage(1) if $help;
pod2usage( -exitstatus => 0, -verbose => 2 ) if $man;
-$path = Cwd::abs_path( $ARGV[0] ) if @ARGV;
+@paths = map { Cwd::abs_path($_) } @ARGV if @ARGV;
# Precompile regexes.
$_ = qr/$_/ foreach @exclude;
@@ -58,7 +58,8 @@ if ($use_svn_module) {
my $ctx = new SVN::Client;
# Call handler function with status info for each file.
- $ctx->status( $path, undef, \&clean, !$nonrecursive, 1, 0, 1 );
+ $ctx->status( $_, undef, \&clean, !$nonrecursive, 1, 0, 1 )
+ for @paths;
}
else {
warn "Warning: Not using SVN Perl modules, this might be slow.\n"
@@ -74,11 +75,11 @@ else {
if ( $^O eq 'MSWin32' ) {
# Perl on Windows currently doesn't have list pipe opens.
- open SVN, join( ' ', @command, @ARGV ) . '|'
+ open SVN, join( ' ', @command, @paths ) . '|'
or die "Can't call program \"svn\": $!\n";
}
else {
- open SVN, "-|", @command, @ARGV
+ open SVN, "-|", @command, @paths
or die "Can't call program \"svn\": $!\n";
}
LINE: while (<SVN>) {
Modified: subversion/branches/fs-py/subversion/bindings/swig/perl/native/Makefile.PL.in
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/bindings/swig/perl/native/Makefile.PL.in?rev=1163242&r1=1163241&r2=1163242&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/bindings/swig/perl/native/Makefile.PL.in (original)
+++ subversion/branches/fs-py/subversion/bindings/swig/perl/native/Makefile.PL.in Tue Aug 30 14:51:33 2011
@@ -47,8 +47,7 @@ my @ldmodules = map {"-lsvn_$_-1"} (@mod
my $apr_shlib_path_var = '@SVN_APR_SHLIB_PATH_VAR@';
my $cppflags = '@CPPFLAGS@';
my $cflags = '@CFLAGS@';
-my $apr_cflags = '@SVN_APR_INCLUDES@';
-my $apu_cflags = '@SVN_APRUTIL_INCLUDES@';
+my $includes = '@SVN_APR_INCLUDES@ @SVN_APRUTIL_INCLUDES@';
# According to the log of r7937, the flags guarded by the conditional break
# the build on FreeBSD if not conditionalized.
@@ -61,7 +60,7 @@ my %config = (
ABSTRACT => 'Perl bindings for Subversion',
DEFINE => $cppflags,
CCFLAGS => join(' ', $cflags, $Config{ccflags}),
- INC => join(' ',$apr_cflags, $apu_cflags,
+ INC => join(' ', $includes, $cppflags,
" -I$swig_srcdir/perl/libsvn_swig_perl",
" -I$svnlib_srcdir/include",
" -I$svnlib_builddir",
Modified: subversion/branches/fs-py/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/include/private/svn_wc_private.h?rev=1163242&r1=1163241&r2=1163242&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/include/private/svn_wc_private.h (original)
+++ subversion/branches/fs-py/subversion/include/private/svn_wc_private.h Tue Aug 30 14:51:33 2011
@@ -105,9 +105,18 @@ svn_wc__crawl_file_external(svn_wc_conte
If IGNORE_ENOENT, then set *external_kind to svn_node_none, when
LOCAL_ABSPATH is not an external instead of returning an error.
- ### While we are not at the SVN_WC__HAS_EXTERNALS_STORE format, roots
- ### of working copies will be identified as directory externals. The
- ### recorded information will be NULL for directory externals.
+ Here is an overview of how DEFINING_REVISION and
+ DEFINING_OPERATIONAL_REVISION would be set for which kinds of externals
+ definitions:
+
+ svn:externals line DEFINING_REV. DEFINING_OP._REV.
+
+ ^/foo@2 bar 2 2
+ -r1 ^/foo@2 bar 1 2
+ -r1 ^/foo bar 1 SVN_INVALID_REVNUM
+ ^/foo bar SVN_INVALID_REVNUM SVN_INVALID_REVNUM
+ ^/foo@HEAD bar SVN_INVALID_REVNUM SVN_INVALID_REVNUM
+ -rHEAD ^/foo bar -- not a valid externals definition --
*/
svn_error_t *
svn_wc__read_external_info(svn_node_kind_t *external_kind,
Modified: subversion/branches/fs-py/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_client/commit_util.c?rev=1163242&r1=1163241&r2=1163242&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_client/commit_util.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_client/commit_util.c Tue Aug 30 14:51:33 2011
@@ -402,7 +402,7 @@ bail_on_tree_conflicted_ancestor(svn_wc_
If COMMIT_RELPATH is not NULL, treat not-added nodes as if it is destined to
be added as COMMIT_RELPATH, and add 'deleted' entries to COMMITTABLES as
items to delete in the copy destination. COPY_MODE_ROOT should be set TRUE
- for the first call for which COPY_MODE is TRUE, i.e. not for for the
+ for the first call for which COPY_MODE is TRUE, i.e. not for the
recursive calls, and FALSE otherwise.
If CHANGELISTS is non-NULL, it is a hash whose keys are const char *
@@ -543,12 +543,12 @@ harvest_committables(svn_wc_context_t *w
svn_dirent_local_style(local_abspath, scratch_pool));
}
+ /* ### in need of comment */
if (copy_mode
&& is_update_root
&& db_kind == svn_node_file)
{
- if (copy_mode)
- return SVN_NO_ERROR;
+ return SVN_NO_ERROR;
}
/* If NODE is in our changelist, then examine it for conflicts. We
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=1163242&r1=1163241&r2=1163242&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_client/merge.c Tue Aug 30 14:51:33 2011
@@ -1178,13 +1178,21 @@ merge_props_changed(svn_wc_notify_state_
if (strcmp(prop->name, SVN_PROP_MERGEINFO) == 0)
{
- /* Does PATH have any working mergeinfo? */
- svn_string_t *mergeinfo_prop =
- apr_hash_get(original_props,
- SVN_PROP_MERGEINFO,
- APR_HASH_KEY_STRING);
+ /* Does LOCAL_ABSPATH have any pristine mergeinfo? */
+ svn_boolean_t has_pristine_mergeinfo = FALSE;
+ apr_hash_t *pristine_props;
+
+ SVN_ERR(svn_wc_get_pristine_props(&pristine_props,
+ ctx->wc_ctx,
+ local_abspath,
+ scratch_pool,
+ scratch_pool));
+
+ if (apr_hash_get(pristine_props, SVN_PROP_MERGEINFO,
+ APR_HASH_KEY_STRING))
+ has_pristine_mergeinfo = TRUE;
- if (!mergeinfo_prop && prop->value)
+ if (!has_pristine_mergeinfo && prop->value)
{
/* If BATON->PATHS_WITH_NEW_MERGEINFO needs to be
allocated do so in BATON->POOL so it has a
@@ -1197,7 +1205,7 @@ merge_props_changed(svn_wc_notify_state_
apr_pstrdup(merge_b->pool, local_abspath),
APR_HASH_KEY_STRING, local_abspath);
}
- else if (mergeinfo_prop && !prop->value)
+ else if (has_pristine_mergeinfo && !prop->value)
{
/* If BATON->PATHS_WITH_DELETED_MERGEINFO needs to be
allocated do so in BATON->POOL so it has a
@@ -2686,6 +2694,7 @@ notification_receiver(void *baton, const
{
notification_receiver_baton_t *notify_b = baton;
svn_boolean_t is_operative_notification = FALSE;
+ const char *notify_path;
/* Skip notifications if this is a --record-only merge that is adding
or deleting NOTIFY->PATH, allow only mergeinfo changes and headers.
@@ -2703,6 +2712,35 @@ notification_receiver(void *baton, const
is_operative_notification = TRUE;
}
+ /* If the node was moved-away, use its new path in the notification. */
+ /* ### Currently only for files, as following a local move of a dir is
+ * not yet implemented.
+ * ### We should stash the info about which moves have been followed and
+ * retrieve that info here, instead of querying the WC again here. */
+ notify_path = notify->path;
+ if (notify->action == svn_wc_notify_update_update
+ && notify->kind == svn_node_file)
+ {
+ svn_error_t *err;
+ const char *moved_to_abspath;
+
+ err = svn_wc__node_was_moved_away(&moved_to_abspath, NULL,
+ notify_b->merge_b->ctx->wc_ctx,
+ notify->path, pool, pool);
+ if (err)
+ {
+ if (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+ {
+ svn_error_clear(err);
+ moved_to_abspath = NULL;
+ }
+ else
+ return; /* ### return svn_error_trace(err); */
+ }
+ if (moved_to_abspath)
+ notify_path = moved_to_abspath;
+ }
+
if (notify_b->merge_b->sources_ancestral
|| notify_b->merge_b->reintegrate_merge)
{
@@ -2712,7 +2750,7 @@ notification_receiver(void *baton, const
|| notify->prop_state == svn_wc_notify_state_changed
|| notify->action == svn_wc_notify_update_add)
{
- const char *merged_path = apr_pstrdup(notify_b->pool, notify->path);
+ const char *merged_path = apr_pstrdup(notify_b->pool, notify_path);
if (notify_b->merged_abspaths == NULL)
notify_b->merged_abspaths = apr_hash_make(notify_b->pool);
@@ -2723,7 +2761,7 @@ notification_receiver(void *baton, const
if (notify->action == svn_wc_notify_skip)
{
- const char *skipped_path = apr_pstrdup(notify_b->pool, notify->path);
+ const char *skipped_path = apr_pstrdup(notify_b->pool, notify_path);
if (notify_b->skipped_abspaths == NULL)
notify_b->skipped_abspaths = apr_hash_make(notify_b->pool);
@@ -2735,7 +2773,7 @@ notification_receiver(void *baton, const
if (notify->action == svn_wc_notify_tree_conflict)
{
const char *tree_conflicted_path = apr_pstrdup(notify_b->pool,
- notify->path);
+ notify_path);
if (notify_b->tree_conflicted_abspaths == NULL)
notify_b->tree_conflicted_abspaths =
@@ -2749,7 +2787,7 @@ notification_receiver(void *baton, const
if (notify->action == svn_wc_notify_update_add)
{
svn_boolean_t is_root_of_added_subtree = FALSE;
- const char *added_path = apr_pstrdup(notify_b->pool, notify->path);
+ const char *added_path = apr_pstrdup(notify_b->pool, notify_path);
const char *added_path_parent = NULL;
/* Stash the root path of any added subtrees. */
@@ -2798,7 +2836,7 @@ notification_receiver(void *baton, const
find_nearest_ancestor(
notify_b->children_with_mergeinfo,
notify->action != svn_wc_notify_update_delete,
- notify->path);
+ notify_path);
if (new_nearest_ancestor_index != notify_b->cur_ancestor_index)
{
@@ -7842,19 +7880,38 @@ record_mergeinfo_for_dir_merge(svn_merge
child_merges = apr_hash_make(iterpool);
- /* If CHILD is the merge target we then know that the mergeinfo
- described by MERGE_SOURCE_PATH:MERGED_RANGE->START-
- MERGED_RANGE->END describes existent path-revs in the repository,
- see normalize_merge_sources() and the global comment
+ /* The short story:
+
+ If we are describing a forward merge, then the naive mergeinfo
+ defined by MERGE_SOURCE_PATH:MERGED_RANGE->START:
+ MERGE_SOURCE_PATH:MERGED_RANGE->END may contain non-existent
+ path-revs or may describe other lines of history. We must
+ remove these invalid portion(s) before recording mergeinfo
+ describing the merge.
+
+ The long story:
+
+ If CHILD is the merge target we know that
+ MERGE_SOURCE_PATH:MERGED_RANGE->END exists. Further, if there
+ were no copies in MERGE_SOURCE_PATH's history going back to
+ RANGE->START then we know that
+ MERGE_SOURCE_PATH:MERGED_RANGE->START exists too and the two
+ describe and unbroken line of history and thus
+ MERGE_SOURCE_PATH:MERGED_RANGE->START:
+ MERGE_SOURCE_PATH:MERGED_RANGE->END is a valid description of
+ the merge -- see normalize_merge_sources() and the global comment
'MERGEINFO MERGE SOURCE NORMALIZATION'.
- If CHILD is a subtree of the merge target however, then no such
- guarantee holds. The mergeinfo described by
- (MERGE_SOURCE_PATH + CHILD_REPOS_PATH):MERGED_RANGE->START-
- MERGED_RANGE->END might contain merge sources which don't
- exist or refer to unrelated lines of history. */
- if (i > 0
- && (!merge_b->record_only || merge_b->reintegrate_merge)
+ However, if there *was* a copy, then
+ MERGE_SOURCE_PATH:MERGED_RANGE->START doesn't exist or is
+ unrelated to MERGE_SOURCE_PATH:MERGED_RANGE->END. Also, we
+ don't know if (MERGE_SOURCE_PATH:MERGED_RANGE->START)+1 through
+ (MERGE_SOURCE_PATH:MERGED_RANGE->END)-1 actually exist.
+
+ If CHILD is a subtree of the merge target, then nothing is
+ guaranteed beyond the fact that MERGE_SOURCE_PATH exists at
+ MERGED_RANGE->END. */
+ if ((!merge_b->record_only || merge_b->reintegrate_merge)
&& (!is_rollback))
{
svn_opt_revision_t peg_revision;
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=1163242&r1=1163241&r2=1163242&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_client/repos_diff.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_client/repos_diff.c Tue Aug 30 14:51:33 2011
@@ -370,7 +370,11 @@ get_file_from_ra(struct file_baton *b,
return SVN_NO_ERROR;
}
-/* Issue #3657 'dav update report handler in skelta mode can cause
+/* Remove every no-op property change from CHANGES: that is, remove every
+ entry in which the target value is the same as the value of the
+ corresponding property in PRISTINE_PROPS.
+
+ Issue #3657 'dav update report handler in skelta mode can cause
spurious conflicts'. When communicating with the repository via ra_serf
and ra_neon, the change_dir_prop and change_file_prop svn_delta_editor_t
callbacks are called (obviously) when a directory or file property has
@@ -397,8 +401,6 @@ get_file_from_ra(struct file_baton *b,
See http://subversion.tigris.org/issues/show_bug.cgi?id=3657#desc9 and
http://svn.haxx.se/dev/archive-2010-08/0351.shtml for more details.
-
- This function filters these property changes from the change hash
*/
static void
remove_non_prop_changes(apr_hash_t *pristine_props,
@@ -545,7 +547,10 @@ diff_deleted_dir(const char *dir,
/* Compare a file being deleted against an empty file */
b = make_file_baton(path, FALSE, eb, iterpool);
- SVN_ERR(get_file_from_ra(b, FALSE, iterpool));
+ if (eb->text_deltas)
+ SVN_ERR(get_file_from_ra(b, FALSE, iterpool));
+ else
+ SVN_ERR(get_empty_file(eb, &b->path_start_revision));
SVN_ERR(get_empty_file(b->edit_baton, &(b->path_end_revision)));
@@ -617,7 +622,11 @@ delete_entry(const char *path,
/* Compare a file being deleted against an empty file */
b = make_file_baton(path, FALSE, eb, scratch_pool);
- SVN_ERR(get_file_from_ra(b, FALSE, scratch_pool));
+ if (eb->text_deltas)
+ SVN_ERR(get_file_from_ra(b, FALSE, scratch_pool));
+ else
+ SVN_ERR(get_empty_file(eb, &b->path_start_revision));
+
SVN_ERR(get_empty_file(b->edit_baton, &(b->path_end_revision)));
get_file_mime_types(&mimetype1, &mimetype2, b);
@@ -908,6 +917,19 @@ apply_textdelta(void *file_baton,
return SVN_NO_ERROR;
}
+ /* If we're not sending file text, then ignore any that we receive. */
+ if (! b->edit_baton->text_deltas)
+ {
+ /* Supply valid paths to indicate there is a text change. */
+ SVN_ERR(get_empty_file(b->edit_baton, &b->path_start_revision));
+ SVN_ERR(get_empty_file(b->edit_baton, &b->path_end_revision));
+
+ *handler = svn_delta_noop_window_handler;
+ *handler_baton = NULL;
+
+ return SVN_NO_ERROR;
+ }
+
/* We need the expected pristine file, so go get it */
if (!b->added)
SVN_ERR(get_file_from_ra(b, FALSE, scratch_pool));
@@ -1052,7 +1074,6 @@ 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. */
@@ -1088,30 +1109,9 @@ close_file(void *file_baton,
else if (b->added)
action = svn_wc_notify_update_add;
else
- {
- 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);
- }
- }
+ action = svn_wc_notify_update_update;
- notify = svn_wc_create_notify(moved_to_abspath ? moved_to_abspath
- : b->wcpath,
- action, scratch_pool);
+ notify = svn_wc_create_notify(b->wcpath, action, scratch_pool);
notify->kind = kind;
notify->content_state = content_state;
notify->prop_state = prop_state;
@@ -1374,9 +1374,6 @@ svn_client__get_diff_editor(const svn_de
apr_pool_t *editor_pool = svn_pool_create(result_pool);
svn_delta_editor_t *tree_editor = svn_delta_default_editor(editor_pool);
struct edit_baton *eb = apr_pcalloc(editor_pool, sizeof(*eb));
- const char *target_abspath;
-
- SVN_ERR(svn_dirent_get_absolute(&target_abspath, target, editor_pool));
eb->pool = editor_pool;
eb->target = target;
Modified: subversion/branches/fs-py/subversion/libsvn_client/repos_diff_summarize.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_client/repos_diff_summarize.c?rev=1163242&r1=1163241&r2=1163242&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_client/repos_diff_summarize.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_client/repos_diff_summarize.c Tue Aug 30 14:51:33 2011
@@ -61,6 +61,9 @@ send_summary(struct summarize_baton_t *b
{
svn_client_diff_summarize_t *sum = apr_pcalloc(scratch_pool, sizeof(*sum));
+ SVN_ERR_ASSERT(summarize_kind != svn_client_diff_summarize_kind_normal
+ || prop_changed);
+
/* PATH is relative to the anchor of the diff, but SUM->path needs to be
relative to the target of the diff. */
sum->path = svn_relpath_skip_ancestor(b->target, path);
@@ -263,12 +266,13 @@ cb_file_changed(svn_wc_notify_state_t *c
{
struct summarize_baton_t *b = diff_baton;
svn_boolean_t text_change = (tmpfile2 != NULL);
+ svn_boolean_t prop_change = props_changed(propchanges, scratch_pool);
- SVN_ERR(send_summary(b, path,
- text_change ? svn_client_diff_summarize_kind_modified
- : svn_client_diff_summarize_kind_normal,
- props_changed(propchanges, scratch_pool),
- svn_node_file, scratch_pool));
+ if (text_change || prop_change)
+ SVN_ERR(send_summary(b, path,
+ text_change ? svn_client_diff_summarize_kind_modified
+ : svn_client_diff_summarize_kind_normal,
+ prop_change, svn_node_file, scratch_pool));
if (contentstate)
*contentstate = svn_wc_notify_state_inapplicable;
Modified: subversion/branches/fs-py/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_repos/dump.c?rev=1163242&r1=1163241&r2=1163242&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_repos/dump.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_repos/dump.c Tue Aug 30 14:51:33 2011
@@ -385,7 +385,7 @@ dump_node(struct edit_baton *eb,
pool,
_("Referencing data in revision %ld,"
" which is older than the oldest"
- " dumped revision (%ld). Loading this dump"
+ " dumped revision (r%ld). Loading this dump"
" into an empty repository"
" will fail."),
cmp_rev, eb->oldest_dumped_rev);
@@ -489,7 +489,7 @@ dump_node(struct edit_baton *eb,
notify->warning_str = apr_psprintf(
pool,
_("Mergeinfo referencing revision(s) prior "
- "to the oldest dumped revision (%ld). "
+ "to the oldest dumped revision (r%ld). "
"Loading this dump may result in invalid "
"mergeinfo."),
eb->oldest_dumped_rev);
Modified: subversion/branches/fs-py/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/entries.c?rev=1163242&r1=1163241&r2=1163242&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/entries.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/entries.c Tue Aug 30 14:51:33 2011
@@ -896,12 +896,15 @@ read_one_entry(const svn_wc_entry_t **ne
switch (cd->kind)
{
case svn_wc_conflict_kind_text:
- entry->conflict_old = svn_dirent_basename(cd->base_abspath,
- result_pool);
- entry->conflict_new = svn_dirent_basename(cd->their_abspath,
- result_pool);
- entry->conflict_wrk = svn_dirent_basename(cd->my_abspath,
- result_pool);
+ if (cd->base_abspath)
+ entry->conflict_old = svn_dirent_basename(cd->base_abspath,
+ result_pool);
+ if (cd->their_abspath)
+ entry->conflict_new = svn_dirent_basename(cd->their_abspath,
+ result_pool);
+ if (cd->my_abspath)
+ entry->conflict_wrk = svn_dirent_basename(cd->my_abspath,
+ result_pool);
break;
case svn_wc_conflict_kind_property:
entry->prejfile = svn_dirent_basename(cd->their_abspath,
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=1163242&r1=1163241&r2=1163242&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/merge.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/merge.c Tue Aug 30 14:51:33 2011
@@ -1037,7 +1037,7 @@ merge_text_file(svn_skel_t **work_items,
}
if (*merge_outcome == svn_wc_merge_merged)
- return SVN_NO_ERROR;
+ goto done;
}
else if (contains_conflicts && dry_run)
*merge_outcome = svn_wc_merge_conflict;
@@ -1074,6 +1074,7 @@ merge_text_file(svn_skel_t **work_items,
*work_items = svn_wc__wq_merge(*work_items, work_item, result_pool);
}
+done:
/* Remove the tempfile after use */
SVN_ERR(svn_wc__wq_build_file_remove(&work_item,
mt->db, result_target,
Modified: subversion/branches/fs-py/subversion/svn/info-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/svn/info-cmd.c?rev=1163242&r1=1163241&r2=1163242&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/svn/info-cmd.c (original)
+++ subversion/branches/fs-py/subversion/svn/info-cmd.c Tue Aug 30 14:51:33 2011
@@ -471,20 +471,26 @@ print_info(void *baton,
switch (conflict->kind)
{
case svn_wc_conflict_kind_text:
- SVN_ERR(svn_cmdline_printf(pool,
- _("Conflict Previous Base File: %s\n"),
- svn_dirent_local_style(conflict->base_abspath,
- pool)));
-
- SVN_ERR(svn_cmdline_printf(pool,
- _("Conflict Previous Working File: %s\n"),
- svn_dirent_local_style(conflict->my_abspath,
- pool)));
-
- SVN_ERR(svn_cmdline_printf(pool,
- _("Conflict Current Base File: %s\n"),
- svn_dirent_local_style(conflict->their_abspath,
- pool)));
+ if (conflict->base_abspath)
+ SVN_ERR(svn_cmdline_printf(pool,
+ _("Conflict Previous Base File: %s\n"),
+ svn_cl__local_style_skip_ancestor(
+ path_prefix, conflict->base_abspath,
+ pool)));
+
+ if (conflict->my_abspath)
+ SVN_ERR(svn_cmdline_printf(pool,
+ _("Conflict Previous Working File: %s\n"),
+ svn_cl__local_style_skip_ancestor(
+ path_prefix, conflict->my_abspath,
+ pool)));
+
+ if (conflict->their_abspath)
+ SVN_ERR(svn_cmdline_printf(pool,
+ _("Conflict Current Base File: %s\n"),
+ svn_cl__local_style_skip_ancestor(
+ path_prefix, conflict->their_abspath,
+ pool)));
break;
case svn_wc_conflict_kind_property:
Modified: subversion/branches/fs-py/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/svn/main.c?rev=1163242&r1=1163241&r2=1163242&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/svn/main.c (original)
+++ subversion/branches/fs-py/subversion/svn/main.c Tue Aug 30 14:51:33 2011
@@ -1391,7 +1391,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
{ "upgrade", svn_cl__upgrade, {0}, N_
("Upgrade the metadata storage format for a working copy.\n"
- "usage: upgrade WCPATH...\n"
+ "usage: upgrade [WCPATH...]\n"
"\n"
" Local modifications are preserved.\n"),
{ 'q' } },
Modified: subversion/branches/fs-py/subversion/tests/cmdline/authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/tests/cmdline/authz_tests.py?rev=1163242&r1=1163241&r2=1163242&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/tests/cmdline/authz_tests.py (original)
+++ subversion/branches/fs-py/subversion/tests/cmdline/authz_tests.py Tue Aug 30 14:51:33 2011
@@ -1087,7 +1087,7 @@ def authz_recursive_ls(sbox):
@Issue(3781)
@Skip(svntest.main.is_ra_type_file)
def case_sensitive_authz(sbox):
- "authz issue #3781, check case sensitiveness"
+ "authz issue #3781, check case sensitivity"
sbox.build()
Modified: subversion/branches/fs-py/subversion/tests/cmdline/info_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/tests/cmdline/info_tests.py?rev=1163242&r1=1163241&r2=1163242&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/tests/cmdline/info_tests.py (original)
+++ subversion/branches/fs-py/subversion/tests/cmdline/info_tests.py Tue Aug 30 14:51:33 2011
@@ -480,6 +480,43 @@ def info_show_exclude(sbox):
# Expect error on iota (unversioned)
svntest.actions.run_and_verify_svn(None, [], expected_error, 'info', iota)
+@Issue(3998)
+def binary_tree_conflict(sbox):
+ "svn info shouldn't crash on conflict"
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ sbox.simple_propset('svn:mime-type', 'binary/octet-stream', 'iota')
+ sbox.simple_commit()
+
+ iota = sbox.ospath('iota')
+
+ svntest.main.file_write(iota, 'something-else')
+ sbox.simple_commit()
+
+ svntest.main.file_write(iota, 'third')
+
+ expected_output = svntest.wc.State(wc_dir, {
+ 'iota' : Item(status='C '),
+ })
+ expected_status = svntest.wc.State(iota, {
+ '' : Item(status='C ', wc_rev='2')
+ })
+ svntest.actions.run_and_verify_update(iota,
+ expected_output, None, expected_status,
+ None, None, None, None, None, False,
+ iota, '-r', '2')
+
+ expected_info = [{
+ 'Path' : '%s' % re.escape(iota),
+ 'Conflict Previous Base File' : re.escape(iota + '.r3'),
+ 'Conflict Current Base File' : re.escape(iota + '.r2'),
+ }]
+ svntest.actions.run_and_verify_info(expected_info, iota)
+
+
+
+
########################################################################
# Run the tests
@@ -493,6 +530,7 @@ test_list = [ None,
info_multiple_targets,
info_repos_root_url,
info_show_exclude,
+ binary_tree_conflict,
]
if __name__ == '__main__':
Modified: subversion/branches/fs-py/subversion/tests/cmdline/merge_reintegrate_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/tests/cmdline/merge_reintegrate_tests.py?rev=1163242&r1=1163241&r2=1163242&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/tests/cmdline/merge_reintegrate_tests.py (original)
+++ subversion/branches/fs-py/subversion/tests/cmdline/merge_reintegrate_tests.py Tue Aug 30 14:51:33 2011
@@ -2201,7 +2201,6 @@ def two_URL_merge_removes_valid_mergeinf
# Test for issue #3867 'reintegrate merges create mergeinfo for
# non-existent paths'.
@Issue(3867)
-@XFail()
def reintegrate_creates_bogus_mergeinfo(sbox):
"reintegrate creates bogus mergeinfo"
@@ -2230,11 +2229,11 @@ def reintegrate_creates_bogus_mergeinfo(
svntest.main.run_svn(None, "cp", A_path_1, A_COPY_path)
svntest.main.run_svn(None, "ci", "-m", "create a branch", wc_dir)
- # Make a text edit on the branch pushing the repo to rev6
+ # Make a text edit on the branch pushing the repo to r5
svntest.main.file_write(A_COPY_psi_path, "Branch edit.\n")
svntest.main.run_svn(None, "ci", "-m", "branch edit", wc_dir)
- # Sync the A_COPY with A in preparation for reintegrate
+ # Sync the A_COPY with A in preparation for reintegrate and commit as r6.
svntest.main.run_svn(None, "up", wc_dir)
svntest.main.run_svn(None, "merge", sbox.repo_url + "/A", A_COPY_path)
svntest.main.run_svn(None, "ci", "-m", "sync A_COPY with A", wc_dir)
@@ -2243,11 +2242,7 @@ def reintegrate_creates_bogus_mergeinfo(
svntest.main.run_svn(None, "up", wc_dir)
# Reintegrate A_COPY to A. The resulting merginfo on A should be
- # /A_COPY:4-10
- #
- # Currently this test fails because the resulting mergeinfo is /A_COPY:2-6.
- # But A_COPY didn't exist unitl r4, so /A_COPY:2-3 describes merge source
- # path-revs which don't exist.
+ # /A_COPY:4-6
expected_output = wc.State(A_path, {
'D/H/psi' : Item(status='U '),
})
@@ -2393,7 +2388,7 @@ def no_source_subtree_mergeinfo(sbox):
expected_elision = wc.State(os.path.join(wc_dir, 'A', 'B'), {
})
expected_disk = wc.State('', {
- '' : Item(props={SVN_PROP_MERGEINFO : '/A/B2:3-12'}),
+ '' : Item(props={SVN_PROP_MERGEINFO : '/A/B2:4-12'}),
'E' : Item(),
'E/alpha' : Item("AAA\n" +
"BBB\n" +
@@ -2424,7 +2419,6 @@ def no_source_subtree_mergeinfo(sbox):
#----------------------------------------------------------------------
@SkipUnless(server_has_mergeinfo)
@Issue(3961)
-@XFail()
def reintegrate_replaced_source(sbox):
"reintegrate a replaced source branch"
@@ -2516,9 +2510,6 @@ def reintegrate_replaced_source(sbox):
})
expected_status.tweak(wc_rev=12)
expected_disk = wc.State('', {
- # This test currently fails because the resulting mergeinfo is
- # /A_COPY:2-12, even though the changes in A_COPY:9 are *not*
- # present on A.
'' : Item(props={SVN_PROP_MERGEINFO : '/A_COPY:2-8,10-12'}),
'B' : Item(),
'mu' : Item("Branch edit.\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=1163242&r1=1163241&r2=1163242&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/fs-py/subversion/tests/cmdline/merge_tests.py Tue Aug 30 14:51:33 2011
@@ -17026,7 +17026,6 @@ def merged_deletion_causes_tree_conflict
# 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"
@@ -17064,15 +17063,13 @@ def record_only_merge_adds_new_subtree_m
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:
+ # A_COPY_2/D/H/psi with three new property additions:
#
# 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'),
Modified: subversion/branches/fs-py/subversion/tests/svn_test.h
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/tests/svn_test.h?rev=1163242&r1=1163241&r2=1163242&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/tests/svn_test.h (original)
+++ subversion/branches/fs-py/subversion/tests/svn_test.h Tue Aug 30 14:51:33 2011
@@ -53,6 +53,23 @@ extern "C" {
#expr, __FILE__, __LINE__); \
} while (0)
+/** Handy macro for testing an expected svn_error_t return value.
+ * EXPECTED must be a real error (neither SVN_NO_ERROR nor APR_SUCCESS). */
+#define SVN_TEST_ASSERT_ERROR(expr, expected) \
+ do { \
+ svn_error_t *err__ = (expr); \
+ SVN_ERR_ASSERT((expected)); \
+ if (err__ == SVN_NO_ERROR || err__->apr_err != (expected)) \
+ return err__ ? svn_error_createf(SVN_ERR_TEST_FAILED, err__, \
+ "Expected error %d but got %d", \
+ (expected), \
+ err__->apr_err) \
+ : svn_error_createf(SVN_ERR_TEST_FAILED, err__, \
+ "Expected error %d but got %s", \
+ (expected), \
+ "SVN_NO_ERROR"); \
+ } while (0)
+
/** Handy macro for testing string equality.
*/
#define SVN_TEST_STRING_ASSERT(expr, expected_expr) \