views:

93

answers:

1

Hello guys. I'm writing a tool which will push changes to database after commit to svn.

The question is how to retrieve dirs for particular revision.

SVNClientImpl clientImpl = SVNClientImpl.newInstance();
clientImpl.username(name);
clientImpl.password(password);
DirEntry[] dirs = clientImpl.list(url, Revision.getInstance(revision), true);
for (DirEntry d : dirs) {
   if (d.getLastChangedRevisionNumber() != revision)
      System.out.println(d.getLastChangedRevisionNumber());
}

The thing is that in list() in this case retrives all dirs from url, no matter what revision they have. Of course I can stripped them using if(as it is done now), but I don't think it's good approach.

Is there a specific method for that?

A: 

AFAIK there is no such method and if there would be one, the SVN protocol would have to support this kind of query too, otherwise you will gain no performance improvement. You may issue a log() to find out changed paths of your target revision and query the repository for each of them.

Marc Strapetz