Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > subclipse commit: rev 260 - trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/commandline

subclipse
Discussion topic

Back to topic list

subclipse commit: rev 260 - trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/commandline

Author schatz
Full name Philip Schatz
Date 2003-10-29 06:55:13 PST
Message Author: schatz
Date: Wed Oct 29 08:55:11 2003
New Revision: 260

Removed:
   trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/commandli​ne/CmdLineDirEntry.j​ava
Modified:
   trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/commandli​ne/CmdLineInfo.java
   trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/commandli​ne/CmdLineRemoteDirE​ntry.java
   trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/commandli​ne/CommandLine.java
Log:
Added check to make sure resource was versioned in CmdLineInfo. Implemented getSize() for RemoteDirEntry. Added space character preceding authentication information in CommandLine.

Modified: trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/commandli​ne/CmdLineInfo.java
====================​====================​====================​==================
--- trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/commandli​ne/CmdLineInfo.java (original)
+++ trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/commandli​ne/CmdLineInfo.java Wed Oct 29 08:55:11 2003
@@ -51,7 +51,7 @@
  * information on the Apache Software Foundation, please see
  * <http://www.apache.org/>.
  *
- */
+ */
 package org.tigris.subversio​n.svnclientadapter.c​ommandline;
 
 import java.util.Date;
@@ -83,6 +83,7 @@
 
     //Fields
     private Map infoMap = new HashMap();
+ private boolean unversioned = false;
 
     //Constructors
     CmdLineInfo(String infoString) {
@@ -91,15 +92,15 @@
 
     //Methods
     public Date getLastChangedDate() {
- return Helper.toDate(get(KE​Y_LASTCHANGEDDATE));​
+ return (unversioned) ? null : Helper.toDate(get(KE​Y_LASTCHANGEDDATE));​
     }
 
     public SVNRevision.Number getLastChangedRevision() {
- return Helper.toRevNum(get(​KEY_LASTCHANGEDREV))​;
+ return (unversioned) ? null : Helper.toRevNum(get(​KEY_LASTCHANGEDREV))​;
     }
 
     public String getLastCommitAuthor() {
- return get(KEY_LASTCHANGEDAUTHOR);
+ return (unversioned) ? null : get(KEY_LASTCHANGEDAUTHOR);
     }
 
     public SVNNodeKind getNodeKind() {
@@ -115,11 +116,11 @@
     }
 
     public SVNRevision.Number getRevision() {
- return Helper.toRevNum(get(​KEY_REVISION));
+ return (unversioned) ? SVNRevision.INVALID_REVISION : Helper.toRevNum(get(​KEY_REVISION));
     }
 
     public SVNUrl getUrl() {
- return Helper.toSVNUrl(get(KEY_URL));
+ return (unversioned) ? null : Helper.toSVNUrl(get(KEY_URL));
     }
 
     private String get(String key) {
@@ -129,16 +130,25 @@
 
     private void load(String infoString) {
         StringTokenizer st = new StringTokenizer(infoString, Helper.NEWLINE);
- //First, go through and take each line and throw
- // it into a map with the key being the text to
- // the left of the colon, and value being to the
- // right.
- while (st.hasMoreTokens()) {
- String line = st.nextToken();
- int middle = line.indexOf(':');
- String key = line.substring(0, middle);
- String value = line.substring(middle + 2);
- infoMap.put(key, value);
+
+ //this does not have to be a versioned resource.
+ //if it is not, the first line will end with
+ // ": (Not a versioned resource)"
+ if (st.countTokens() == 1) {
+ unversioned = true;
+ } else {
+
+ //First, go through and take each line and throw
+ // it into a map with the key being the text to
+ // the left of the colon, and value being to the
+ // right.
+ while (st.hasMoreTokens()) {
+ String line = st.nextToken();
+ int middle = line.indexOf(':');
+ String key = line.substring(0, middle);
+ String value = line.substring(middle + 2);
+ infoMap.put(key, value);
+ }
         }
     }
 }

Modified: trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/commandli​ne/CmdLineRemoteDirE​ntry.java
====================​====================​====================​==================
--- trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/commandli​ne/CmdLineRemoteDirE​ntry.java (original)
+++ trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/commandli​ne/CmdLineRemoteDirE​ntry.java Wed Oct 29 08:55:11 2003
@@ -85,6 +85,7 @@
     private SVNNodeKind nodeKind;
     private String lastCommitAuthor;
     private Date lastChangedDate;
+ private long size;
 
     //Constructors
     CmdLineRemoteDirEntry(String baseUrl, String line) {
@@ -106,6 +107,8 @@
         nodeKind = (folder) ? SVNNodeKind.DIR : SVNNodeKind.FILE;
         lastCommitAuthor = line.substring(9, 18).trim();
 
+ size = Long.parseLong(line.​substring(18, 27).trim());
+
         String dateString = line.substring(28, 40);
         
         try {
@@ -168,8 +171,7 @@
     }
 
     public long getSize() {
- // TODO : implement getSize
- return 0;
+ return size;
     }
 
 }

Modified: trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/commandli​ne/CommandLine.java
====================​====================​====================​==================
--- trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/commandli​ne/CommandLine.java (original)
+++ trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/commandli​ne/CommandLine.java Wed Oct 29 08:55:11 2003
@@ -96,7 +96,7 @@
     private static String CMD_RECURSIVE_STATUS = "status -v {0} --non-interactive";
 
     private static String CMD_UPDATE = "up -r {0} {1} --non-interactive";
- private static String AUTH_INFO = "--username \"{0}\" --password \"{1}\"";
+ private static String AUTH_INFO = " --username \"{0}\" --password \"{1}\"";
 
     private String CMD;
 

--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: cvs-unsubscribe@subc​lipse.tigris.org
For additional commands, e-mail: cvs-help at subclipse dot tigris dot org

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

Messages

Show all messages in topic

subclipse commit: rev 260 - trunk/svnClientAdapter/src/main/org/tigris/subversion/svnclientadapter/commandline schatz Philip Schatz 2003-10-29 06:55:13 PST
Messages per page: