Hello,
From the first glance, the code is correct (though 'repository' object is 
redundant here --- it 
creates an additional connection). Is it possible for you to test the code in 
pure Java without 
platform restrictions and when it works --- port to XPages?

If the code throws an exception, please send its stack trace.

If this is impossible for you, add

final SVNDirEntry entry = repository.info("SMS/trunk/ADF/deploy/blah.war", -1);
if (entry == null) {
     //no entry is found, I expect we won't get here
     print("Can't find entry");     
}

to make sure you have enough permissions to access the repository in the code.

--
Dmitry Pavlenko,
TMate Software,
http://subgit.com/ - git-svn bridge

> Thanks Dmitri,
> 
> I haven't had a chance to look at this with Christmas coming and going, but
> I'm back at work and still having problems.  I wonder if I could ask for
> further help?
> 
> I modified my code to use the SvnOperationFactory methods, but I'm running
> into the same issue.  I'm calling the methods using IBM XPages, which
> allows you to invoke java classes from server-side javascript (a little
> obscure, I know, but it works), so the syntax is a little different, but I
> can verify that the classes are working.  Here's my code:
> 
> importPackage(org.tmatesoft.svn.core);
> importPackage(org.tmatesoft.svn.core.io);
> importPackage(org.tmatesoft.svn.core.auth);
> importPackage(org.tmatesoft.svn.core.wc);
> importPackage(org.tmatesoft.svn.core.internal.io.svn);
> importPackage(org.tmatesoft.svn.core.wc2);
> importPackage(java.io);
> 
> SVNRepositoryFactoryImpl.setup();
> 
> var url = "svn://server/Repos";
> var repository:SVNRepository =
> SVNRepositoryFactory.create(SVNURL.parseURIDecoded(url));
> var authManager:ISVNAuthenticationManager =
> SVNWCUtil.createDefaultAuthenticationManager("user", "pass");
> 
> repository.setAuthenticationManager(authManager);
> 
> var svnOperationFactory:SvnOperationFactory = new SvnOperationFactory();
> svnOperationFactory.setAuthenticationManager(authManager);
> 
> var srcFile = "svn://server/Repos/SMS/trunk/ADF/deploy/blah.war";
> var srcURL:SVNURL = SVNURL.parseURIEncoded(srcFile);
> var destFile:File = new File("c:/Temp/blah.war");
> 
> try {
>       var theExport:SvnExport = svnOperationFactory.createExport();
>       theExport.setSource(SvnTarget.fromURL(srcURL));
>         theExport.setSingleTarget(SvnTarget.fromFile(destFile));
>         theExport.setForce(true); //overwrite an existing file
> 
> //the code gets to here successfully, and breaks without any useful errors
> on the next line
> 
>         var willitwork = theExport.run();
> 
>         svnOperationFactory.dispose(); //close connection pool associted
> with this object
> }
> catch(e) {
>       print("error!");
>       print(e);
>       print(willitwork);
> }
> 
> Unfortunately my catch statement isn't catching an error and I can't see
> what is being returned, which I guess is because of the platform.
> 
> I have installed TortoiseSVN on the server and can verify that the SVN URL
> can be accessed from the server, but it just doesn't want to do the export
> in any way.
> 
> Can you suggest some troubleshooting code that I could insert in there to
> try to see whether I've got a proper handle to the repository and file?
> 
> Regards,
> 
> Brendan
> 
> 
> 
> --
> View this message in context:
> http://subversion.1072662.n5.nabble.com/doExport-to-copy-single-file-help-
> with-syntax-tp176609p177774.html Sent from the SVNKit - Users mailing list
> archive at Nabble.com.

Reply via email to