0

I'm trying to programmatically connect to SVN using SharpSvn.

Is it possible to determine if the local folder (path) I want to bind to SVN is already bound?

The reason I ask is becuase I only want to do a CheckOut when the local path has not been bound and if it has then I want to do an Update.

I tried GetInfo but couldn't distinguish between them.

AwkwardCoder
  • 24,893
  • 27
  • 82
  • 152

1 Answers1

0

If you are sure that you're using the same url you can actually just call .CheckOut() on the same path again, as that will perform an update. (This is to allow .CheckOut to be restartable after failing)

The other option would really be .Info() (handling or suppressing errors) or one of the specific functions like TryGetRepository(), or GetWorkingCopyRoot() that return null on failure.

Bert Huijben
  • 19,525
  • 4
  • 57
  • 73