| View previous topic :: View next topic |
| Author |
Message |
cking
Joined: 28 Oct 2005 Posts: 2
|
Posted: Fri Oct 28, 2005 9:39 am Post subject: TortoiseSVN export by command line? |
|
|
I'm trying to export my SVN directory to another directory with a script, so that I can assign it to a macro in Crimson Editor.
This is what I have:
"C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:export /path:"c:\Workspace\project\trunk\" /url:"c:\Temp\" /notempfile /closeonend:1
When I run that, I get the dialog box asking where I want to export to. I'd love to automate that.
I've tried "/url:" and "/exportpath:" and even another "/path:"
Is there some way to set the export path in the command line for TortoiseSVN?
Thanks. |
|
| Back to top |
|
szabgab
Joined: 12 Jul 2005 Posts: 91 Location: Modiin
|
Posted: Tue Nov 01, 2005 11:29 am Post subject: Re: TortoiseSVN export by command line? |
|
|
| cking wrote: |
Is there some way to set the export path in the command line for TortoiseSVN?
|
Why would you want to use TortoiseSVN for command line operations?
You can install the standard SVN client on Windows with it superb command line interface.
Gabor _________________ Gabor Szabo
http://www.szabgab.com/subversion.html |
|
| Back to top |
|
cking
Joined: 28 Oct 2005 Posts: 2
|
Posted: Tue Nov 01, 2005 4:55 pm Post subject: |
|
|
Point well-taken.
I'll try it with the plain version of SVN.
Thanks. |
|
| Back to top |
|
TheCatcher
Joined: 09 Jan 2007 Posts: 1
|
Posted: Tue Jan 09, 2007 4:37 pm Post subject: |
|
|
The documentation for the SVN export command says it only exports the versioned files. TortoiseSVN's export command can be used to export all files. Sometimes you need to export all the files, not just the versioned files.
i.e: A resultant directory that also contains static 3rd party redistributables, that aren't included in the SVN. Or that contains log files that change too often to bother adding them to the SVN.
My requirement was to automatically create a zip file with each days progress and have it sent to a testing center. I didn't want to include any of the .SVN files in the zip file.
The TortoiseProc export command would have been perfect, but since it offers no way to be used from an unattended batch file (it always pops a dialog box). I couldn't easily use it (without writing software to answer the dialog box prompts).
The solution I came up with, is to use the Window's XCopy command, with the /EXCLUDE switch.
The /EXCLUDE switch requires a file (or files) containing strings. If the XCopy command encounters a file or directory name that contains one of the strings from the /EXCLUDE switch file(s), it will skip the file or directory.
To copy my resultant directory I did the following:
1. I created a text file called C:\No.SVN.txt, with only one line, ".svn" in it.
2. I had the nightly batch file use an XCopy command like this one to do the export.
| Code: |
XCopy C:\VersionedFolder C:\UnVersionedFolder /EXCLUDE:C:\No.SVN.txt /E /C /I /F /R /Y
|
This copies all the files and folders from C:\VersionedFolder to C:\UnVersionedFolder, except the .svn folders or any files with a .svn extension.
3. I zipped up and sent out the C:\UnVersionedFolder.
4. Then I used Window's RMDir command to delete C:\UnVersionedFolder.
| Code: |
RMDir /S /Q C:\UnVersionedFolder
|
Hopefully others will find this useful. |
|
| Back to top |
|
Matte
Joined: 17 Jan 2007 Posts: 2
|
Posted: Wed Jan 17, 2007 6:25 am Post subject: |
|
|
I wanted to do this too.
This worked for checkout:
cd C:\Program Files\TortoiseSVN\bin
TortoiseProc.exe /command:checkout /url:"<<your repository url>>" /path:"<<your working copy path>>" /closeonend:1 /notempfile
Most other commands are possible too , see tortoise help: mk:@MSITStore:C:\Program%20Files\TortoiseSVN\bin\TortoiseSVN_en.chm::/tsvn-automation.html |
|
| Back to top |
|
Matte
Joined: 17 Jan 2007 Posts: 2
|
Posted: Wed Jan 17, 2007 6:26 am Post subject: |
|
|
| Right.. Just saw TheCatcher's comments. It requires clicking OK to each dialog, so wont work for unattended automation.. |
|
| Back to top |
|
|
View previous topic :: View next topic |