[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: export every version of every file

From: Steve Williams <stevewilliams_at_kromestudios.com>
Date: 2006-05-25 04:04:05 CEST

si wrote:

>>I want to do this automatically for approximately 300 MS-Word documents.
>>Some have been checked in 50 times.
>>
>>
>...
>
>
>>How do I do this? (wrap this in a for loop? under MS-Windows?)
>>
>>
>
>You could use a batch file, windows script or NAnt or Ant.
>
>

Here you go.

Copy this into a batch file, then pass it the full URL in the repository
of the file you want.

@echo off
for /f "usebackq tokens=1,2" %%I in (`svn log %1`) do (
  set REV=%%I
  set SEP=%%J
  if "!SEP!" == "|" (
    if "!REV:~0,1!" == "r" svn export -r !REV:~1! %1 %~n1.!REV!.%~x1
  )
)

This will export every revision of the file in the form
filename.revision.extension

-- 
Sly
This message and its attachments may contain legally privileged or confidential information. This message is intended for the use of the individual or entity to which it is addressed. If you are not the addressee indicated in this message, or the employee or agent responsible for delivering the message to the intended recipient, you may not copy or deliver this message or its attachments to anyone. Rather, you should permanently delete this message and its attachments and kindly notify the sender by reply e-mail. Any content of this message and its attachments, which does not relate to the official business of the sending company must be taken not to have been sent or endorsed by the sending company or any of its related entities. No warranty is made that the e-mail or attachment(s) are free from computer virus or other defect.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu May 25 04:05:22 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.