18

For my project I would like to export only the changed/added files since last update (those marked with red exclamation or plus sign) using tortoise svn, however I can't seem to find the right combination to do this simple task.

What I do now is do xcopy with specified modified date, however it misses some files which were simply added to a folder and not modified. Since I can get a list of changes, I don't see any way to simply export these files to a deploy directory.

kiev
  • 1,920
  • 9
  • 30
  • 49

6 Answers6

25

Check-for-modifications dialog, sort by status. Shift-Click or Ctrl-Click to select all those with "modified" and "added" status. Then simply right-drag the files from the Check-for-modifications dialog to another folder in explorer.

Another way (if you already committed your changes): Show log dialog, select all revisions with the interesting changes. In the lower pane, shift-select all entries, right-click, choose "save as".

Yet another way: Use the repository browser, find the first url (assuming you want to export everything that's changed between two tags, e.g., version 1 and version 2), right-click, "Mark for comparison". Find the second url, right-click, "compare urls". In the following "changed files" dialog, select all files, right-click, choose "export selection to...".

Stefan
  • 42,026
  • 10
  • 73
  • 116
10

From the TortoiseSVN daily use guide:

Another way to export from a working copy is to right drag the working copy folder to another location and choose ... Context Menu → SVN Export changed items here ... The third option exports only modified items, but maintains the folder structure.

Sepster
  • 4,613
  • 16
  • 38
  • 2
    Fastest way to do this. Great! – Andreas Mar 16 '15 at 11:27
  • Maintaining the folder structure is GREAT if you want to paste the exported files somewhere else, great answer! – avalancha Jun 22 '17 at 09:23
  • This is really convenient. It's worth noting that, in order to export new files, they should be added to SVN before dragging (i.e. only "changed" and "added" files will be exported, as already mentioned in the chosen answer). – Emanuele Bellini Feb 13 '19 at 08:03
  • @EmanueleBellini yes that's true. IMO it would be counter-intuitive if files that were "new" (ie not actually added to SVN yet) were included in an "SVN Export". – Sepster Feb 25 '19 at 05:33
2

In the check for modification dialog, select all files you want to export and then right click and select export.

This is a better solution, specially if you want to export files in subdirectories. (The drag option from check for modification will flatten the directory structure).

profaisal
  • 47
  • 5
  • Do you know what version of TortoiseSVN that this context menu option was added? I right click and do not have the export option in this modifications dialog (version 1.7.10.23359, svn 1.7.7) – Ash Clarke Oct 27 '14 at 11:03
0

That's not a built-in feature of Tortoise. You could probably whip up a script in powershell that would parse the output of 'svn st' and copy the files though.

Tom Ritter
  • 94,954
  • 29
  • 130
  • 168
0

Your best bet might be to use svn status, then grep on the file codes to determine what files to copy.

see http://svnbook.red-bean.com/en/1.0/re26.html.

Steve
  • 45,586
  • 30
  • 89
  • 135
0

Another option.

Lets say that you last deployed your application from repository version #85. After a few weeks of development, the repository is now up to revision #178.

  1. Using TortoiseSVN, right-click on your working folder and select “Show Log” from the TortoiseSVN menu.
  2. Click the revision that was last published (#85 in this example) Ctrl+Click the HEAD revision (or whatever revision you want to release ie #178) so that both the old and the new revisions are highlighted.
  3. Right-click on either of the highlighted revisions and select “Compare revisions.” This will open a dialog window that lists all new/modified files.
  4. Select all files from this list (Ctrl+a) then right-click on the highlighted files and select “Export selection to…”
  5. You’ll be prompted for a location to save your updated files and SVN will export them all with the directory structure preserved. You can then zip this up for your client, transfer it to your host or whatever you normally do to deploy the application.

From Here

J Santosh
  • 3,578
  • 1
  • 21
  • 40