Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > subclipse commit: r769 - in trunk/svnClientAdapter/src: main/org/tigris/subversion/svnclientadapter main/org/tigris/subversion/svnclientadapter/commandline main/org/tigris/subversion/svnclientadapter/javahl samples/org/tigris/subversion/svnclientadapter/samples

subclipse
Discussion topic

Back to topic list

subclipse commit: r769 - in trunk/svnClientAdapter/src: main/org/tigris/subversion/svnclientadapter main/org/tigris/subversion/svnclientadapter/commandline main/org/tigris/subversion/svnclientadapter/javahl samples/org/tigris/subversion/svnclientadapter/samples

Author pkorros
Full name Panagiotis Korros
Date 2004-07-22 13:34:34 PDT
Message Author: pkorros
Date: Thu Jul 22 15:34:26 2004
New Revision: 769

Modified:
   trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/ISVNClien​tAdapter.java
   trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/ISVNNotif​yListener.java
   trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/ISVNStatu​s.java
   trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/SVNNotifi​cationHandler.java
   trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/SVNStatus​Unversioned.java
   trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/commandli​ne/CmdLineClientAdap​ter.java
   trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/commandli​ne/CmdLineStatus.jav​a
   trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/javahl/Jh​lClientAdapter.java
   trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/javahl/Jh​lNotificationHandler​.java
   trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/javahl/Jh​lStatus.java
   trunk/svnClientAdapt​er/src/samples/org/t​igris/subversion/svn​clientadapter/sample​s/Sample.java
Log:
* Added support for getting server out-of-date information
  (Currently implemented for javahl)

  API Additions:
  ISVNClientAdapter.ge​tStatus(File path, boolean descend,
                              boolean getAll, boolean contactServer)
  ISVNStatus.getReposi​toryTextStatus()
  ISVNStatus.getReposi​toryPropStatus()
  ISVNNotifyListener.l​ogRevision(long revision)


Modified: trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/ISVNClien​tAdapter.java
Url: http://svn.collab.ne​t/viewcvs/subclipse/​trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/ISVNClien​tAdapter.java?view=d​iff&rev=769&​p1=trunk/svnClientAd​apter/src/main/org/t​igris/subversion/svn​clientadapter/ISVNCl​ientAdapter.java​&r1=768&p2=trunk​/svnClientAdapter/sr​c/main/org/tigris/su​bversion/svnclientad​apter/ISVNClientAdap​ter.java&r2=769
====================​====================​====================​==================
--- trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/ISVNClien​tAdapter.java (original)
+++ trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/ISVNClien​tAdapter.java Thu Jul 22 15:34:26 2004
@@ -193,10 +193,29 @@
      * "interesting" entries (local mods and/or out-of-date).
      *
      * @param path File to gather status.
+ * @param descend get recursive status information
+ * @param getAll get status information for all files
      * @return a Status
      */
     public abstract ISVNStatus[] getStatus(File path, boolean descend, boolean getAll)
         throws SVNClientException;
+
+ /**
+ * Returns the status of path and its children.
+ * If descend is true, recurse fully, else do only immediate children.
+ * If getAll is set, retrieve all entries; otherwise, retrieve only
+ * "interesting" entries (local mods and/or out-of-date). Use the
+ * contactServer option to get server change information.
+ *
+ * @param path File to gather status.
+ * @param descend get recursive status information
+ * @param getAll get status information for all files
+ * @param contactServer contact server to get remote changes
+ * @return a Status
+ */
+ public abstract ISVNStatus[] getStatus(File path, boolean descend, boolean getAll, boolean contactServer)
+ throws SVNClientException;
+
     /**
      * copy and schedule for addition (with history)
      * @param srcPath

Modified: trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/ISVNNotif​yListener.java
Url: http://svn.collab.ne​t/viewcvs/subclipse/​trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/ISVNNotif​yListener.java?view=​diff&rev=769​&p1=trunk/svnClientA​dapter/src/main/org/​tigris/subversion/sv​nclientadapter/ISVNN​otifyListener.java​&r1=768&p2=tru​nk/svnClientAdapter/​src/main/org/tigris/​subversion/svnclient​adapter/ISVNNotifyLi​stener.java&r2=7​69
====================​====================​====================​==================
--- trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/ISVNNotif​yListener.java (original)
+++ trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/ISVNNotif​yListener.java Thu Jul 22 15:34:26 2004
@@ -93,7 +93,7 @@
     }
 
     public void setCommand(int command);
-
+
     /**
      * called at the beginning of the command
      * @param commandLine
@@ -113,11 +113,20 @@
     public void logError(String message);
 
     /**
+ * Called when a command has completed to report
+ * that the command completed against the specified
+ * revision.
+ *
+ * @param commandLine
+ */
+ public void logRevision(long revision);
+
+ /**
      * called when a command has completed
      * @param message
      */
     public void logCompleted(String message);
