SVNForum.org Forum Index FAQFAQ SearchSearch MemberlistMemberlist RegisterRegister Log inLog in

Download Subversion 1.6.12: Free Subversion TrainingWindows - Free Subversion TrainingCentOS 5 - Free Subversion TrainingRedhat Enterprise Linux 5 - Free Subversion TrainingUbuntu 9/10.04 - Free Subversion TrainingDebian Lenny (5)

Free Subversion Training: Free Subversion TrainingAll About Subversion Hook Scripts Free Subversion TrainingSubversion Locking Free Subversion TrainingAll About Checkouts
 
TortoiseSVN export by command line?

 
Post new topic   Reply to topic    SVNForum.org Forum Index -> Windows
View previous topic :: View next topic  
Author Message
cking



Joined: 28 Oct 2005
Posts: 2

PostPosted: Fri Oct 28, 2005 9:39 am    Post subject: TortoiseSVN export by command line? Reply with quote

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
View user's profile Send private message
szabgab



Joined: 12 Jul 2005
Posts: 91
Location: Modiin

PostPosted: Tue Nov 01, 2005 11:29 am    Post subject: Re: TortoiseSVN export by command line? Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address
cking



Joined: 28 Oct 2005
Posts: 2

PostPosted: Tue Nov 01, 2005 4:55 pm    Post subject: Reply with quote

Smile Point well-taken.

I'll try it with the plain version of SVN.

Thanks.
Back to top
View user's profile Send private message
TheCatcher



Joined: 09 Jan 2007
Posts: 1

PostPosted: Tue Jan 09, 2007 4:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
Matte



Joined: 17 Jan 2007
Posts: 2

PostPosted: Wed Jan 17, 2007 6:25 am    Post subject: Reply with quote

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
View user's profile Send private message
Matte



Joined: 17 Jan 2007
Posts: 2

PostPosted: Wed Jan 17, 2007 6:26 am    Post subject: Reply with quote

Right.. Just saw TheCatcher's comments. It requires clicking OK to each dialog, so wont work for unattended automation..
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Post new topic   Reply to topic    SVNForum.org Forum Index -> Windows All times are GMT - 4 Hours
Page 1 of 1
Display posts from previous:   
Google
 
Web SVNForum.org