You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2010/07/28 15:03:24 UTC
svn commit: r980045 - in /subversion/trunk/subversion: libsvn_client/patch.c
svn/notify.c tests/cmdline/patch_tests.py
Author: dannas
Date: Wed Jul 28 13:03:23 2010
New Revision: 980045
URL: http://svn.apache.org/viewvc?rev=980045&view=rev
Log:
Start notifying about prop changes in the 'svn patch' code.
With this change, we're making a notification for every path that has
prop changes. BUT, we don't yet check for rejected prop hunks so every
path that the patch says has property changes will be reported as updated.
The correct behaviour will be implemented one step at a time.
* subversion/tests/cmdline/patch_tests.py
(test_list): Remove XFail marker for patch_with_properties().
* subversion/svn/notify.c
(notify): Print a ' U' char for updated properties.
* subversion/libsvn_client/patch.c
(send_patch_notification): Check if there are changes to
props or files before setting content_state.
Modified:
subversion/trunk/subversion/libsvn_client/patch.c
subversion/trunk/subversion/svn/notify.c
subversion/trunk/subversion/tests/cmdline/patch_tests.py
Modified: subversion/trunk/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/patch.c?rev=980045&r1=980044&r2=980045&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/patch.c (original)
+++ subversion/trunk/subversion/libsvn_client/patch.c Wed Jul 28 13:03:23 2010
@@ -1447,8 +1447,14 @@ send_patch_notification(const patch_targ
notify->content_state = svn_wc_notify_state_conflicted;
else if (target->local_mods)
notify->content_state = svn_wc_notify_state_merged;
- else
+ else if (target->has_text_changes)
notify->content_state = svn_wc_notify_state_changed;
+
+ /* ### We need to decide on how we want prop notifications to work.
+ * ### At the moment we're not reporting rejects and what about added
+ * paths with props and paths scheduled for deletion? */
+ if (target->has_prop_changes)
+ notify->prop_state = svn_wc_notify_state_changed;
}
(*ctx->notify_func2)(ctx->notify_baton2, notify, pool);
Modified: subversion/trunk/subversion/svn/notify.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/notify.c?rev=980045&r1=980044&r2=980045&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/notify.c (original)
+++ subversion/trunk/subversion/svn/notify.c Wed Jul 28 13:03:23 2010
@@ -274,7 +274,10 @@ notify(void *baton, const svn_wc_notify_
statchar_buf[0] = 'U';
}
- if (statchar_buf[0] != ' ')
+ if (n->prop_state == svn_wc_notify_state_changed)
+ statchar_buf[1] = 'U';
+
+ if (statchar_buf[0] != ' ' || statchar_buf[1] != ' ')
{
if ((err = svn_cmdline_printf(pool, "%s %s\n",
statchar_buf, path_local)))
Modified: subversion/trunk/subversion/tests/cmdline/patch_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/patch_tests.py?rev=980045&r1=980044&r2=980045&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/patch_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/patch_tests.py Wed Jul 28 13:03:23 2010
@@ -2549,7 +2549,7 @@ test_list = [ None,
patch_with_ignore_whitespace,
patch_replace_locally_deleted_file,
patch_no_eol_at_eof,
- XFail(patch_with_properties),
+ patch_with_properties,
patch_same_twice,
XFail(patch_dir_properties),
]