Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r1458 - in trunk: subclipse/core svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/javahl www/subclipse

Discussion topic

Back to topic list

svn commit: r1458 - in trunk: subclipse/core svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/javahl www/subclipse

Author markphip
Full name Mark Phippard
Date 2005-07-18 07:46:32 PDT
Message Author: markphip
Date: Mon Jul 18 07:46:32 2005
New Revision: 1458

JavaHL throws a JNI error when trying to retreive the BASE revision of a
newly added file. This is a bug in JavaHL. I will submit a test case to
Subversion. In the meantime, I added a workaround in svnClientAdapter. When
the BASE revision is asked for, I check the status to see if this is an ADDED
file, and if it is, I just return an empty InputStream.

Issue#: 339

Modified: trunk/subclipse/core​/svnClientAdapter.ja​r
Url: http://subclipse.tig​ris.org/source/brows​e/subclipse/trunk/su​bclipse/core/svnClie​ntAdapter.jar?view=d​iff&rev=1458​&p1=trunk/subclipse/​core/svnClientAdapte​r.jar&r1=1457​&p2=trunk/subclipse​/core/svnClientAdapt​er.jar&r2=1458
Binary files. No diff available.

Modified: trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/javahl/Jh​lClientAdapter.java
Url: http://subclipse.tig​ris.org/source/brows​e/subclipse/trunk/sv​nClientAdapter/src/m​ain/org/tigris/subve​rsion/svnclientadapt​er/javahl/JhlClientA​dapter.java?view=dif​f&rev=1458&p​1=trunk/svnClientAda​pter/src/main/org/ti​gris/subversion/svnc​lientadapter/javahl/​JhlClientAdapter.jav​a&r1=1457&p2​=trunk/svnClientAdap​ter/src/main/org/tig​ris/subversion/svncl​ientadapter/javahl/J​hlClientAdapter.java​&r2=1458
--- trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/javahl/Jh​lClientAdapter.java (original)
+++ trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/javahl/Jh​lClientAdapter.java Mon Jul 18 07:46:32 2005
@@ -46,6 +46,7 @@
 import org.tigris.subversio​n.svnclientadapter.S​VNClientException;
 import org.tigris.subversio​n.svnclientadapter.S​VNInfoUnversioned;
 import org.tigris.subversio​n.svnclientadapter.S​VNRevision;
+import org.tigris.subversio​n.svnclientadapter.S​VNStatusKind;
 import org.tigris.subversio​n.svnclientadapter.S​VNStatusUnversioned;​
 import org.tigris.subversio​n.svnclientadapter.S​VNUrl;
@@ -1054,29 +1055,13 @@
                                 + target);
- /*
- there's abit of a gotcha here: the text-base is stored without
- eol-style conversion or keywords! this will result in spurious due
- to line endings and keyword expansion,making external diffing
- of the wc and the text-base useless in the case of client/server
- line terminator mismatch. --mcclain 7/14/2004
             if (revision.equals(SVN​Revision.BASE)) {
- // svn should not contact the repository when we want to get base
- // file but it does.
- // Until this is corrected, we get the file directly if we can
- File file = new File(path.getParentFile(),
- SVNConstants.SVN_DIRNAME + "/text-base/"+path.g​etName()+".svn-base"​);
- try {
- FileInputStream in = new FileInputStream(file);
- return in;
- } catch (FileNotFoundException e) {
- // we do nothing, we will use svnClient.fileContent instead
- }
+ // This is to work-around a JavaHL problem when trying to
+ // retrieve the base revision of a newly added file.
+ ISVNStatus status = getSingleStatus(path);
+ if (status.getTextStatu​s().equals(SVNStatus​Kind.ADDED))
+ return new ByteArrayInputStream(new byte[0]);
- */
             byte[] contents = svnClient.fileContent(target, JhlConverter.convert​(revision));
             InputStream input = new ByteArrayInputStream(contents);
             return input;

Modified: trunk/www/subclipse/​changes.html
Url: http://subclipse.tig​ris.org/source/brows​e/subclipse/trunk/ww​w/subclipse/changes.​html?view=diff&r​ev=1458&p1=trunk​/www/subclipse/chang​es.html&r1=1457​&p2=trunk/www/sub​clipse/changes.html​&r2=1458
--- trunk/www/subclipse/​changes.html (original)
+++ trunk/www/subclipse/​changes.html Mon Jul 18 07:46:32 2005
@@ -113,6 +113,11 @@
  <li>Handle an exception that can occur when discarding a repository location and checking
  for projects that might still be attached to that location.</li>
  <li>Fixed the way stats are reported in the console where svn:externals are used</li>
+ <li>Status cache was not saving/restoring lock information correctly. (<a
+ href="http://subclipse.tig​ris.org/issues/show_​bug.cgi?id=338">338</a>)</li>
+ <li>Added workaround in svnClientAdapter for a JavaHL problem in retrieving
+ the BASE revision for a newly added file. (<a
+ href="http://subclipse.tig​ris.org/issues/show_​bug.cgi?id=339">339</a>)</li>
 <hr />
 <a name="0.9.31"></a>

« Previous message in topic | 1 of 1 | Next message in topic »


Show all messages in topic

svn commit: r1458 - in trunk: subclipse/core svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/javahl www/subclipse markphip Mark Phippard 2005-07-18 07:46:32 PDT
Messages per page: