ISVNClientAdapter.diff - how are the paths calculated?
Robert Munteanu <[email protected]> Sat, 3 May 2014 15:35:58 -0700 (PDT)
| Newsgroups | gmane.comp.version-control.subversion.subclipse.user |
|---|---|
| Message-ID | <1999736804.355.1399156558992.JavaMail.httpd@localhost> |
Hi, I'm generating diffs for local files in a SVN checkout with svnClient.diff(file, SVNRevision.BASE, file, SVNRevision.WORKING, tmpFile, false); When executed in an Eclipse plug-in, the Index/---/+++ lines reference the location of the file relative to the user's home, e.g. Index: w/runtime-ereviewboard/simple-project/src/com/example/Logic.java =================================================================== --- w/runtime-ereviewboard/simple-project/src/com/example/Logic.java (revision 1) +++ w/runtime-ereviewboard/simple-project/src/com/example/Logic.java (working copy) However, when I try to narrow this down using an unit test, the Index/---/+++ lines have an absolute file path set. Index: /tmp/junit6497857066698301842/wc/dir/nested/first.txt =================================================================== --- /tmp/junit6497857066698301842/wc/dir/nested/first.txt (revision 1) +++ /tmp/junit6497857066698301842/wc/dir/nested/first.txt (working copy) In the Eclipse plug-in, I get the svnClient from an ISVNRepositoryLocation ( see also [1] ) ISVNRepositoryLocation svnRepository = _detectLocalChangesPage.getSvnRepositoryLocation(); ISVNClientAdapter svnClient = svnRepository.getSVNClient(); The the unit test, I get it directly from the SVNProviderPlugin ISVNClientAdapter svnClient = SVNProviderPlugin.getPlugin().getSVNClient(); However, changing the Eclipse plug-in to use the same mechanism changed nothing ( not that I expected it to but ...). I initially tried using svnClient.createPatch to create the diff, but that had the same results. I'm really confused as to why this difference appears, hopefully someone with more knowledge about the implementation can shed more light into this. Thanks, Robert [1]: https://github.com/rombert/ereviewboard/blob/77e2cde9ea3baf0326f4d437811172b65f284514/org.review_board.ereviewboard.subclipse.ui/src/org/review_board/ereviewboard/subclipse/internal/wizards/PostReviewRequestWizard.java#L97 ------------------------------------------------------ http://subclipse.tigris.org/ds/viewMessage.do?dsForumId=1047&dsMessageId=3077484 To unsubscribe from this discussion, e-mail: [[email protected]].