Babak
Babak

Reputation: 3976

SharpSVN and new/modified files in a revision

How is it possible to get list of all files (path/name only) which has been added or modified in a specific revision?

Upvotes: 3

Views: 1772

Answers (1)

Sander Rijken
Sander Rijken

Reputation: 21615

You can use SvnClient.Log() for that. Just make sure that it retrieves only a single revision by specifying a narror revision range like you see in the code below

using (SvnClient client = new SvnClient())
{
    client.Log(
        reposUri,
        new SvnLogArgs {Range = new SvnRevisionRange(9999, 9999)},
        (o, e) =>
            {
                foreach (SvnChangeItem changeItem in e.ChangedPaths)
                {
                    Console.WriteLine(
                        string.Format(
                            "{0} {1} {2} {3}",
                            changeItem.Action,
                            changeItem.Path,
                            changeItem.CopyFromRevision,
                            changeItem.CopyFromPath));
                }
            });
}

Upvotes: 5

Related Questions