« Return to Thread: Problem with doList

Re: Problem with doList

by APIT :: Rate this Message:

Reply to Author | View in Thread

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








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

 « Return to Thread: Problem with doList