How to get the Log / History give a specific file list using SVNKit?

2.8k views Asked by At

Given a file list for example A.java, B.java, C.java, D.java, I want to get the History / Log of the file that are present in the file list.

For example

Revision 0

Added file A.java

Added file B.java

Revision 1

Modified file B.java

Deleted file A.java

Added file C.java

Revision 2

Added file D.java

Modified file B.java

Modified file C.java

Revision 3

Deleted file  C.java

etc...

The history should ONLY show the logs (added/ delete/ modified) of the files in the file list.

How can I do this? It'll would be nice if you will provided some code snippet.

1

There are 1 answers

1
mstrap On

For local files, have a look at org.tmatesoft.svn.core.wc.SVNLogClient#doLog or do the log directly against the repository using org.tmatesoft.svn.core.io.SVNRepository#log. The code snippet can be found at http://wiki.svnkit.com/Printing_Out_Repository_History.