« Return to Thread: Adding files and directory recursively via low-level api

Adding files and directory recursively via low-level api

by Stephane Bailliez-3 :: Rate this Message:

Reply to Author | View in Thread

hello,

I just spent a few hours with the API and I fail to find a decent
solution that would not require massive amount of plumbing...
I went over the wiki but cannot find anything remotely close to my
problems. I'm trying to port some code that is doing multiple commits of
files and directories (basically each addDir and addFile has its own
associated commit) into a single unique one.

I have a list of files and path that I need to add to a repository base url.
Each file may be in a path that may or may not be already in the repository.

So I may have repository url https://svn.me.com/repos/project/module
and a list of files to add to this directory such as:
this/is/path/1/file.txt
this/is/path/1/a/a.txt
this/is/path/1/b/b.txt

(and I need to have everything in a single transaction)

So when looking at the API, I cannot see any decent way to actually do
while being already in a transaction (CommitEditor) as it just breaks if
a directory/file is already there. It does not allow me to check if
something is already added...I have to keep a hashmap of nodes and more
or less duplicate what is already done within DAVCommitEditor. Is this
correct ?

Now 2nd question. It is possible that one or more of this path is
already existing on the remote repository. What is the most appropriate
way to do it within an open commiteditor ? Is duplicating a repository
instance and checking each node the way to go or is there something that
already exists to simplify this work ?

cheers

-- stephane

---------------------------------------------------------------------
To unsubscribe, e-mail: svnkit-users-unsubscribe@...
For additional commands, e-mail: svnkit-users-help@...

 « Return to Thread: Adding files and directory recursively via low-level api

LightInTheBox - Buy quality products at wholesale price