[Subclipse-users] ISVNClientAdapter.diff - how are the paths calculated?
From: Robert Munteanu <robert.munteanu_at_gmail.com>
Date: Sat, 3 May 2014 15:35:58 -0700 (PDT)
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
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
In the Eclipse plug-in, I get the svnClient from an ISVNRepositoryLocation ( see also [1] )
ISVNRepositoryLocation svnRepository = _detectLocalChangesPage.getSvnRepositoryLocation();
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
------------------------------------------------------
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subclipse.tigris.org].
|
This is an archived mail posted to the Subclipse Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.