SVN import and make it working copy as well - by API ?

View: New views
3 Messages — Rating Filter:   Alert me  

SVN import and make it working copy as well - by API ?

by Jozsef :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi guys

I have a task to do with SVN something as the following:
-There is a directory what should be imported into SVN and at the same time it should become a working copy.
-Import goes well, and then I call a checkout to the same directory - it gives "Failed to add directory ''META-INF'': object of the same name already exists...155000: Obstructed update" SVNException message. -Because what SVN API wanted to check out, that directory already exists.
-A possible solution could be like : first: import to SVN; second: delete the directory; third: checkout back there --- but these working copies could be quite huge and these are 'deployed' tomcat webapps directly - so unnecessary filemanagements should be avoided.
-I ask this, because somehow Eclipse does this; for instance when I use the "Import a project to SVN" - it does this somehow: it becomes a working copy as well 'automatically'...

I use the SVNCommitClient.doImport and SVNUpdateClient.doCheckout methods, and before going deeply into the API's source, I wanted to ask it here:

-Is here something what could be handy for me at this case? Or simply I just did not find what I needed to?

thanks a lot
Jozsef

Re: SVN import and make it working copy as well - by API ?

by Alexander Kitaev-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Jozsef,

Could you please try setting doCheckout method's
allowUnversionedObstructions parameter to "true"?

This is the same as using --force option for command line checkout command.

Alexander Kitaev,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!
http://sqljet.com/ - Java SQLite Library!

Jozsef wrote:

> Hi guys
>
> I have a task to do with SVN something as the following:
> -There is a directory what should be imported into SVN and at the same time
> it should become a working copy.
> -Import goes well, and then I call a checkout to the same directory - it
> gives "Failed to add directory ''META-INF'': object of the same name already
> exists...155000: Obstructed update" SVNException message. -Because what SVN
> API wanted to check out, that directory already exists.
> -A possible solution could be like : first: import to SVN; second: delete
> the directory; third: checkout back there --- but these working copies could
> be quite huge and these are 'deployed' tomcat webapps directly - so
> unnecessary filemanagements should be avoided.
> -I ask this, because somehow Eclipse does this; for instance when I use the
> "Import a project to SVN" - it does this somehow: it becomes a working copy
> as well 'automatically'...
>
> I use the SVNCommitClient.doImport and SVNUpdateClient.doCheckout methods,
> and before going deeply into the API's source, I wanted to ask it here:
>
> -Is here something what could be handy for me at this case? Or simply I just
> did not find what I needed to?
>
> thanks a lot
> Jozsef

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


Re: SVN import and make it working copy as well - by API ?

by Jozsef :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Alexander!

Thank your for the quick reply - after I came back from holiday, just tried your suggestion...

I was using version 1.1.0 and that's why I did not see that parameter - but with 1.3 and with that parameter --  it works fine!

thanks for your support:
Jozsef

Alexander Kitaev-3 wrote:
Could you please try setting doCheckout method's
allowUnversionedObstructions parameter to "true"?