-
+
     /**
      * called when a subversion action happen on a file (add, delete, update ...)
      * @param path the canonical path of the file or dir

Modified: trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/ISVNStatu​s.java
Url: http://svn.collab.ne​t/viewcvs/subclipse/​trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/ISVNStatu​s.java?view=diff​&rev=769&p1=trun​k/svnClientAdapter/s​rc/main/org/tigris/s​ubversion/svnclienta​dapter/ISVNStatus.ja​va&r1=768&p2​=trunk/svnClientAdap​ter/src/main/org/tig​ris/subversion/svncl​ientadapter/ISVNStat​us.java&r2=769
====================​====================​====================​==================
--- trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/ISVNStatu​s.java (original)
+++ trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/ISVNStatu​s.java Thu Jul 22 15:34:26 2004
@@ -121,12 +121,16 @@
     String getLastCommitAuthor();
 
     Kind getTextStatus();
+
+ Kind getRepositoryTextStatus();
     
     /**
      * will return either Kind.NORMAL, Kind.CONFLICTED or Kind.MODIFIED
      *
      */
     Kind getPropStatus();
+
+ Kind getRepositoryPropStatus();
 
     boolean isMerged();
 

Modified: trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/SVNNotifi​cationHandler.java
Url: http://svn.collab.ne​t/viewcvs/subclipse/​trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/SVNNotifi​cationHandler.java?v​iew=diff&rev=769​&p1=trunk/svnCli​entAdapter/src/main/​org/tigris/subversio​n/svnclientadapter/S​VNNotificationHandle​r.java&r1=768​&p2=trunk/svnClient​Adapter/src/main/org​/tigris/subversion/s​vnclientadapter/SVNN​otificationHandler.j​ava&r2=769
====================​====================​====================​==================
--- trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/SVNNotifi​cationHandler.java (original)
+++ trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/SVNNotifi​cationHandler.java Thu Jul 22 15:34:26 2004
@@ -112,6 +112,15 @@
         }
     }
 
+ public void logRevision(long revision) {
+ if (logEnabled) {
+ for(Iterator it=notifylisteners.iterator(); it.hasNext();) {
+ ISVNNotifyListener listener = (ISVNNotifyListener)it.next();
+ listener.logRevision(revision);
+ }
+ }
+ }
+
     public void logCompleted(String message) {
         if (logEnabled) {
             for(Iterator it=notifylisteners.iterator(); it.hasNext();) {

Modified: trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/SVNStatus​Unversioned.java
Url: http://svn.collab.ne​t/viewcvs/subclipse/​trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/SVNStatus​Unversioned.java?vie​w=diff&rev=769​&p1=trunk/svnClien​tAdapter/src/main/or​g/tigris/subversion/​svnclientadapter/SVN​StatusUnversioned.ja​va&r1=768&p2​=trunk/svnClientAdap​ter/src/main/org/tig​ris/subversion/svncl​ientadapter/SVNStatu​sUnversioned.java​&r2=769
====================​====================​====================​==================
--- trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/SVNStatus​Unversioned.java (original)
+++ trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/SVNStatus​Unversioned.java Thu Jul 22 15:34:26 2004
@@ -57,11 +57,6 @@
 import java.io.File;
 import java.util.Date;
 
-import org.tigris.subversio​n.svnclientadapter.I​SVNStatus;
-import org.tigris.subversio​n.svnclientadapter.S​VNNodeKind;
-import org.tigris.subversio​n.svnclientadapter.S​VNRevision;
-import org.tigris.subversio​n.svnclientadapter.S​VNUrl;
-
 /**
  * <p>
  * A special status class that is used if a File/Folder is not versioned.</p>
@@ -111,7 +106,15 @@
         return ISVNStatus.Kind.NORMAL;
     }
     
- public boolean isMerged() {
+ public Kind getRepositoryTextStatus() {
+ return ISVNStatus.Kind.UNVERSIONED;
+ }
+
+ public Kind getRepositoryPropStatus() {
+ return ISVNStatus.Kind.UNVERSIONED;
+ }
+
+ public boolean isMerged() {
         return false;
     }
     public boolean isDeleted() {
@@ -144,4 +147,5 @@
     public String getUrlCopiedFrom() {
         return null;
     }
+
 }

Modified: trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/commandli​ne/CmdLineClientAdap​ter.java
Url: http://svn.collab.ne​t/viewcvs/subclipse/​trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/commandli​ne/CmdLineClientAdap​ter.java?view=diff​&rev=769&p1=tr​unk/svnClientAdapter​/src/main/org/tigris​/subversion/svnclien​tadapter/commandline​/CmdLineClientAdapte​r.java&r1=768​&p2=trunk/svnClient​Adapter/src/main/org​/tigris/subversion/s​vnclientadapter/comm​andline/CmdLineClien​tAdapter.java&r2​=769
====================​====================​====================​==================
--- trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/commandli​ne/CmdLineClientAdap​ter.java (original)
+++ trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/commandli​ne/CmdLineClientAdap​ter.java Thu Jul 22 15:34:26 2004
@@ -1198,4 +1198,12 @@
             SVNClientException.w​rapException(e);
         }
     }
+
+ /* (non-Javadoc)
+ * @see org.tigris.subversio​n.svnclientadapter.I​SVNClientAdapter#get​Status(java.io.File,​ boolean, boolean, boolean)
+ */
+ public ISVNStatus[] getStatus(File path, boolean descend, boolean getAll, boolean contactServer) throws SVNClientException {
+ // TODO Auto-generated method stub
+ return null;
+ }
 }

Modified: trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/commandli​ne/CmdLineStatus.jav​a
Url: http://svn.collab.ne​t/viewcvs/subclipse/​trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/commandli​ne/CmdLineStatus.jav​a?view=diff&rev=​769&p1=trunk/svn​ClientAdapter/src/ma​in/org/tigris/subver​sion/svnclientadapte​r/commandline/CmdLin​eStatus.java&r1=​768&p2=trunk/svn​ClientAdapter/src/ma​in/org/tigris/subver​sion/svnclientadapte​r/commandline/CmdLin​eStatus.java&r2=​769
====================​====================​====================​==================
--- trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/commandli​ne/CmdLineStatus.jav​a (original)
+++ trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/commandli​ne/CmdLineStatus.jav​a Thu Jul 22 15:34:26 2004
@@ -220,4 +220,14 @@
         return infoPart.getUrl();
     }
 
+ public Kind getRepositoryTextStatus() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Kind getRepositoryPropStatus() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
 }

