export changed files using tortoise svn to another directory

有些话、适合烂在心里 提交于 2019-12-03 11:19:25

问题


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.


回答1:


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...".




回答2:


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.




回答3:


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).




回答4:


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.




回答5:


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.




回答6:


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



来源:https://stackoverflow.com/questions/2110961/export-changed-files-using-tortoise-svn-to-another-directory

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!