1

My project has a function that a user can select a specific file on a selected revision in repo A, and my program will copy it to repo B.

I use the method getRevision in SVNDirEntry, to get the revision of the specific file. But it always returns the latest revision, which might lead the user to select a revision that isn't relevant to that file (because I use that revision to generate the <option> on web page).

Example: the file InfoStruc.java is checked into repo A on revision 61 the first time, and on revision 946 the second time.

The method, getRevisioninSVNDirEntry, would return 946. If user selects InfoStruc.java on revision (1~60), it would lead to the file not found error.

Is there any method in SVNKit that could distinguish which revision is the first revision where some file was checked in ?

1 Answer 1

2

The first time an item is committed, it will be shown as an Add action. You'll have to look through all log entries for that item until you come to the one where it's an Add instead of a Change.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.