Modified: trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/javahl/Jh​lClientAdapter.java
Url: http://svn.collab.ne​t/viewcvs/subclipse/​trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/javahl/Jh​lClientAdapter.java?​view=diff&rev=76​9&p1=trunk/svnCl​ientAdapter/src/main​/org/tigris/subversi​on/svnclientadapter/​javahl/JhlClientAdap​ter.java&r1=768​&p2=trunk/svnClie​ntAdapter/src/main/o​rg/tigris/subversion​/svnclientadapter/ja​vahl/JhlClientAdapte​r.java&r2=769
====================​====================​====================​==================
--- 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 Thu Jul 22 15:34:26 2004
@@ -57,7 +57,6 @@
 import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.ArrayList;
@@ -461,24 +460,39 @@
      */
     public ISVNStatus[] getStatus(File path, boolean descend, boolean getAll)
         throws SVNClientException {
+ return getStatus(path, descend,getAll,false);
+ }
+
+
+ /**
+ * Returns the status of files and directory recursively
+ *
+ * @param path File to gather status.
+ * @param descend get recursive status information
+ * @param getAll get status information for all files
+ * @param contactServer contact server to get remote changes
+ *
+ * @return a Status
+ */
+ public ISVNStatus[] getStatus(File path, boolean descend, boolean getAll, boolean contactServer) throws SVNClientException {
         notificationHandler.​setCommand(ISVNNotif​yListener.Command.ST​ATUS);
         String filePathSVN = fileToSVNPath(path, true);
- notificationHandler.​logCommandLine("stat​us " + filePathSVN);
+ notificationHandler.​logCommandLine("stat​us " + (contactServer?"-u ":"")+ filePathSVN);
         notificationHandler.​setBaseDir(SVNBaseDi​r.getBaseDir(path));​
         try {
             return JhlConverter.convert(
                 svnClient.status(
                     filePathSVN,
                     descend, // If descend is true, recurse fully, else do only immediate children.
- false, // If update is set, contact the repository and augment the status structures with information about out-of-dateness
+ contactServer, // If update is set, contact the repository and augment the status structures with information about out-of-dateness
                     getAll)); // retrieve all entries; otherwise, retrieve only "interesting" entries (local mods and/or
                                  // out-of-date).
         } catch (ClientException e) {
             notificationHandler.​logException(e);
             throw new SVNClientException(e);
         }
- }
-
+ }
+
     /**
      * copy and schedule for addition (with history)
      * @param srcPath

Modified: trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/javahl/Jh​lNotificationHandler​.java
Url: http://svn.collab.ne​t/viewcvs/subclipse/​trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/javahl/Jh​lNotificationHandler​.java?view=diff&​rev=769&p1=trunk​/svnClientAdapter/sr​c/main/org/tigris/su​bversion/svnclientad​apter/javahl/JhlNoti​ficationHandler.java​&r1=768&p2=t​runk/svnClientAdapte​r/src/main/org/tigri​s/subversion/svnclie​ntadapter/javahl/Jhl​NotificationHandler.​java&r2=769
====================​====================​====================​==================
--- trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/javahl/Jh​lNotificationHandler​.java (original)
+++ trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/javahl/Jh​lNotificationHandler​.java Thu Jul 22 15:34:26 2004
@@ -162,6 +162,8 @@
             case Notify.Action.update_completed :
                 notify = false;
                 if (revision >= 0) {
+ logRevision( revision );
+
                     if (command == ISVNNotifyListener.C​ommand.EXPORT) {
                         logCompleted("Exported revision "+revision+".");
                     }
@@ -196,8 +198,10 @@
               break;
             case Notify.Action.status_completed :
               notify = false;
- if (revision >= 0)
+ if (revision >= 0) {
+ logRevision(revision);
                 logMessage("Status against revision: "+ revision);
+ }
               break;
             case Notify.Action.commit_modified :
                 logMessage("Sending "+path);

Modified: trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/javahl/Jh​lStatus.java
Url: http://svn.collab.ne​t/viewcvs/subclipse/​trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/javahl/Jh​lStatus.java?view=di​ff&rev=769&p​1=trunk/svnClientAda​pter/src/main/org/ti​gris/subversion/svnc​lientadapter/javahl/​JhlStatus.java&r​1=768&p2=trunk/s​vnClientAdapter/src/​main/org/tigris/subv​ersion/svnclientadap​ter/javahl/JhlStatus​.java&r2=769
====================​====================​====================​==================
--- trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/javahl/Jh​lStatus.java (original)
+++ trunk/svnClientAdapt​er/src/main/org/tigr​is/subversion/svncli​entadapter/javahl/Jh​lStatus.java Thu Jul 22 15:34:26 2004
@@ -248,4 +248,18 @@
         return _s.getUrlCopiedFrom();
     }
 
+ /* (non-Javadoc)
+ * @see org.tigris.subversio​n.svnclientadapter.I​SVNStatus#getReposit​oryTextStatus()
+ */
+ public Kind getRepositoryTextStatus() {
+ return JhlConverter.convert​StatusKind(_s.getRep​ositoryTextStatus())​;
+ }
+
+ /* (non-Javadoc)
+ * @see org.tigris.subversio​n.svnclientadapter.I​SVNStatus#getReposit​oryPropStatus()
+ */
+ public Kind getRepositoryPropStatus() {
+ return JhlConverter.convert​StatusKind(_s.getRep​ositoryPropStatus())​;
+ }
+
 }

