-2

I want to use PowerShell to download files from SVN to my local drive, and then check-in these files to another branch. It should check for any files that have been deleted/inserted/updated, and should do that for the target branch as well.

henrycarteruk
  • 12,708
  • 2
  • 36
  • 40
I bex
  • 31
  • 1
  • 9
  • 4
    Stack Overflow is not a code writing service, it's expected that you attempt to code this yourself. I would suggest you do some research on your issue (maybe try the search box at the top of the page) and make an attempt at writing some code yourself. If/when you come across any issues with your code ask again and explain what you have tried, and why it did not work for you. See [How to Ask](http://stackoverflow.com/questions/how-to-ask) for help with asking a great question. – henrycarteruk Dec 21 '16 at 12:13
  • you should use [ant](http://subclipse.tigris.org/svnant.html) and this [so](http://stackoverflow.com/questions/2400893/how-to-checkout-from-svn-with-an-ant-task) explain how to check out from svn – Moudiz Dec 21 '16 at 12:19
  • 2
    What's stopping you from doing this? – alroc Dec 21 '16 at 13:53
  • Thanks for your suggestions, done it using batch script – I bex Dec 21 '16 at 16:30
  • 1
    @Ibex, If you've done it, answer your own question to share with the community. Someone may need something similar and your answer may be useful. – Tom Dec 22 '16 at 10:32

1 Answers1

1

Here's how I did it

firstly copy contents from any view to path C:\temp\WebSiteContent_sync and then run commands below to update/delete/insert contents

Note:- copy contents from any view is straight forward. Simply checkout the view and then run robocopy command to copy contents to C:\temp\WebSiteContent_sync and then run commands below

cd C:\Program Files\TortoiseSVN\bin\

svn cleanup C:\temp\WebSiteContent_sync

svn add --force C:\temp\WebSiteContent_sync

svn cleanup C:\temp\WebSiteContent_sync

cd C:\temp\WebSiteContent_sync

svn status | findstr /R "^!" > missing.list for /F "tokens=2 delims= " %%A in (missing.list) do (svn delete %%A)

svn cleanup C:\temp\WebSiteContent_sync

svn commit -m "copy contents" C:\temp\WebSiteContent_sync

I bex
  • 31
  • 1
  • 9