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/06/06 21:14:36 UTC
svn commit: r1833089 - in /subversion/trunk/subversion:
libsvn_client/shelf.c tests/cmdline/shelf_tests.py
Author: julianfoad
Date: Wed Jun 6 21:14:36 2018
New Revision: 1833089
URL: http://svn.apache.org/viewvc?rev=1833089&view=rev
Log:
Shelving: Refuse to shelve a 'copied' state, as it isn't yet supported.
* subversion/libsvn_client/shelf.c
(write_changes_visitor): Refuse a 'copied' state.
* subversion/tests/cmdline/shelf_tests.py
(shelve_file_copy,
shelve_dir_copy): New tests.
(test_list): Run them.
Modified:
subversion/trunk/subversion/libsvn_client/shelf.c
subversion/trunk/subversion/tests/cmdline/shelf_tests.py
Modified: subversion/trunk/subversion/libsvn_client/shelf.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/shelf.c?rev=1833089&r1=1833088&r2=1833089&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/shelf.c (original)
+++ subversion/trunk/subversion/libsvn_client/shelf.c Wed Jun 6 21:14:36 2018
@@ -941,7 +941,8 @@ write_changes_visitor(void *baton,
case svn_wc_status_deleted:
case svn_wc_status_added:
case svn_wc_status_replaced:
- if (status->kind != svn_node_file)
+ if (status->kind != svn_node_file
+ || status->copied)
{
SVN_ERR(note_shelved(wb->unshelvable, wc_relpath, wb->pool));
break;
Modified: subversion/trunk/subversion/tests/cmdline/shelf_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/shelf_tests.py?rev=1833089&r1=1833088&r2=1833089&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/shelf_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/shelf_tests.py Wed Jun 6 21:14:36 2018
@@ -519,6 +519,32 @@ def shelve_replace_dir(sbox):
shelve_unshelve(sbox, modifier, cannot_shelve=True)
+#----------------------------------------------------------------------
+
+def shelve_file_copy(sbox):
+ "shelve file copy"
+
+ sbox.build()
+
+ def modifier(sbox):
+ sbox.simple_copy('iota', 'A/ii')
+ sbox.simple_propset('p', 'v', 'A/ii')
+
+ shelve_unshelve(sbox, modifier, cannot_shelve=True)
+
+#----------------------------------------------------------------------
+
+def shelve_dir_copy(sbox):
+ "shelve dir copy"
+
+ sbox.build()
+
+ def modifier(sbox):
+ sbox.simple_copy('A/B', 'BB')
+ sbox.simple_propset('p', 'v', 'BB')
+
+ shelve_unshelve(sbox, modifier, cannot_shelve=True)
+
########################################################################
# Run the tests
@@ -545,6 +571,8 @@ test_list = [ None,
shelve_mkdir,
shelve_rmdir,
shelve_replace_dir,
+ shelve_file_copy,
+ shelve_dir_copy,
]
if __name__ == '__main__':