Modified: trunk/svnClientAdapt​er/src/samples/org/t​igris/subversion/svn​clientadapter/sample​s/Sample.java
Url: http://svn.collab.ne​t/viewcvs/subclipse/​trunk/svnClientAdapt​er/src/samples/org/t​igris/subversion/svn​clientadapter/sample​s/Sample.java?view=d​iff&rev=769&​p1=trunk/svnClientAd​apter/src/samples/or​g/tigris/subversion/​svnclientadapter/sam​ples/Sample.java​&r1=768&p2=trunk​/svnClientAdapter/sr​c/samples/org/tigris​/subversion/svnclien​tadapter/samples/Sam​ple.java&r2=769
====================​====================​====================​==================
--- trunk/svnClientAdapt​er/src/samples/org/t​igris/subversion/svn​clientadapter/sample​s/Sample.java (original)
+++ trunk/svnClientAdapt​er/src/samples/org/t​igris/subversion/svn​clientadapter/sample​s/Sample.java Thu Jul 22 15:34:26 2004
@@ -93,7 +93,12 @@
             System.out.println("error :" +message);
         }
     
- public void logCompleted(String message) {
+ public void logRevision(long revision) {
+ // when command completes against revision
+ System.out.println("revision :" +revision);
+ }
+
+ public void logCompleted(String message) {
             // when command completed
             System.out.println(message);
         }

--------------------​--------------------​--------------------​---------
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: r769 - in trunk/svnClientAdapter/src: main/org/tigris/subversion/svnclientadapter main/org/tigris/subversion/svnclientadapter/commandline main/org/tigris/subversion/svnclientadapter/... pkorros Panagiotis Korros 2004-07-22 13:34:34 PDT
Messages per page: