How can I export changed files in SVN that have changed between two revisions. I need a solution either via command line or by using any scripts (with proper folder structure).
As far as I know, svn does not provide such a feature. But you may write a simple c# program using SharpSVN to do it. Here is a sample that you can use. In this sample, I am getting the whole changed file from revision 100 to 200.
using SharpSvn;
using System.IO;
using System.Collections.ObjectModel;
using Microsoft.VisualBasic;
namespace SvnDiffExporter
{
class Program
{
static void Main(string[] args)
{
SvnClient client = new SvnClient();
SvnRevisionRange range = new SvnRevisionRange(100, 200);
MemoryStream result = new MemoryStream();
Collection items;
SvnLogArgs logargs = new SvnLogArgs(range);
client.GetLog(@"e:\Artifacts", logargs, out items);
int i = 0;
string [] path = new string[255];
foreach (SvnLogEventArgs ar in items)
{
foreach (SvnChangeItem changeitem in ar.ChangedPaths)
{
if (changeitem.Action != SvnChangeAction.Delete)
{
path[i] = changeitem.Path;
i++;
}
}
}
string localpath = @"c:\data";
foreach (string str in path)
client.Export(str, localpath);
}
}
}