This is how you can check whether that directory or repo exist in the repositary ,
SVNURL url = SVNURL.parseURIDecoded("<URL>"); SVNRepository repository = SVNRepositoryFactory.create(url); ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager("userName"," password"); repository.setAuthenticationManager(authManager); SVNNodeKind nodeKind = repository.checkPath( directory , -1 ); if ( nodeKind == SVNNodeKind.DIR) { System.out.println(("Repo exist"); } else { System.out.println(("Repo does not exist"); } On Wed, Sep 5, 2012 at 7:02 PM, Dmitry Pavlenko <pavle...@tmatesoft.com>wrote: > Hi, > > You can use info call of the Client API: > > final SvnOperationFactory svnOperationFactory = new SvnOperationFactory(); > final SvnGetInfo getInfo = svnOperationFactory.createGetInfo(); > getInfo.setSingleTarget(SvnTarget.fromURL(url, SVNRevision.HEAD)); > final SvnInfo info = getInfo.run(); > > > info.getKind() will be SVNNodeKind.NONE if the 'url' doesn't exist at the > HEAD revision. > > > You can also use low-level Remote API: > > final SVNRepository svnRepository = SVNRepositoryFactory.create(url); > > svnRepository.checkPath("", -1); will be SVNNodeKind.NONE if the 'url' > doesn't exist at the HEAD > revision. > > -- > Dmitry Pavlenko, > TMate Software, > http://subgit.com/ - git-svn bridge > > > Hi everyone, > > > > I want to determine if a project is in the svn trunk path. assume the > > project name is test01. If there is a directory named test01 in trunk, I > > will checkout test01. otherwise,checkout empty. How can I do that? Is it > a > > way to accomplish? > > > > Appreciate you! > > > > ________________________________ > > Best regards > > Lena Yang > > > > From: > > svnkit-users-boun...@svnkit.com<mailto:svnkit-users-boun...@svnkit.com> > > Date: 2012-09-04 20:00 > > To: svnkit-users@svnkit.com<mailto:svnkit-users@svnkit.com> > > Subject: svnkit-users Digest, Vol 20, Issue 1 > > > > Send svnkit-users mailing list submissions to > > svnkit-users@svnkit.com > > > > To subscribe or unsubscribe via the World Wide Web, visit > > http://lists.tmatesoft.com/mailman/listinfo/svnkit-users > > or, via email, send a message with subject or body 'help' to > > svnkit-users-requ...@svnkit.com > > > > You can reach the person managing the list at > > svnkit-users-ow...@svnkit.com > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of svnkit-users digest..." > > > > > > Today's Topics: > > > > 1. Commit fails with "E204899: Input length = 1" with > > global-charset=IBM1047 (m6m6) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Tue, 4 Sep 2012 04:46:36 -0700 (PDT) > > From: m6m6 <marbod.muel...@softwareag.com> > > Subject: Commit fails with "E204899: Input length = 1" with > > global-charset=IBM1047 > > To: svnkit-users@svnkit.com > > Message-ID: <1346759195991-173829.p...@n5.nabble.com> > > Content-Type: text/plain; charset=us-ascii > > > > When committing changes on a z/OS USS system with Java 7.0_64 with the > > SVNKIT configuration setting > > global-charset=IBM1047 the jsvn client fails with > > > > Aug 31, 2012 2:51:08 PM > > org.tmatesoft.svn.core.internal.util.DefaultSVNDebugLogger log > > FINE: DEFAULT: svn: E204899: Input length = 1 > > Aug 31, 2012 2:51:08 PM > > org.tmatesoft.svn.core.internal.util.DefaultSVNDebugLogger log > > FINE: DEFAULT: Input length = 1 > > java.nio.charset.MalformedInputException: Input length = 1 > > at > > java.nio.charset.CoderResult.throwException(CoderResult.java:288) at > > > org.tmatesoft.svn.core.internal.util.SVNCharsetConvertor.throwException(SVN > > CharsetConvertor.java:147) at > > > org.tmatesoft.svn.core.internal.util.SVNCharsetConvertor.convertChunk(SVNCh > > arsetConvertor.java:63) at > > > org.tmatesoft.svn.core.internal.util.SVNCharsetOutputStream.write(SVNCharse > > tOutputStream.java:64) at > > > org.tmatesoft.svn.core.internal.wc.admin.SVNTranslator.copy(SVNTranslator.j > > ava:490) at > > > org.tmatesoft.svn.core.internal.wc.admin.SVNTranslator.copyAndTranslate(SVN > > Translator.java:401) at > > > org.tmatesoft.svn.core.internal.wc17.SVNWCContext.getTranslatedFile(SVNWCCo > > ntext.java:2601) at > > > org.tmatesoft.svn.core.internal.wc17.SVNWCContext$RunFileCommit.runOperatio > > n(SVNWCContext.java:3475) at > > > org.tmatesoft.svn.core.internal.wc17.SVNWCContext.dispatchWorkItem(SVNWCCon > > text.java:3388) at > > > org.tmatesoft.svn.core.internal.wc17.SVNWCContext.wqRun(SVNWCContext.java:3 > > 376) at > > > org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCommit.processCommittedQueue(Sv > > nNgCommit.java:330) at > > > org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCommit.doRun(SvnNgCommit.java:1 > > 78) at > > > org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCommit.run(SvnNgCommit.java:112 > > ) at > > > org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCommit.run(SvnNgCommit.java:51) > > at > > > org.tmatesoft.svn.core.internal.wc2.ng.SvnNgOperationRunner.run(SvnNgOperat > > ionRunner.java:20) at > > > org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunn > > er.java:20) at > > > org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java > > :1235) at > > org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:291) > > at org.tmatesoft.svn.core.wc2.SvnCommit.run(SvnCommit.java:184) > > at > > > org.tmatesoft.svn.core.wc.SVNCommitClient.doCommit(SVNCommitClient.java:878 > > ) at > > > org.tmatesoft.svn.core.wc.SVNCommitClient.doCommit(SVNCommitClient.java:677 > > ) at > > org.tmatesoft.svn.cli.svn.SVNCommitCommand.run(SVNCommitCommand.java:105) > > at > > > org.tmatesoft.svn.cli.AbstractSVNCommandEnvironment.run(AbstractSVNCommandE > > nvironment.java:142) at > > > org.tmatesoft.svn.cli.AbstractSVNLauncher.run(AbstractSVNLauncher.java:79) > > at org.tmatesoft.svn.cli.svn.SVN.main(SVN.java:26) > > at org.tmatesoft.svn.cli.SVN.main(SVN.java:22) > > > > > > I inserted some debug code printing the parameters at the start of the > > routine > > FINE: DEFAULT: SVNTranslator.copyAndTranslate( > > source=/dev/mm/works/mm.x3/adamid/nl.s, > > > destination=/dev/mm/works/mm.x3/.svn/tmp/nl.s.tmp,charset=IBM1047, > > eol=15,keywords=null,special=false,expand=true,repair=true > > > > Reading through the code, it seems to me that the parameter expand=true > > should rather be false. > > > > The source is a local file in IBM1047 encoding and should be probably > > converted to UTF-8 in a temp directory. > > > > The call is from > > SVNWCContext.getTranslatedFile(SVNWCContext.java:2601) > > with the 3rd parameter toNormalFormat being negated to become expand > > parameter > > > > at SVNWCContext$RunFileCommit.runOperation(SVNWCContext.java:3475) > > The call is > > File tmpFile = ctx.getTranslatedFile(localAbspath, > > localAbspath, false, false, false, false); > > with the parameter toNormalFormat=false > > This should be probably set to true: meaning convert to normal form i.e. > > UTF-8. > > > > May be my interpretation is not correct; though I am hoping that this > > information can help to find a solution to the problem. > > > > > > > > > > > > > > > > > > > > > > > > -- > > View this message in context: > > > http://subversion.1072662.n5.nabble.com/Commit-fails-with-E204899-Input-le > > ngth-1-with-global-charset-IBM1047-tp173829.html Sent from the SVNKit - > > Users mailing list archive at Nabble.com. > > > > > > > > ------------------------------ > > > > _______________________________________________ > > svnkit-users mailing list > > svnkit-users@svnkit.com > > http://lists.tmatesoft.com/mailman/listinfo/svnkit-users > > > > End of svnkit-users Digest, Vol 20, Issue 1 > > ******************************************* > > > > ________________________________ > > This e-mail and its attachments may contain confidential and privileged > > information from Ambow Education Group, which is intended only for the > > person or entity whose address is listed above. Any use by persons other > > than the intended recipient(s) is strictly prohibited. If you have > > received it in error, please notify the sender by phone or email > > immediately and delete all copy of this message. > > -- Thanks & Regards, Venkatesh Sapram.