|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Problem with doListHello All ;
I am trying to implement doAnnotate method, therefor I tryed to get a list of the diffrent files in a project in the subversion to be able to execute the svn blame command. The problem is that with the doList method I can not go further more then the src folder. Can someone explain me : Here is the source code try { final List<SVNURL> entries = new LinkedList<SVNURL>(); svnLogClient.doList(url, SVNRevision.HEAD, SVNRevision.HEAD, false, false, new ISVNDirEntryHandler() { public void handleDirEntry(SVNDirEntry entry) throws SVNException { entries.add(entry.getURL()); } }); Iterator<SVNURL> fileiter = entries.iterator(); while (fileiter.hasNext()) { SVNURL svnfileUrl = (SVNURL) fileiter.next(); svnLogClient.doAnnotate(svnfileUrl, SVNRevision.HEAD, SVNRevision.HEAD, SVNRevision.HEAD, new ISVNAnnotateHandler() { public void handleLine(Date date, long revision, String author, String line) throws SVNException { ......... } }); } } catch (SVNException e) { throw new RuntimeException("Error executing blame svn command", e); } Then I obtain this error : java.lang.RuntimeException: Error executing blame svn command at com.luntsys.luntbuild.vcs.SvnAdaptor.retrieveModule(SvnAdaptor.java:498) at com.luntsys.luntbuild.vcs.SvnAdaptor.checkoutActually(SvnAdaptor.java:394) at com.luntsys.luntbuild.vcs.Vcs.checkout(Vcs.java:163) at com.luntsys.luntbuild.BuildGenerator.checkoutAndBuild(BuildGenerator.java:1036) at com.luntsys.luntbuild.BuildGenerator.execute(BuildGenerator.java:355) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529) Caused by: org.tmatesoft.svn.core.SVNException: svn: '/com.project.test/src' is not a file at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:49) at org.tmatesoft.svn.core.internal.io.svn.SVNReader.parse(SVNReader.java:288) at org.tmatesoft.svn.core.internal.io.svn.SVNConnection.read(SVNConnection.java:210) at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.read(SVNRepositoryImpl.java:1006) at org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.getFileRevisions(SVNRepositoryImpl.java:419) at org.tmatesoft.svn.core.wc.SVNLogClient.doAnnotate(SVNLogClient.java:296) at org.tmatesoft.svn.core.wc.SVNLogClient.doAnnotate(SVNLogClient.java:290) at org.tmatesoft.svn.core.wc.SVNLogClient.doAnnotate(SVNLogClient.java:247) at org.tmatesoft.svn.core.wc.SVNLogClient.doAnnotate(SVNLogClient.java:221) ... 6 more Please Help ![]() |
|
|
Re: Problem with doListHello,
> '/com.project.test/src' is not a file doAnnotate (blame) works only for files. To fix the problem, you should change the code that collects URLs: svnLogClient.doList(url, SVNRevision.HEAD, SVNRevision.HEAD, false, false, new ISVNDirEntryHandler() { public void handleDirEntry(SVNDirEntry entry) throws SVNException { if (entry.getKind() == SVNNodeKind.FILE) { entries.add(entry.getURL()); } } }); Alexander Kitaev, TMate Software, http://svnkit.com/ - Java [Sub]Versioning Library! APIT wrote: > Hello All ; > I am trying to implement doAnnotate method, therefor I tryed to get a list > of the diffrent files in a project in the subversion to be able to execute > the svn blame command. The problem is that with the doList method I can not > go further more then the src folder. Can someone explain me : > Here is the source code > > try { > > final List<SVNURL> entries = new LinkedList<SVNURL>(); > svnLogClient.doList(url, SVNRevision.HEAD, > SVNRevision.HEAD, false, false, > new ISVNDirEntryHandler() { > public void handleDirEntry(SVNDirEntry entry) > throws SVNException { > entries.add(entry.getURL()); > } > }); > > Iterator<SVNURL> fileiter = entries.iterator(); > while (fileiter.hasNext()) { > SVNURL svnfileUrl = (SVNURL) fileiter.next(); > svnLogClient.doAnnotate(svnfileUrl, SVNRevision.HEAD, > SVNRevision.HEAD, SVNRevision.HEAD, > new ISVNAnnotateHandler() { > public void handleLine(Date date, long revision, > String author, String line) > throws SVNException { > ......... > } > }); > } > } catch (SVNException e) { > throw new RuntimeException("Error executing blame svn command", e); > } > > Then I obtain this error : > > java.lang.RuntimeException: Error executing blame svn command > at > com.luntsys.luntbuild.vcs.SvnAdaptor.retrieveModule(SvnAdaptor.java:498) > at > com.luntsys.luntbuild.vcs.SvnAdaptor.checkoutActually(SvnAdaptor.java:394) > at com.luntsys.luntbuild.vcs.Vcs.checkout(Vcs.java:163) > at > com.luntsys.luntbuild.BuildGenerator.checkoutAndBuild(BuildGenerator.java:1036) > at > com.luntsys.luntbuild.BuildGenerator.execute(BuildGenerator.java:355) > at org.quartz.core.JobRunShell.run(JobRunShell.java:202) > at > org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529) > Caused by: org.tmatesoft.svn.core.SVNException: svn: > '/com.project.test/src' is not a file > at > org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:49) > at > org.tmatesoft.svn.core.internal.io.svn.SVNReader.parse(SVNReader.java:288) > at > org.tmatesoft.svn.core.internal.io.svn.SVNConnection.read(SVNConnection.java:210) > at > org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.read(SVNRepositoryImpl.java:1006) > at > org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.getFileRevisions(SVNRepositoryImpl.java:419) > at > org.tmatesoft.svn.core.wc.SVNLogClient.doAnnotate(SVNLogClient.java:296) > at > org.tmatesoft.svn.core.wc.SVNLogClient.doAnnotate(SVNLogClient.java:290) > at > org.tmatesoft.svn.core.wc.SVNLogClient.doAnnotate(SVNLogClient.java:247) > at > org.tmatesoft.svn.core.wc.SVNLogClient.doAnnotate(SVNLogClient.java:221) > ... 6 more > > > > Please Help > :confused: > --------------------------------------------------------------------- To unsubscribe, e-mail: svnkit-users-unsubscribe@... For additional commands, e-mail: svnkit-users-help@... |
|
|
Re: Problem with doListHello once again
Thanks for the solution. I do have an other problem with the same code, the method doList do not lists all the files in the project for example if any files exists under "src" it will not be listed. I dont know what to do, recusrsivity was not a solution for. Thanks ![]()
|
|
|
Re: Problem with doListHello,
I have just tried this code and it printed out all the files under http://svn.collab.net/repos/svn/branches/1.5.x: SVNLogClient logger = SVNClientManager.newInstance(null).getLogClient(); final List entries = new LinkedList(); logger.doList(SVNURL.parseURIEncoded("http://svn.collab.net/repos/svn/branches/1.5.x"), SVNRevision.HEAD, SVNRevision.HEAD, false, false, new ISVNDirEntryHandler() { public void handleDirEntry(SVNDirEntry entry) throws SVNException { if (entry.getKind() == SVNNodeKind.FILE) { System.out.println("path: " + entry.getRelativePath()); } } }); ---- Alexander Sinyushkin, TMate Software, http://svnkit.com/ - Java [Sub]Versioning Library! APIT wrote: > Hello once again > Thanks for the solution. I do have an other problem with the same code, the > method doList do not lists all the files in the project for example if any > files exists under "src" it will not be listed. > I dont know what to do, recusrsivity was not a solution for. > Thanks > > > > > :handshake: > > > > > APIT wrote: >> Hello All ; >> I am trying to implement doAnnotate method, therefor I tryed to get a list >> of the diffrent files in a project in the subversion to be able to execute >> the svn blame command. The problem is that with the doList method I can >> not go further more then the src folder. Can someone explain me : >> Here is the source code >> >> try { >> >> final List<SVNURL> entries = new LinkedList<SVNURL>(); >> svnLogClient.doList(url, SVNRevision.HEAD, >> SVNRevision.HEAD, false, false, >> new ISVNDirEntryHandler() { >> public void handleDirEntry(SVNDirEntry entry) >> throws SVNException { >> entries.add(entry.getURL()); >> } >> }); >> >> Iterator<SVNURL> fileiter = entries.iterator(); >> while (fileiter.hasNext()) { >> SVNURL svnfileUrl = (SVNURL) fileiter.next(); >> svnLogClient.doAnnotate(svnfileUrl, SVNRevision.HEAD, >> SVNRevision.HEAD, SVNRevision.HEAD, >> new ISVNAnnotateHandler() { >> public void handleLine(Date date, long revision, >> String author, String line) >> throws SVNException { >> ......... >> } >> }); >> } >> } catch (SVNException e) { >> throw new RuntimeException("Error executing blame svn command", e); >> } >> >> Then I obtain this error : >> >> java.lang.RuntimeException: Error executing blame svn command >> at >> com.luntsys.luntbuild.vcs.SvnAdaptor.retrieveModule(SvnAdaptor.java:498) >> at >> com.luntsys.luntbuild.vcs.SvnAdaptor.checkoutActually(SvnAdaptor.java:394) >> at com.luntsys.luntbuild.vcs.Vcs.checkout(Vcs.java:163) >> at >> com.luntsys.luntbuild.BuildGenerator.checkoutAndBuild(BuildGenerator.java:1036) >> at >> com.luntsys.luntbuild.BuildGenerator.execute(BuildGenerator.java:355) >> at org.quartz.core.JobRunShell.run(JobRunShell.java:202) >> at >> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529) >> Caused by: org.tmatesoft.svn.core.SVNException: svn: >> '/com.project.test/src' is not a file >> at >> org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:49) >> at >> org.tmatesoft.svn.core.internal.io.svn.SVNReader.parse(SVNReader.java:288) >> at >> org.tmatesoft.svn.core.internal.io.svn.SVNConnection.read(SVNConnection.java:210) >> at >> org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.read(SVNRepositoryImpl.java:1006) >> at >> org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryImpl.getFileRevisions(SVNRepositoryImpl.java:419) >> at >> org.tmatesoft.svn.core.wc.SVNLogClient.doAnnotate(SVNLogClient.java:296) >> at >> org.tmatesoft.svn.core.wc.SVNLogClient.doAnnotate(SVNLogClient.java:290) >> at >> org.tmatesoft.svn.core.wc.SVNLogClient.doAnnotate(SVNLogClient.java:247) >> at >> org.tmatesoft.svn.core.wc.SVNLogClient.doAnnotate(SVNLogClient.java:221) >> ... 6 more >> >> >> >> Please Help >> :confused: >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: svnkit-users-unsubscribe@... For additional commands, e-mail: svnkit-users-help@... |
|
|
Re: Problem with doListHello :)
I used an other form fom doList and its working svnLogClient.doList(url, SVNRevision.HEAD, SVNRevision.HEAD, true, new ISVNDirEntryHandler() { public void handleDirEntry(SVNDirEntry entry) throws SVNException { entries.add(entry.getURL()); } }); With that I have all the files incide the project Thanks ![]()
|
| Free Forum Powered by Nabble | Forum Help |