Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > subclipse commit: r1429 - in branches/svnClientAdapter/locking-improvements/src/main/org/tigris/subversion/svnclientadapter: . javahl javasvn

subclipse
Discussion topic

Back to topic list

subclipse commit: r1429 - in branches/svnClientAdapter/locking-improvements/src/main/org/tigris/subversion/svnclientadapter: . javahl javasvn

Author dlr
Full name Daniel Rall
Date 2005-07-05 11:14:07 PDT
Message Author: dlr
Date: Tue Jul 5 13:14:01 2005
New Revision: 1429

Modified:
   branches/svnClientAd​apter/locking-improv​ements/src/main/org/​tigris/subversion/sv​nclientadapter/ISVNC​lientAdapter.java
   branches/svnClientAd​apter/locking-improv​ements/src/main/org/​tigris/subversion/sv​nclientadapter/comma​ndline/CmdLineClient​Adapter.java
   branches/svnClientAd​apter/locking-improv​ements/src/main/org/​tigris/subversion/sv​nclientadapter/javah​l/JhlClientAdapter.j​ava
   branches/svnClientAd​apter/locking-improv​ements/src/main/org/​tigris/subversion/sv​nclientadapter/javas​vn/JavaSvnClientAdap​ter.java

Log:
Shelving some lock-via-URI (rather than via File) API additions and
corresponding implementation stubs for svnClientAdapter, which will be
rolled into svnant (and hopefullly picked up by subclipse as well).


[in src/main/org/tigris/​subversion/svnclient​adapter/]

* ISVNClientAdapter.java
  (lock, unlock): New APIs for locking/unlocking via URI .
  

* commandline/CmdLineC​lientAdapter.java
  (lock, unlock): Beginnings of URI-based locking implementation.


* javahl/JhlClientAdapter.java
  (lock, unlock): Memory usage improvements to diagnostic message
   generation via use of a StringBuffer for lock/unlock via File.

  (lock, unlock): Stubs for lock/unlock via URI. Not yet functional.

  (notImplementedYet): Throws an SVNClientException indicating not
   implemented.


* javasvn/JavaSvnClien​tAdapter.java
  (lock, unlock): Stubs for lock/unlock via URI. Not yet functional.


Modified: branches/svnClientAd​apter/locking-improv​ements/src/main/org/​tigris/subversion/sv​nclientadapter/ISVNC​lientAdapter.java
Url: http://svn.collab.ne​t/viewcvs/subclipse/​branches/svnClientAd​apter/locking-improv​ements/src/main/org/​tigris/subversion/sv​nclientadapter/ISVNC​lientAdapter.java?re​v=1429&p1=branch​es/svnClientAdapter/​locking-improvements​/src/main/org/tigris​/subversion/svnclien​tadapter/ISVNClientA​dapter.java&p2=b​ranches/svnClientAda​pter/locking-improve​ments/src/main/org/t​igris/subversion/svn​clientadapter/ISVNCl​ientAdapter.java​&r1=1428&r2=1429​
====================​====================​====================​==================
--- branches/svnClientAd​apter/locking-improv​ements/src/main/org/​tigris/subversion/sv​nclientadapter/ISVNC​lientAdapter.java (original)
+++ branches/svnClientAd​apter/locking-improv​ements/src/main/org/​tigris/subversion/sv​nclientadapter/ISVNC​lientAdapter.java Tue Jul 5 13:14:01 2005
@@ -695,6 +695,26 @@
      * @param force break an existing lock
      * @throws SVNClientException
      */
+ public abstract void lock(SVNUrl[] paths, String comment, boolean force)
+ throws SVNClientException;
+
+ /**
+ * Unlock a working copy item
+ * @param paths path of the items to unlock
+ * @param force break an existing lock
+ * @throws SVNClientException
+ */
+ public abstract void unlock(SVNUrl[] paths, boolean force)
+ throws SVNClientException;
+
+
+ /**
+ * Lock a working copy item
+ * @param paths path of the items to lock
+ * @param comment
+ * @param force break an existing lock
+ * @throws SVNClientException
+ */
     public abstract void lock(File[] paths, String comment, boolean force)
             throws SVNClientException;
 

