Copy SVN modified files, including the directory, to another directory

I have a list of files in the current working copy that have been modified locally. Changed about 50 files.

I use the following command to copy files that have been changed in subversion to a folder called / backup. Is there a way to do this, but maintain the directories in which they are located? Thus, it will do something similar to export SVN diff files. For example, if I changed the file with the name /usr/lib/SPL/RFC.php, it would also copy the directory usr/lib/SPL.

cp `svn st | ack '^M' | cut -b 8-` backup
+3
source share
2 answers

It looks weird, but it’s very easy to copy files using tar. For instance.

tar -cf - $( svn st | ack '^M' | cut -b 8- ) |
tar -C /backup -xf -
+6
source

? , , , - - 2012-05-28-17-30-00-UnitTestChanges.patch, .

, , .

FYI: Subversion 1.8 checkpointing/shelving ( , , , ), Subversion 1.9.

+1

All Articles