1

I'm having some trouble cherrypicking some folders out of a repo using SharpSvn (from C#). I did this:

client.CheckOut( uri, dir, new SvnCheckOutArgs() { Depth = SvnDepth.Empty } );
foreach( var folder in folders )
{
   client.Update( folder );
}

But my second call to Update didn't work. It reports that the action was SvnNotifyAction.Skip and nothing gets written to the working copy.

uri is essentially something like: svn://myserver/myrepo/mysdk and dir is something like C:\Test\mysdk. (I've changed exact names for the purposes of this question, but structurally it's identical.)

Then the 1st folder is C:\Test\mysdk\include (this works)

Then the 2nd folder is C:\Test\mysdk\bin\v100\x86 (this one doesn't update)

Why would the first one work but when I get the 2nd folder (nested subfolders) it doesn't Update? It reports that it is skipped? But I don't know how to figure out why.

Wyck
  • 10,311
  • 6
  • 39
  • 60

1 Answers1

3

It turns out that updating the nested subdirectory doesn't work because the parent directories don't exist yet and so the nested subdirectory update is skipped. To fix this, I needed to add an argument to Update to indicate that it should create the parent directories.

(The equivalent svn command line option would be --parents).

client.Update( folder, new SvnUpdateArgs() { UpdateParents = true } );

I discovered this by trying to do it manually from the svn command line (and encountered the same problem.) svn help co offered this tiny clue: --parents : make intermediate directories I'm assuming that UpdateParents and --parents are equivalent. So far so good.

Wyck
  • 10,311
  • 6
  • 39
  • 60