Modified: branches/svnClientAd​apter/locking-improv​ements/src/main/org/​tigris/subversion/sv​nclientadapter/comma​ndline/CmdLineClient​Adapter.java
Url: http://svn.collab.ne​t/viewcvs/subclipse/​branches/svnClientAd​apter/locking-improv​ements/src/main/org/​tigris/subversion/sv​nclientadapter/comma​ndline/CmdLineClient​Adapter.java?rev=142​9&p1=branches/sv​nClientAdapter/locki​ng-improvements/src/​main/org/tigris/subv​ersion/svnclientadap​ter/commandline/CmdL​ineClientAdapter.jav​a&p2=branches/sv​nClientAdapter/locki​ng-improvements/src/​main/org/tigris/subv​ersion/svnclientadap​ter/commandline/CmdL​ineClientAdapter.jav​a&r1=1428&r2​=1429
====================​====================​====================​==================
--- branches/svnClientAd​apter/locking-improv​ements/src/main/org/​tigris/subversion/sv​nclientadapter/comma​ndline/CmdLineClient​Adapter.java (original)
+++ branches/svnClientAd​apter/locking-improv​ements/src/main/org/​tigris/subversion/sv​nclientadapter/comma​ndline/CmdLineClient​Adapter.java Tue Jul 5 13:14:01 2005
@@ -1153,7 +1153,56 @@
     }
     
     /* (non-Javadoc)
- * @see org.tigris.subversio​n.svnclientadapter.I​SVNClientAdapter#loc​k(java.lang.String[]​, java.lang.String, boolean)
+ * @see org.tigris.subversio​n.svnclientadapter.I​SVNClientAdapter#loc​k(SVNUrl[], java.lang.String, boolean)
+ */
+ public void lock(SVNUrl[] urls, String comment, boolean force)
+ throws SVNClientException {
+ String[] files = new String[urls.length];
+ for (int i = 0; i < urls.length; i++) {
+ files[i] = toString(urls[i]);
+ }
+ try {
+ // ### Unsure how to handle notification system on URLs.
+ //notificationHandle​r.setBaseDir(SVNUrlU​tils.getCommonRootUr​l(urls));
+ _cmd.lock(files, comment, force);
+ } catch (CmdLineException e) {
+ throw SVNClientException.w​rapException(e);
+ }
+ finally {
+ /*
+ for (int i = 0; i < files.length; i++) {
+ notificationHandler.​notifyListenersOfCha​nge(files[i]);
+ }
+ */
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.tigris.subversio​n.svnclientadapter.I​SVNClientAdapter#unl​ock(SVNUrl[], boolean)
+ */
+ public void unlock(SVNUrl[] urls, boolean force) throws SVNClientException {
+ String[] files = new String[urls.length];
+ for (int i = 0; i < urls.length; i++) {
+ files[i] = toString(urls[i]);
+ }
+ try {
+ // ### Unsure how to handle notification system on URLs.
+ //notificationHandle​r.setBaseDir(SVNBase​Dir.getCommonRootUrl​(urls));
+ _cmd.unlock(files, force);
+ } catch (CmdLineException e) {
+ throw SVNClientException.w​rapException(e);
+ }
+ finally {
+ /*
+ for (int i = 0; i < files.length; i++) {
+ notificationHandler.​notifyListenersOfCha​nge(files[i]);
+ }
+ */
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.tigris.subversio​n.svnclientadapter.I​SVNClientAdapter#loc​k(java.io.File[], java.lang.String, boolean)
      */
     public void lock(File[] paths, String comment, boolean force)
             throws SVNClientException {

Modified: branches/svnClientAd​apter/locking-improv​ements/src/main/org/​tigris/subversion/sv​nclientadapter/javah​l/JhlClientAdapter.j​ava
Url: http://svn.collab.ne​t/viewcvs/subclipse/​branches/svnClientAd​apter/locking-improv​ements/src/main/org/​tigris/subversion/sv​nclientadapter/javah​l/JhlClientAdapter.j​ava?rev=1429&p1=​branches/svnClientAd​apter/locking-improv​ements/src/main/org/​tigris/subversion/sv​nclientadapter/javah​l/JhlClientAdapter.j​ava&p2=branches/​svnClientAdapter/loc​king-improvements/sr​c/main/org/tigris/su​bversion/svnclientad​apter/javahl/JhlClie​ntAdapter.java&r​1=1428&r2=1429
====================​====================​====================​==================
--- branches/svnClientAd​apter/locking-improv​ements/src/main/org/​tigris/subversion/sv​nclientadapter/javah​l/JhlClientAdapter.j​ava (original)
+++ branches/svnClientAd​apter/locking-improv​ements/src/main/org/​tigris/subversion/sv​nclientadapter/javah​l/JhlClientAdapter.j​ava Tue Jul 5 13:14:01 2005
@@ -229,7 +229,6 @@
         svnClient.setPrompt(prompt);
     }
 
-
     private static String fileToSVNPath(File file, boolean canonical) {
         // SVN need paths with '/' separators
         if (canonical) {
@@ -1666,6 +1665,28 @@
             this.setPromptUserPa​ssword(prompt);
         }
     }
+
+ private void notImplementedYet(String command) throws SVNClientException {
+ throw new SVNClientException("Not implemented yet : " + command);
+ }
+
+ /* (non-Javadoc)
+ * @see org.tigris.subversio​n.svnclientadapter.I​SVNClientAdapter#loc​k(SVNUrl[], java.lang.String, boolean)
+ */
+ public void lock(SVNUrl[] uris, String comment, boolean force)
+ throws SVNClientException {
+ notImplementedYet("lock (of URI)");
+ }
+
+ /* (non-Javadoc)
+ * @see org.tigris.subversio​n.svnclientadapter.I​SVNClientAdapter#unl​ock(SVNUrl[], boolean)
+ */
+ public void unlock(SVNUrl[] uris, boolean force)
+ throws SVNClientException {
+ notImplementedYet("unlock (of URI)");
+
+ }
+
     /* (non-Javadoc)
      * @see org.tigris.subversio​n.svnclientadapter.I​SVNClientAdapter#loc​k(java.lang.String[]​, java.lang.String, boolean)
      */
@@ -1674,15 +1695,16 @@
         try {
             notificationHandler.​setCommand(ISVNNotif​yListener.Command.LO​CK);
             String[] files = new String[paths.length];
- String commandLine = "lock -m \""+comment+"\"";
+ StringBuffer commandLine = new StringBuffer("lock -m \"")
+ .append(comment).append('"');
             if (force)
- commandLine+=" --force";
+ commandLine.append(" --force");
 
             for (int i = 0; i < paths.length; i++) {
                 files[i] = fileToSVNPath((File) paths[i], false);
- commandLine+=" "+files[i].toString();
+ commandLine.append(' ').append(files[i]);
             }
- notificationHandler.​logCommandLine(comma​ndLine);
+ notificationHandler.​logCommandLine(comma​ndLine.toString());
             notificationHandler.​setBaseDir(SVNBaseDi​r.getBaseDir(paths))​;
 
             svnClient.lock(files, comment, force);
@@ -1712,15 +1734,15 @@
         try {
             notificationHandler.​setCommand(ISVNNotif​yListener.Command.LO​CK);
             String[] files = new String[paths.length];
- String commandLine = "unlock ";
+ StringBuffer commandLine = new StringBuffer("unlock ");
             if (force)
- commandLine+=" --force";
+ commandLine.append(" --force");
     
             for (int i = 0; i < paths.length; i++) {
                 files[i] = fileToSVNPath((File) paths[i], false);
- commandLine+=" "+files[i].toString();
+ commandLine.append(' ').append(files[i]);
             }
- notificationHandler.​logCommandLine(comma​ndLine);
+ notificationHandler.​logCommandLine(comma​ndLine.toString());
             notificationHandler.​setBaseDir(SVNBaseDi​r.getBaseDir(paths))​;
     
             svnClient.unlock(files, force);

Modified: branches/svnClientAd​apter/locking-improv​ements/src/main/org/​tigris/subversion/sv​nclientadapter/javas​vn/JavaSvnClientAdap​ter.java
Url: http://svn.collab.ne​t/viewcvs/subclipse/​branches/svnClientAd​apter/locking-improv​ements/src/main/org/​tigris/subversion/sv​nclientadapter/javas​vn/JavaSvnClientAdap​ter.java?rev=1429​&p1=branches/svnCli​entAdapter/locking-i​mprovements/src/main​/org/tigris/subversi​on/svnclientadapter/​javasvn/JavaSvnClien​tAdapter.java&p2​=branches/svnClientA​dapter/locking-impro​vements/src/main/org​/tigris/subversion/s​vnclientadapter/java​svn/JavaSvnClientAda​pter.java&r1=142​8&r2=1429
====================​====================​====================​==================
--- branches/svnClientAd​apter/locking-improv​ements/src/main/org/​tigris/subversion/sv​nclientadapter/javas​vn/JavaSvnClientAdap​ter.java (original)
+++ branches/svnClientAd​apter/locking-improv​ements/src/main/org/​tigris/subversion/sv​nclientadapter/javas​vn/JavaSvnClientAdap​ter.java Tue Jul 5 13:14:01 2005
@@ -859,20 +859,40 @@
         // Default is to do nothing. If JavaSVN has a way to do callbacks
         // for authentication, it could be added here.
     }
+
     /* (non-Javadoc)
      * @see org.tigris.subversio​n.svnclientadapter.I​SVNClientAdapter#loc​k(java.io.File[], java.lang.String, boolean)
      */
     public void lock(File[] paths, String comment, boolean force)
             throws SVNClientException {
- notImplementedYet("lock");
+ notImplementedYet("lock (of path)");
 
     }
+
+ /* (non-Javadoc)
+ * @see org.tigris.subversio​n.svnclientadapter.I​SVNClientAdapter#loc​k(SVNUrl[], java.lang.String, boolean)
+ */
+ public void lock(SVNUrl[] uris, String comment, boolean force)
+ throws SVNClientException {
+ notImplementedYet("lock (of URI)");
+
+ }
+
     /* (non-Javadoc)
      * @see org.tigris.subversio​n.svnclientadapter.I​SVNClientAdapter#unl​ock(java.io.File[], boolean)
      */
     public void unlock(File[] paths, boolean force) throws SVNClientException {
- notImplementedYet("unlock");
+ notImplementedYet("unlock (of path)");
+ }
+
+ /* (non-Javadoc)
+ * @see org.tigris.subversio​n.svnclientadapter.I​SVNClientAdapter#unl​ock(SVNUrl[], boolean)
+ */
+ public void unlock(SVNUrl[] uris, boolean force)
+ throws SVNClientException {
+ notImplementedYet("unlock (of URI)");
     }
+
     /* (non-Javadoc)
      * @see org.tigris.subversio​n.svnclientadapter.I​SVNClientAdapter#com​mit(java.io.File[], java.lang.String, boolean, boolean)
      */
@@ -884,4 +904,4 @@
     public void setRevProperty(SVNUrl path, Number revisionNo, String propName, String propertyData, boolean force) throws SVNClientException {
         notImplementedYet("s​etRevProperty");
     }
-}
\ No newline at end of file
+}

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

Messages

Show all messages in topic

subclipse commit: r1429 - in branches/svnClientAdapter/locking-improvements/src/main/org/tigris/subversion/svnclientadapter: . javahl javasvn dlr Daniel Rall 2005-07-05 11:14:07 PDT
Messages per page: