Unable to create directory

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

Unable to create directory

by svncheeta :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

svnkit_directoryIssue.txt

Hi,
      I have created a repository using svnkit and now I want to create a directory within this repository but I am unable to do it. The code is exactly the same which is given in examples here:

            String tgtPath = "C:/repos/root/path";
            tgtURL = SVNRepositoryFactory.createLocalRepository(new File(tgtPath), true, true);
            url2 = SVNURL.parseURIEncoded("file:///c:/repos/root/path/project1");
            svnCommitInfo = makeDirectory(url2, "commiting the directory");
 

    private static SVNCommitInfo makeDirectory(SVNURL url, String commitMessage) throws SVNException {
        SVNCommitClient svnCommitClient=ourClientManager.getCommitClient();
        SVNCommitInfo svnCommitInfo= svnCommitClient.doMkDir(new SVNURL[]{url}, commitMessage);
        return svnCommitInfo;
    }

The whole code file is also attached to this message. Kindly help me in this regard as I really need to have it done asap. Many Thanks

Re: Unable to create directory

by svncheeta :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ok, i have put the makeDirectory method in try/catch block, and its giving the following error:

svn: Unable to open an ra_local session to URL

"
svncheeta wrote:
svnkit_directoryIssue.txt

Hi,
      I have created a repository using svnkit and now I want to create a directory within this repository but I am unable to do it. The code is exactly the same which is given in examples here:

            String tgtPath = "C:/repos/root/path";
            tgtURL = SVNRepositoryFactory.createLocalRepository(new File(tgtPath), true, true);
            url2 = SVNURL.parseURIEncoded("file:///c:/repos/root/path/project1");
            svnCommitInfo = makeDirectory(url2, "commiting the directory");
 

    private static SVNCommitInfo makeDirectory(SVNURL url, String commitMessage) throws SVNException {
        SVNCommitClient svnCommitClient=ourClientManager.getCommitClient();
        SVNCommitInfo svnCommitInfo= svnCommitClient.doMkDir(new SVNURL[]{url}, commitMessage);
        return svnCommitInfo;
    }

The whole code file is also attached to this message.
"

Re: Unable to create directory

by Alexander Kitaev-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

Did you initialize SVNKit library? Before using SVNKit you have to make
the following calls (once in runtime):

SVNRepositoryFactoryImpl.setup();
FSRepositoryFactory.setup();
DAVRepositoryFactory().setup();

This will initialize SVNKit to work on svn, file and http(s) protocols
respectively.

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

svncheeta wrote:

> Ok, i have put the makeDirectory method in try/catch block, and its giving
> the following error:
>
> svn: Unable to open an ra_local session to URL
>
> "
>
> svncheeta wrote:
>>  http://www.nabble.com/file/p18561728/svnkit_directoryIssue.txt
>> svnkit_directoryIssue.txt
>>
>> Hi,
>>       I have created a repository using svnkit and now I want to create a
>> directory within this repository but I am unable to do it. The code is
>> exactly the same which is given in examples here:
>>
>>             String tgtPath = "C:/repos/root/path";
>>             tgtURL = SVNRepositoryFactory.createLocalRepository(new
>> File(tgtPath), true, true);
>>             url2 =
>> SVNURL.parseURIEncoded("file:///c:/repos/root/path/project1");
>>             svnCommitInfo = makeDirectory(url2, "commiting the
>> directory");
>>  
>>
>>     private static SVNCommitInfo makeDirectory(SVNURL url, String
>> commitMessage) throws SVNException {
>>         SVNCommitClient
>> svnCommitClient=ourClientManager.getCommitClient();
>>         SVNCommitInfo svnCommitInfo= svnCommitClient.doMkDir(new
>> SVNURL[]{url}, commitMessage);
>>         return svnCommitInfo;
>>     }
>>
>> The whole code file is also attached to this message.
>>
> "

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

LightInTheBox - Buy quality products at wholesale price