Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to save modifications in SVN working copy to a zip file

I am using svn and on occasion I need to revert some changes that are not going well. I would like to make a zip of the changed files first. I would like the zip to have full paths. I am using TortoiseSVN for the most part, but I am not afraid to use a command line if need be.

like image 996
Matthew Nichols Avatar asked May 11 '12 21:05

Matthew Nichols


People also ask

How do I make a working copy in TortoiseSVN?

Right click on the checked out folder, then use TortoiseSVN → Repo-Browser to bring up the repository browser. Find the sub-folder you would like to add to your working copy, then use Context Menu → Update item to revision....

What is working copy in svn?

Working copies A Subversion working copy is your own private working area, which looks like any other ordinary directory on your system. It contains a COPY of those files which you will have been editing on the website. You can edit these files however you wish, in the usual way.

How do I find my svn working copy?

The working copy will be located in a directory called trunk on your computer relative to the directory you issued the command in. If you wish to have a different name for your working copy you can add that as a parameter to the end of the command. e.g. This will create a working copy called MyProjectSource .


2 Answers

You can just use a simple bash one-liner (provided that you are a Linux happy user):

zip ~/modified.zip $(svn status | grep ^M | awk '{ print $2;}')

This extracts all files with the status of M so Modified.

like image 96
warden Avatar answered Nov 09 '22 15:11

warden


In the TourtoiseSVN Check for Modifications dialog

  • select the files you want
  • right click
  • then shell context menu to send them to 7zip
like image 22
Boscabouter Avatar answered Nov 09 '22 14:11

Boscabouter