2

I'm iterating over the svn revisions from sourceRevision to targetRevision. In each iteration, I wish to update my repository to the revision I'm current in.

Something like:

SvnClient svnClient = new SvnClient();

svnClient.Update ("C:\Svn", 26592);

Any ideas?

Bert Huijben
  • 19,525
  • 4
  • 57
  • 73
Idanis
  • 1,918
  • 6
  • 38
  • 69

1 Answers1

3

You were on the right track. The revision number can be passed in via the SvnUpdateArgs object:

SvnUpdateResult result;
SvnUpdateArgs args = new SvnUpdateArgs();

// If args.Revision is not set, it defaults to fetch the HEAD revision.
if (revision > 0)
{
    args.Revision = revision;
}

// Perform the update
using (SvnClient client = GetClient())
{
    client.Update(localPath, args, out result);
}