sharpsvn: Creating a file remotely

786 Views Asked by At

Is there any way to create a file using sharpsvn remotely? I mean without using a file system.

2

There are 2 best solutions below

0
On BEST ANSWER

You can't do this without a file system. It is however possible to do this using the SvnClient.Import call, which corresponds to the svn import command. This does need the filesystem, but doesn't require you to create a working copy.

0
On

This is not straightforward. However you can use a trick like this. For directories you can use client.RemoteCreateDirectory(uri) which is exactly what you want. For files, first keep the files you want to create in a remote directory (not the best solution though), then call client.RemoteCopy() method. However there is no straightforward method to upload a file, lets say from a stream.