You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/03/17 02:10:11 UTC

svn commit: r924080 - in /subversion/trunk/subversion/bindings/javahl: native/ src/org/apache/subversion/javahl/ src/org/tigris/subversion/javahl/ tests/org/apache/subversion/javahl/

Author: hwright
Date: Wed Mar 17 01:10:11 2010
New Revision: 924080

URL: http://svn.apache.org/viewvc?rev=924080&view=rev
Log:
JavaHL: Make Depth a first-class type, by declaring it as an enum.

This leaves a few inefficiencies, particularly in the EnumMapper.  These will
be addressed later.

[ in subversion/bindings/javahl/ ]
* tests/org/apache/subversion/javahl/BasicTests.java:
  Use the Depth type instead of an int.

* src/org/apache/subversion/javahl/SVNClient.java:
  Same.

* src/org/apache/subversion/javahl/ISVNClient.java:
  Same.

* native/InfoCallback.cpp
  (createJavaInfo2): Same.

* src/org/apache/subversion/javahl/Info2.java:
  Same.

* src/org/tigris/subversion/javahl/SVNClient.java:
  Same.

* native/EnumMapper.h,
  native/EnumMapper.cpp
  (mapEnum, getName, toDepth): New.
  (mapDepth): Return the Depth object, instead of the int.

* native/org_apache_subversion_javahl_SVNClient.cpp:
  Accept depth objects, and convert them to the C enum.

* src/org/apache/subversion/javahl/Depth.java
  Convert the int defines to be part of the enum.  Adjust methods to
  accept or return a Depth.

* src/org/tigris/subversion/javahl/Depth.java
  (toADepth, fromADepth): New.

* src/org/tigris/subversion/javahl/Info2.java
  (Info2): Wrap the Depth object returned from the apache info object.

Modified:
    subversion/trunk/subversion/bindings/javahl/native/EnumMapper.cpp
    subversion/trunk/subversion/bindings/javahl/native/EnumMapper.h
    subversion/trunk/subversion/bindings/javahl/native/InfoCallback.cpp
    subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
    subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/Depth.java
    subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
    subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/Info2.java
    subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
    subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Depth.java
    subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Info2.java
    subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java
    subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java

Modified: subversion/trunk/subversion/bindings/javahl/native/EnumMapper.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/EnumMapper.cpp?rev=924080&r1=924079&r2=924080&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/EnumMapper.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/EnumMapper.cpp Wed Mar 17 01:10:11 2010
@@ -28,6 +28,8 @@
 #include "svn_wc.h"
 #include "svn_client.h"
 #include "EnumMapper.h"
+#include "JNIUtil.h"
+#include "JNIStringHolder.h"
 #include "../include/org_apache_subversion_javahl_CommitItemStateFlags.h"
 #include "../include/org_apache_subversion_javahl_NotifyAction.h"
 #include "../include/org_apache_subversion_javahl_NotifyStatus.h"
@@ -40,7 +42,6 @@
 #include "../include/org_apache_subversion_javahl_ConflictDescriptor_Kind.h"
 #include "../include/org_apache_subversion_javahl_ConflictDescriptor_Action.h"
 #include "../include/org_apache_subversion_javahl_ConflictDescriptor_Reason.h"
-#include "../include/org_apache_subversion_javahl_Depth.h"
 #include "../include/org_apache_subversion_javahl_Tristate.h"
 
 /**
@@ -473,28 +474,53 @@ jint EnumMapper::mapConflictReason(svn_w
     }
 }
 
-jint EnumMapper::mapDepth(svn_depth_t depth)
+svn_depth_t EnumMapper::toDepth(jobject jdepth)
+{
+  JNIEnv *env = JNIUtil::getEnv();
+
+  jstring jname = getName(JAVA_PACKAGE"/Depth", jdepth);
+  if (JNIUtil::isJavaExceptionThrown())
+    return (svn_depth_t)0;
+
+  JNIStringHolder str(jname);
+  std::string name((const char *)str);
+
+  if (name == "infinity")
+    return svn_depth_infinity;
+  else if (name == "immediates")
+    return svn_depth_immediates;
+  else if (name == "files")
+    return svn_depth_files;
+  else if (name == "empty")
+    return svn_depth_empty;
+  else if (name == "exclude")
+    return svn_depth_exclude;
+  else
+    return svn_depth_unknown;
+}
+
+jobject EnumMapper::mapDepth(svn_depth_t depth)
 {
   switch (depth)
     {
     case svn_depth_unknown:
     default:
-      return org_apache_subversion_javahl_Depth_unknown;
+      return mapEnum(JAVA_PACKAGE"/Depth", "unknown");
 
     case svn_depth_exclude:
-      return org_apache_subversion_javahl_Depth_exclude;
+      return mapEnum(JAVA_PACKAGE"/Depth", "exclude");
 
     case svn_depth_empty:
-      return org_apache_subversion_javahl_Depth_empty;
+      return mapEnum(JAVA_PACKAGE"/Depth", "empty");
 
     case svn_depth_files:
-      return org_apache_subversion_javahl_Depth_files;
+      return mapEnum(JAVA_PACKAGE"/Depth", "files");
 
     case svn_depth_immediates:
-      return org_apache_subversion_javahl_Depth_immediates;
+      return mapEnum(JAVA_PACKAGE"/Depth", "immediates");
 
     case svn_depth_infinity:
-      return org_apache_subversion_javahl_Depth_infinity;
+      return mapEnum(JAVA_PACKAGE"/Depth", "infinity");
     }
 }
 
@@ -527,3 +553,57 @@ jint EnumMapper::mapTristate(svn_tristat
       return org_apache_subversion_javahl_Tristate_False;
     }
 }
+
+jobject EnumMapper::mapEnum(const char *clazzName, const char *name)
+{
+  std::string methodSig("(Ljava/lang/String;)L");
+  methodSig.append(clazzName);
+  methodSig.append(";");
+
+  JNIEnv *env = JNIUtil::getEnv();
+  jclass clazz = env->FindClass(clazzName);
+  if (JNIUtil::isJavaExceptionThrown())
+    return NULL;
+
+  jmethodID mid = env->GetStaticMethodID(clazz, "valueOf", methodSig.c_str());
+  if (JNIUtil::isJavaExceptionThrown())
+    return NULL;
+
+  jstring jname = JNIUtil::makeJString(name);
+  if (JNIUtil::isJavaExceptionThrown())
+    return NULL;
+
+  jobject jdepth = env->CallStaticObjectMethod(clazz, mid, jname);
+  if (JNIUtil::isJavaExceptionThrown())
+    return NULL;
+
+  env->DeleteLocalRef(jname);
+  if (JNIUtil::isJavaExceptionThrown())
+    return NULL;
+
+  env->DeleteLocalRef(clazz);
+  if (JNIUtil::isJavaExceptionThrown())
+    return NULL;
+
+  return jdepth;
+}
+
+jstring EnumMapper::getName(const char *clazzName, jobject jenum)
+{
+  JNIEnv *env = JNIUtil::getEnv();
+  jclass clazz = env->FindClass(clazzName);
+  if (JNIUtil::isJavaExceptionThrown())
+    return NULL;
+
+  jmethodID mid = env->GetMethodID(clazz, "name", "()Ljava/lang/String;");
+  if (JNIUtil::isJavaExceptionThrown())
+    return NULL;
+
+  jstring jname = (jstring) env->CallObjectMethod(jenum, mid);
+
+  env->DeleteLocalRef(clazz);
+  if (JNIUtil::isJavaExceptionThrown())
+    return NULL;
+
+  return jname;
+}

Modified: subversion/trunk/subversion/bindings/javahl/native/EnumMapper.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/EnumMapper.h?rev=924080&r1=924079&r2=924080&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/EnumMapper.h (original)
+++ subversion/trunk/subversion/bindings/javahl/native/EnumMapper.h Wed Mar 17 01:10:11 2010
@@ -32,13 +32,19 @@
 #include "svn_wc.h"
 #include "svn_types.h"
 
+class JNIStringHolder;
+
 /**
  * This class contains all the mappers between the C enum's and the
- * matching Java int's.
+ * matching Java enums's.
  */
 class EnumMapper
 {
  public:
+  /* Converting to C enum's */
+  static svn_depth_t toDepth(jobject jdepth);
+
+  /* Converting from C enum's */
   static jint mapCommitMessageStateFlags(apr_byte_t flags);
   static jint mapNotifyState(svn_wc_notify_state_t state);
   static jint mapNotifyAction(svn_wc_notify_action_t action);
@@ -49,9 +55,12 @@ class EnumMapper
   static jint mapConflictKind(svn_wc_conflict_kind_t kind);
   static jint mapConflictAction(svn_wc_conflict_action_t action);
   static jint mapConflictReason(svn_wc_conflict_reason_t reason);
-  static jint mapDepth(svn_depth_t depth);
+  static jobject mapDepth(svn_depth_t depth);
   static jint mapOperation(svn_wc_operation_t);
   static jint mapTristate(svn_tristate_t);
+ private:
+  static jobject mapEnum(const char *clazzName, const char *name);
+  static jstring getName(const char *clazzName, jobject jenum);
 };
 
 #endif  // ENUM_MAPPER_H

Modified: subversion/trunk/subversion/bindings/javahl/native/InfoCallback.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/InfoCallback.cpp?rev=924080&r1=924079&r2=924080&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/InfoCallback.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/InfoCallback.cpp Wed Mar 17 01:10:11 2010
@@ -123,7 +123,8 @@ InfoCallback::createJavaInfo2(const char
                              "ZILjava/lang/String;JJJ"
                              "Ljava/lang/String;Ljava/lang/String;"
                              "Ljava/lang/String;Ljava/lang/String;"
-                             "Ljava/lang/String;Ljava/lang/String;JJI"
+                             "Ljava/lang/String;Ljava/lang/String;JJ"
+                             "L"JAVA_PACKAGE"/Depth;"
                              "L"JAVA_PACKAGE"/ConflictDescriptor;)V");
       if (mid == 0 || JNIUtil::isJavaExceptionThrown())
         return NULL;

Modified: subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp?rev=924080&r1=924079&r2=924080&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp Wed Mar 17 01:10:11 2010
@@ -34,6 +34,7 @@
 #include "Revision.h"
 #include "RevisionRange.h"
 #include "Notify.h"
+#include "EnumMapper.h"
 #include "NotifyCallback.h"
 #include "ConflictResolverCallback.h"
 #include "ProgressListener.h"
@@ -140,7 +141,7 @@ Java_org_apache_subversion_javahl_SVNCli
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_list
 (JNIEnv *env, jobject jthis, jstring jurl, jobject jrevision,
- jobject jpegRevision, jint jdepth, jint jdirentFields,
+ jobject jpegRevision, jobject jdepth, jint jdirentFields,
  jboolean jfetchLocks, jobject jcallback)
 {
   JNIEntry(SVNClient, list);
@@ -161,13 +162,13 @@ Java_org_apache_subversion_javahl_SVNCli
     return;
 
   ListCallback callback(jcallback);
-  cl->list(url, revision, pegRevision, (svn_depth_t)jdepth,
+  cl->list(url, revision, pegRevision, EnumMapper::toDepth(jdepth),
            (int)jdirentFields, jfetchLocks ? true : false, &callback);
 }
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_status
-(JNIEnv *env, jobject jthis, jstring jpath, jint jdepth,
+(JNIEnv *env, jobject jthis, jstring jpath, jobject jdepth,
  jboolean jonServer, jboolean jgetAll, jboolean jnoIgnore,
  jboolean jignoreExternals, jobject jchangelists,
  jobject jstatusCallback)
@@ -186,7 +187,7 @@ Java_org_apache_subversion_javahl_SVNCli
     return;
 
   StatusCallback callback(jstatusCallback);
-  cl->status(path, (svn_depth_t)jdepth,
+  cl->status(path, EnumMapper::toDepth(jdepth),
              jonServer ? true:false,
              jgetAll ? true:false, jnoIgnore ? true:false,
              jignoreExternals ? true:false, changelists, &callback);
@@ -313,7 +314,7 @@ Java_org_apache_subversion_javahl_SVNCli
 JNIEXPORT jlong JNICALL
 Java_org_apache_subversion_javahl_SVNClient_checkout
 (JNIEnv *env, jobject jthis, jstring jmoduleName, jstring jdestPath,
- jobject jrevision, jobject jpegRevision, jint jdepth,
+ jobject jrevision, jobject jpegRevision, jobject jdepth,
  jboolean jignoreExternals, jboolean jallowUnverObstructions)
 {
   JNIEntry(SVNClient, checkout);
@@ -340,7 +341,7 @@ Java_org_apache_subversion_javahl_SVNCli
     return -1;
 
   return cl->checkout(moduleName, destPath, revision, pegRevision,
-                      (svn_depth_t)jdepth,
+                      EnumMapper::toDepth(jdepth),
                       jignoreExternals ? true : false,
                       jallowUnverObstructions ? true : false);
 }
@@ -466,7 +467,7 @@ Java_org_apache_subversion_javahl_SVNCli
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_revert
-(JNIEnv *env, jobject jthis, jstring jpath, jint jdepth,
+(JNIEnv *env, jobject jthis, jstring jpath, jobject jdepth,
  jobject jchangelists)
 {
   JNIEntry(SVNClient, revert);
@@ -484,12 +485,12 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return;
 
-  cl->revert(path, (svn_depth_t)jdepth, changelists);
+  cl->revert(path, EnumMapper::toDepth(jdepth), changelists);
 }
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_add
-(JNIEnv *env, jobject jthis, jstring jpath, jint jdepth,
+(JNIEnv *env, jobject jthis, jstring jpath, jobject jdepth,
  jboolean jforce, jboolean jnoIgnore, jboolean jaddParents)
 {
   JNIEntry(SVNClient, add);
@@ -503,14 +504,14 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return;
 
-  cl->add(path, (svn_depth_t)jdepth, jforce ? true : false,
+  cl->add(path, EnumMapper::toDepth(jdepth), jforce ? true : false,
           jnoIgnore ? true : false, jaddParents ? true : false);
 }
 
 JNIEXPORT jlongArray JNICALL
 Java_org_apache_subversion_javahl_SVNClient_update
 (JNIEnv *env, jobject jthis, jobject jtargets, jobject jrevision,
- jint jdepth, jboolean jdepthIsSticky, jboolean jignoreExternals,
+ jobject jdepth, jboolean jdepthIsSticky, jboolean jignoreExternals,
  jboolean jallowUnverObstructions)
 {
   JNIEntry(SVNClient, update);
@@ -529,7 +530,7 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return NULL;
 
-  return cl->update(targets, revision, (svn_depth_t)jdepth,
+  return cl->update(targets, revision, EnumMapper::toDepth(jdepth),
                     jdepthIsSticky ? true : false,
                     jignoreExternals ? true : false,
                     jallowUnverObstructions ? true : false);
@@ -537,7 +538,7 @@ Java_org_apache_subversion_javahl_SVNCli
 
 JNIEXPORT jlong JNICALL
 Java_org_apache_subversion_javahl_SVNClient_commit
-(JNIEnv *env, jobject jthis, jobject jtargets, jstring jmessage, jint jdepth,
+(JNIEnv *env, jobject jthis, jobject jtargets, jstring jmessage, jobject jdepth,
  jboolean jnoUnlock, jboolean jkeepChangelist, jobject jchangelists,
  jobject jrevpropTable)
 {
@@ -563,7 +564,7 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return -1;
 
-  return cl->commit(targets, message, (svn_depth_t)jdepth,
+  return cl->commit(targets, message, EnumMapper::toDepth(jdepth),
                     jnoUnlock ? true : false, jkeepChangelist ? true : false,
                     changelists, revprops);
 }
@@ -686,7 +687,7 @@ Java_org_apache_subversion_javahl_SVNCli
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_resolve
-(JNIEnv *env, jobject jthis, jstring jpath, jint jdepth, jint jchoice)
+(JNIEnv *env, jobject jthis, jstring jpath, jobject jdepth, jint jchoice)
 {
   JNIEntry(SVNClient, resolve);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -699,14 +700,15 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return;
 
-  cl->resolve(path, (svn_depth_t) jdepth, (svn_wc_conflict_choice_t) jchoice);
+  cl->resolve(path, EnumMapper::toDepth(jdepth),
+              (svn_wc_conflict_choice_t) jchoice);
 }
 
 JNIEXPORT jlong JNICALL
 Java_org_apache_subversion_javahl_SVNClient_doExport
 (JNIEnv *env, jobject jthis, jstring jsrcPath, jstring jdestPath,
  jobject jrevision, jobject jpegRevision, jboolean jforce,
- jboolean jignoreExternals, jint jdepth, jstring jnativeEOL)
+ jboolean jignoreExternals, jobject jdepth, jstring jnativeEOL)
 {
   JNIEntry(SVNClient, doExport);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -737,13 +739,13 @@ Java_org_apache_subversion_javahl_SVNCli
 
   return cl->doExport(srcPath, destPath, revision, pegRevision,
                       jforce ? true : false, jignoreExternals ? true : false,
-                      (svn_depth_t)jdepth, nativeEOL);
+                      EnumMapper::toDepth(jdepth), nativeEOL);
 }
 
 JNIEXPORT jlong JNICALL
 Java_org_apache_subversion_javahl_SVNClient_doSwitch
 (JNIEnv *env, jobject jthis, jstring jpath, jstring jurl, jobject jrevision,
- jobject jPegRevision, jint jdepth, jboolean jdepthIsSticky,
+ jobject jPegRevision, jobject jdepth, jboolean jdepthIsSticky,
  jboolean jignoreExternals, jboolean jallowUnverObstructions)
 {
   JNIEntry(SVNClient, doSwitch);
@@ -769,7 +771,8 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return -1;
 
-  return cl->doSwitch(path, url, revision, pegRevision, (svn_depth_t) jdepth,
+  return cl->doSwitch(path, url, revision, pegRevision,
+                      EnumMapper::toDepth(jdepth),
                       jdepthIsSticky ? true : false,
                       jignoreExternals ? true : false,
                       jallowUnverObstructions ? true : false);
@@ -778,7 +781,7 @@ Java_org_apache_subversion_javahl_SVNCli
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_doImport
 (JNIEnv *env, jobject jthis, jstring jpath, jstring jurl, jstring jmessage,
- jint jdepth, jboolean jnoIgnore, jboolean jignoreUnknownNodeTypes,
+ jobject jdepth, jboolean jnoIgnore, jboolean jignoreUnknownNodeTypes,
  jobject jrevpropTable)
 {
   JNIEntry(SVNClient, doImport);
@@ -804,7 +807,7 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return;
 
-  cl->doImport(path, url, message, (svn_depth_t)jdepth,
+  cl->doImport(path, url, message, EnumMapper::toDepth(jdepth),
                jnoIgnore ? true : false,
                jignoreUnknownNodeTypes ? true : false, revprops);
 }
@@ -833,10 +836,11 @@ Java_org_apache_subversion_javahl_SVNCli
 }
 
 JNIEXPORT void JNICALL
-Java_org_apache_subversion_javahl_SVNClient_merge__Ljava_lang_String_2Lorg_apache_subversion_javahl_Revision_2Ljava_lang_String_2Lorg_apache_subversion_javahl_Revision_2Ljava_lang_String_2ZIZZZ
+Java_org_apache_subversion_javahl_SVNClient_merge__Ljava_lang_String_2Lorg_apache_subversion_javahl_Revision_2Ljava_lang_String_2Lorg_apache_subversion_javahl_Revision_2Ljava_lang_String_2ZLorg_apache_subversion_javahl_Depth_2ZZZ
 (JNIEnv *env, jobject jthis, jstring jpath1, jobject jrevision1,
  jstring jpath2, jobject jrevision2, jstring jlocalPath, jboolean jforce,
- jint jdepth, jboolean jignoreAncestry, jboolean jdryRun, jboolean jrecordOnly)
+ jobject jdepth, jboolean jignoreAncestry, jboolean jdryRun,
+ jboolean jrecordOnly)
 {
   JNIEntry(SVNClient, merge);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -866,15 +870,15 @@ Java_org_apache_subversion_javahl_SVNCli
     return;
 
   cl->merge(path1, revision1, path2, revision2, localPath,
-            jforce ? true:false, (svn_depth_t)jdepth,
+            jforce ? true:false, EnumMapper::toDepth(jdepth),
             jignoreAncestry ? true:false, jdryRun ? true:false,
             jrecordOnly ? true:false);
 }
 
 JNIEXPORT void JNICALL
-Java_org_apache_subversion_javahl_SVNClient_merge__Ljava_lang_String_2Lorg_apache_subversion_javahl_Revision_2Ljava_util_List_2Ljava_lang_String_2ZIZZZ
+Java_org_apache_subversion_javahl_SVNClient_merge__Ljava_lang_String_2Lorg_apache_subversion_javahl_Revision_2Ljava_util_List_2Ljava_lang_String_2ZLorg_apache_subversion_javahl_Depth_2ZZZ
 (JNIEnv *env, jobject jthis, jstring jpath, jobject jpegRevision,
- jobject jranges, jstring jlocalPath, jboolean jforce, jint jdepth,
+ jobject jranges, jstring jlocalPath, jboolean jforce, jobject jdepth,
  jboolean jignoreAncestry, jboolean jdryRun, jboolean jrecordOnly)
 {
   JNIEntry(SVNClient, merge);
@@ -916,7 +920,7 @@ Java_org_apache_subversion_javahl_SVNCli
     }
 
   cl->merge(path, pegRevision, revisionRanges, localPath,
-            jforce ? true:false, (svn_depth_t)jdepth,
+            jforce ? true:false, EnumMapper::toDepth(jdepth),
             jignoreAncestry ? true:false, jdryRun ? true:false,
             jrecordOnly ? true:false);
 }
@@ -953,7 +957,7 @@ Java_org_apache_subversion_javahl_SVNCli
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_properties
 (JNIEnv *env, jobject jthis, jstring jpath, jobject jrevision,
- jobject jpegRevision, jint jdepth, jobject jchangelists,
+ jobject jpegRevision, jobject jdepth, jobject jchangelists,
  jobject jproplistCallback)
 {
   JNIEntry(SVNClient, properties);
@@ -980,14 +984,14 @@ Java_org_apache_subversion_javahl_SVNCli
     return;
 
   ProplistCallback callback(jproplistCallback);
-  cl->properties(path, revision, pegRevision, (svn_depth_t)jdepth,
+  cl->properties(path, revision, pegRevision, EnumMapper::toDepth(jdepth),
                  changelists, &callback);
 }
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_propertySet
 (JNIEnv *env, jobject jthis, jstring jpath, jstring jname, jstring jvalue,
- jint jdepth, jobject jchangelists, jboolean jforce, jobject jrevpropTable)
+ jobject jdepth, jobject jchangelists, jboolean jforce, jobject jrevpropTable)
 {
   JNIEntry(SVNClient, propertySet);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -1016,7 +1020,7 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return;
 
-  cl->propertySet(path, name, value, (svn_depth_t)jdepth, changelists,
+  cl->propertySet(path, name, value, EnumMapper::toDepth(jdepth), changelists,
                   jforce ? true:false, revprops);
 }
 
@@ -1158,7 +1162,7 @@ Java_org_apache_subversion_javahl_SVNCli
 JNIEXPORT void JNICALL Java_org_apache_subversion_javahl_SVNClient_getMergeinfoLog
 (JNIEnv *env, jobject jthis, jint jkind, jstring jpathOrUrl,
  jobject jpegRevision, jstring jmergeSourceUrl, jobject jsrcPegRevision,
- jboolean jdiscoverChangedPaths, jint jdepth, jobject jrevProps,
+ jboolean jdiscoverChangedPaths, jobject jdepth, jobject jrevProps,
  jobject jlogMessageCallback)
 {
   JNIEntry(SVNClient, getMergeinfoLog);
@@ -1193,14 +1197,14 @@ JNIEXPORT void JNICALL Java_org_apache_s
 
   cl->getMergeinfoLog((int)jkind, pathOrUrl, pegRevision, mergeSourceUrl,
                       srcPegRevision, jdiscoverChangedPaths ? true : false,
-                      (svn_depth_t)jdepth, revProps, &callback);
+                      EnumMapper::toDepth(jdepth), revProps, &callback);
 }
 
 JNIEXPORT void JNICALL
-Java_org_apache_subversion_javahl_SVNClient_diff__Ljava_lang_String_2Lorg_apache_subversion_javahl_Revision_2Ljava_lang_String_2Lorg_apache_subversion_javahl_Revision_2Ljava_lang_String_2Ljava_lang_String_2ILjava_util_Collection_2ZZZZ
+Java_org_apache_subversion_javahl_SVNClient_diff__Ljava_lang_String_2Lorg_apache_subversion_javahl_Revision_2Ljava_lang_String_2Lorg_apache_subversion_javahl_Revision_2Ljava_lang_String_2Ljava_lang_String_2Lorg_apache_subversion_javahl_Depth_2Ljava_util_Collection_2ZZZZ
 (JNIEnv *env, jobject jthis, jstring jtarget1, jobject jrevision1,
  jstring jtarget2, jobject jrevision2, jstring jrelativeToDir,
- jstring joutfileName, jint jdepth, jobject jchangelists,
+ jstring joutfileName, jobject jdepth, jobject jchangelists,
  jboolean jignoreAncestry, jboolean jnoDiffDeleted, jboolean jforce,
  jboolean jcopiesAsAdds)
 {
@@ -1240,17 +1244,17 @@ Java_org_apache_subversion_javahl_SVNCli
     return;
 
   cl->diff(target1, revision1, target2, revision2, relativeToDir, outfileName,
-           (svn_depth_t)jdepth, changelists,
+           EnumMapper::toDepth(jdepth), changelists,
            jignoreAncestry ? true:false,
            jnoDiffDeleted ? true:false, jforce ? true:false,
            jcopiesAsAdds ? true:false);
 }
 
 JNIEXPORT void JNICALL
-Java_org_apache_subversion_javahl_SVNClient_diff__Ljava_lang_String_2Lorg_apache_subversion_javahl_Revision_2Lorg_apache_subversion_javahl_Revision_2Lorg_apache_subversion_javahl_Revision_2Ljava_lang_String_2Ljava_lang_String_2ILjava_util_Collection_2ZZZZ
+Java_org_apache_subversion_javahl_SVNClient_diff__Ljava_lang_String_2Lorg_apache_subversion_javahl_Revision_2Lorg_apache_subversion_javahl_Revision_2Lorg_apache_subversion_javahl_Revision_2Ljava_lang_String_2Ljava_lang_String_2Lorg_apache_subversion_javahl_Depth_2Ljava_util_Collection_2ZZZZ
 (JNIEnv *env, jobject jthis, jstring jtarget, jobject jpegRevision,
  jobject jstartRevision, jobject jendRevision, jstring jrelativeToDir,
- jstring joutfileName, jint jdepth, jobject jchangelists,
+ jstring joutfileName, jobject jdepth, jobject jchangelists,
  jboolean jignoreAncestry, jboolean jnoDiffDeleted, jboolean jforce,
  jboolean jcopiesAsAdds)
 {
@@ -1290,16 +1294,16 @@ Java_org_apache_subversion_javahl_SVNCli
     return;
 
   cl->diff(target, pegRevision, startRevision, endRevision, relativeToDir,
-           outfileName, (svn_depth_t) jdepth, changelists,
+           outfileName, EnumMapper::toDepth(jdepth), changelists,
            jignoreAncestry ? true:false,
            jnoDiffDeleted ? true:false, jforce ? true:false,
            jcopiesAsAdds ? true:false);
 }
 
 JNIEXPORT void JNICALL
-Java_org_apache_subversion_javahl_SVNClient_diffSummarize__Ljava_lang_String_2Lorg_apache_subversion_javahl_Revision_2Ljava_lang_String_2Lorg_apache_subversion_javahl_Revision_2ILjava_util_Collection_2ZLorg_apache_subversion_javahl_callback_DiffSummaryCallback_2
+Java_org_apache_subversion_javahl_SVNClient_diffSummarize__Ljava_lang_String_2Lorg_apache_subversion_javahl_Revision_2Ljava_lang_String_2Lorg_apache_subversion_javahl_Revision_2Lorg_apache_subversion_javahl_Depth_2Ljava_util_Collection_2ZLorg_apache_subversion_javahl_callback_DiffSummaryCallback_2
 (JNIEnv *env, jobject jthis, jstring jtarget1, jobject jrevision1,
- jstring jtarget2, jobject jrevision2, jint jdepth, jobject jchangelists,
+ jstring jtarget2, jobject jrevision2, jobject jdepth, jobject jchangelists,
  jboolean jignoreAncestry, jobject jdiffSummaryReceiver)
 {
   JNIEntry(SVNClient, diffSummarize);
@@ -1335,14 +1339,14 @@ Java_org_apache_subversion_javahl_SVNCli
     return;
 
   cl->diffSummarize(target1, revision1, target2, revision2,
-                    (svn_depth_t)jdepth, changelists,
+                    EnumMapper::toDepth(jdepth), changelists,
                     jignoreAncestry ? true: false, receiver);
 }
 
 JNIEXPORT void JNICALL
-Java_org_apache_subversion_javahl_SVNClient_diffSummarize__Ljava_lang_String_2Lorg_apache_subversion_javahl_Revision_2Lorg_apache_subversion_javahl_Revision_2Lorg_apache_subversion_javahl_Revision_2ILjava_util_Collection_2ZLorg_apache_subversion_javahl_callback_DiffSummaryCallback_2
+Java_org_apache_subversion_javahl_SVNClient_diffSummarize__Ljava_lang_String_2Lorg_apache_subversion_javahl_Revision_2Lorg_apache_subversion_javahl_Revision_2Lorg_apache_subversion_javahl_Revision_2Lorg_apache_subversion_javahl_Depth_2Ljava_util_Collection_2ZLorg_apache_subversion_javahl_callback_DiffSummaryCallback_2
 (JNIEnv *env, jobject jthis, jstring jtarget, jobject jPegRevision,
- jobject jStartRevision, jobject jEndRevision, jint jdepth,
+ jobject jStartRevision, jobject jEndRevision, jobject jdepth,
  jobject jchangelists, jboolean jignoreAncestry,
  jobject jdiffSummaryReceiver)
 {
@@ -1375,7 +1379,7 @@ Java_org_apache_subversion_javahl_SVNCli
     return;
 
   cl->diffSummarize(target, pegRevision, startRevision, endRevision,
-                    (svn_depth_t)jdepth, changelists,
+                    EnumMapper::toDepth(jdepth), changelists,
                     jignoreAncestry ? true : false, receiver);
 }
 
@@ -1662,7 +1666,7 @@ Java_org_apache_subversion_javahl_SVNCli
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_addToChangelist
 (JNIEnv *env, jobject jthis, jobject jtargets, jstring jchangelist,
- jint jdepth, jobject jchangelists)
+ jobject jdepth, jobject jchangelists)
 {
   JNIEntry(SVNClient, addToChangelist);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -1684,13 +1688,13 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return;
 
-  cl->addToChangelist(targets, changelist_name, (svn_depth_t) jdepth,
+  cl->addToChangelist(targets, changelist_name, EnumMapper::toDepth(jdepth),
                       changelists);
 }
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_removeFromChangelists
-(JNIEnv *env, jobject jthis, jobject jtargets, jint jdepth,
+(JNIEnv *env, jobject jthis, jobject jtargets, jobject jdepth,
  jobject jchangelists)
 {
   JNIEntry(SVNClient, removeFromChangelist);
@@ -1709,13 +1713,13 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return;
 
-  cl->removeFromChangelists(targets, (svn_depth_t)jdepth, changelists);
+  cl->removeFromChangelists(targets, EnumMapper::toDepth(jdepth), changelists);
 }
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_getChangelists
 (JNIEnv *env, jobject jthis, jstring jroot_path, jobject jchangelists,
- jint jdepth, jobject jchangelistCallback)
+ jobject jdepth, jobject jchangelistCallback)
 {
   JNIEntry(SVNClient, getChangelist);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -1734,7 +1738,8 @@ Java_org_apache_subversion_javahl_SVNCli
     return;
 
   ChangelistCallback callback(jchangelistCallback);
-  cl->getChangelists(root_path, changelists, (svn_depth_t) jdepth, &callback);
+  cl->getChangelists(root_path, changelists, EnumMapper::toDepth(jdepth),
+                     &callback);
 }
 
 JNIEXPORT void JNICALL
@@ -1785,7 +1790,7 @@ Java_org_apache_subversion_javahl_SVNCli
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_info2
 (JNIEnv *env, jobject jthis, jstring jpath, jobject jrevision,
- jobject jpegRevision, jint jdepth, jobject jchangelists,
+ jobject jpegRevision, jobject jdepth, jobject jchangelists,
  jobject jinfoCallback)
 {
   JNIEntry(SVNClient, info2);
@@ -1812,6 +1817,6 @@ Java_org_apache_subversion_javahl_SVNCli
     return;
 
   InfoCallback callback(jinfoCallback);
-  cl->info2(path, revision, pegRevision, (svn_depth_t)jdepth, changelists,
-            &callback);
+  cl->info2(path, revision, pegRevision, EnumMapper::toDepth(jdepth),
+            changelists, &callback);
 }

Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/Depth.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/Depth.java?rev=924080&r1=924079&r2=924080&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/Depth.java (original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/Depth.java Wed Mar 17 01:10:11 2010
@@ -31,43 +31,43 @@ package org.apache.subversion.javahl;
  * concepts of depth.
  *
  */
-public final class Depth
+public enum Depth
 {
     /* The order of these depths is important: the higher the number,
        the deeper it descends.  This allows us to compare two depths
        numerically to decide which should govern. */
 
     /** Depth undetermined or ignored. */
-    public static final int unknown = -2;
+    unknown,
 
     /** Exclude (i.e, don't descend into) directory D. */
-    public static final int exclude = -1;
+    exclude,
 
     /** Just the named directory D, no entries.  Updates will not pull in
         any files or subdirectories not already present. */
-    public static final int empty = 0;
+    empty,
 
     /** D + its file children, but not subdirs.  Updates will pull in any
         files not already present, but not subdirectories. */
-    public static final int files = 1;
+    files,
 
     /** D + immediate children (D and its entries).  Updates will pull in
         any files or subdirectories not already present; those
         subdirectories' this_dir entries will have depth-empty. */
-    public static final int immediates = 2;
+    immediates,
 
     /** D + all descendants (full recursion from D).  Updates will pull
         in any files or subdirectories not already present; those
         subdirectories' this_dir entries will have depth-infinity.
         Equivalent to the pre-1.5 default update behavior. */
-    public static final int infinity = 3;
+    infinity;
 
     /**
      * @return A depth value of {@link #infinity} when
      * <code>recurse</code> is <code>true</code>, or {@link #empty}
      * otherwise.
      */
-    public static final int infinityOrEmpty(boolean recurse)
+    public static final Depth infinityOrEmpty(boolean recurse)
     {
         return (recurse ? infinity : empty);
     }
@@ -77,7 +77,7 @@ public final class Depth
      * <code>recurse</code> is <code>true</code>, or {@link #files}
      * otherwise.
      */
-    public static final int infinityOrFiles(boolean recurse)
+    public static final Depth infinityOrFiles(boolean recurse)
     {
         return (recurse ? infinity : files);
     }
@@ -87,7 +87,7 @@ public final class Depth
      * <code>recurse</code> is <code>true</code>, or {@link
      * #immediates} otherwise.
      */
-    public static final int infinityOrImmediates(boolean recurse)
+    public static final Depth infinityOrImmediates(boolean recurse)
     {
         return (recurse ? infinity : immediates);
     }
@@ -97,7 +97,7 @@ public final class Depth
      * <code>recurse</code> is <code>true</code>, or {@link #empty}
      * otherwise.
      */
-    public static final int unknownOrEmpty(boolean recurse)
+    public static final Depth unknownOrEmpty(boolean recurse)
     {
         return (recurse ? unknown : empty);
     }
@@ -107,7 +107,7 @@ public final class Depth
      * <code>recurse</code> is <code>true</code>, or {@link #files}
      * otherwise.
      */
-    public static final int unknownOrFiles(boolean recurse)
+    public static final Depth unknownOrFiles(boolean recurse)
     {
         return (recurse ? unknown : files);
     }
@@ -117,7 +117,7 @@ public final class Depth
      * <code>recurse</code> is <code>true</code>, or {@link
      * #immediates} otherwise.
      */
-    public static final int unknownOrImmediates(boolean recurse)
+    public static final Depth unknownOrImmediates(boolean recurse)
     {
         return (recurse ? unknown : immediates);
     }

Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java?rev=924080&r1=924079&r2=924080&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java (original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java Wed Mar 17 01:10:11 2010
@@ -79,7 +79,7 @@ public interface ISVNClient
      * @param changelists changelists to filter by
      * @since 1.5
      */
-    void status(String path, int depth, boolean onServer,
+    void status(String path, Depth depth, boolean onServer,
                 boolean getAll, boolean noIgnore, boolean ignoreExternals,
                 Collection<String> changelists, StatusCallback callback)
             throws ClientException;
@@ -96,7 +96,7 @@ public interface ISVNClient
      * @since 1.5
      */
     void list(String url, Revision revision, Revision pegRevision,
-              int depth, int direntFields, boolean fetchLocks,
+              Depth depth, int direntFields, boolean fetchLocks,
               ListCallback callback)
             throws ClientException;
 
@@ -168,7 +168,7 @@ public interface ISVNClient
      * @since 1.5
      */
     long checkout(String moduleName, String destPath, Revision revision,
-                  Revision pegRevision, int depth,
+                  Revision pegRevision, Depth depth,
                   boolean ignoreExternals,
                   boolean allowUnverObstructions) throws ClientException;
 
@@ -230,7 +230,7 @@ public interface ISVNClient
      * @throws ClientException
      * @since 1.5
      */
-    void revert(String path, int depth, Collection<String> changelists)
+    void revert(String path, Depth depth, Collection<String> changelists)
             throws ClientException;
 
     /**
@@ -245,7 +245,7 @@ public interface ISVNClient
      * @throws ClientException
      * @since 1.5
      */
-    void add(String path, int depth, boolean force, boolean noIgnores,
+    void add(String path, Depth depth, boolean force, boolean noIgnores,
              boolean addParents)
         throws ClientException;
 
@@ -263,7 +263,7 @@ public interface ISVNClient
      * @throws ClientException
      * @since 1.5
      */
-    long[] update(Set<String> path, Revision revision, int depth,
+    long[] update(Set<String> path, Revision revision, Depth depth,
                   boolean depthIsSticky, boolean ignoreExternals,
                   boolean allowUnverObstructions) throws ClientException;
 
@@ -284,9 +284,10 @@ public interface ISVNClient
      * @throws ClientException
      * @since 1.5
      */
-    long commit(Set<String> path, String message, int depth,
+    long commit(Set<String> path, String message, Depth depth,
                 boolean noUnlock, boolean keepChangelist,
-                Collection<String> changelists, Map<String, String> revpropTable)
+                Collection<String> changelists,
+                Map<String, String> revpropTable)
             throws ClientException;
 
     /**
@@ -368,7 +369,7 @@ public interface ISVNClient
      * @throws SubversionException If an error occurs.
      * @since 1.5
      */
-    void resolve(String path, int depth, int conflictResult)
+    void resolve(String path, Depth depth, int conflictResult)
         throws SubversionException;
 
     /**
@@ -389,7 +390,7 @@ public interface ISVNClient
      */
     long doExport(String srcPath, String destPath, Revision revision,
                   Revision pegRevision, boolean force, boolean ignoreExternals,
-                  int depth, String nativeEOL)
+                  Depth depth, String nativeEOL)
             throws ClientException;
 
     /**
@@ -407,7 +408,7 @@ public interface ISVNClient
      * @since 1.5
      */
     long doSwitch(String path, String url, Revision revision,
-                  Revision pegRevision, int depth, boolean depthIsSticky,
+                  Revision pegRevision, Depth depth, boolean depthIsSticky,
                   boolean ignoreExternals, boolean allowUnverObstructions)
             throws ClientException;
 
@@ -428,7 +429,7 @@ public interface ISVNClient
      *
      * @since 1.5
      */
-    void doImport(String path, String url, String message, int depth,
+    void doImport(String path, String url, String message, Depth depth,
                   boolean noIgnore, boolean ignoreUnknownNodeTypes,
                   Map<String, String> revpropTable)
             throws ClientException;
@@ -461,7 +462,7 @@ public interface ISVNClient
      * @since 1.5
      */
     void merge(String path1, Revision revision1, String path2,
-               Revision revision2, String localPath, boolean force, int depth,
+               Revision revision2, String localPath, boolean force, Depth depth,
                boolean ignoreAncestry, boolean dryRun, boolean recordOnly)
             throws ClientException;
 
@@ -480,7 +481,7 @@ public interface ISVNClient
      * @since 1.5
      */
     void merge(String path, Revision pegRevision, List<RevisionRange> revisions,
-               String localPath, boolean force, int depth,
+               String localPath, boolean force, Depth depth,
                boolean ignoreAncestry, boolean dryRun, boolean recordOnly)
              throws ClientException;
 
@@ -533,7 +534,7 @@ public interface ISVNClient
     void getMergeinfoLog(int kind, String pathOrUrl,
                          Revision pegRevision, String mergeSourceUrl,
                          Revision srcPegRevision, boolean discoverChangedPaths,
-                         int depth, Set<String> revProps,
+                         Depth depth, Set<String> revProps,
                          LogMessageCallback callback)
         throws ClientException;
 
@@ -556,8 +557,9 @@ public interface ISVNClient
      */
     void diff(String target1, Revision revision1, String target2,
               Revision revision2, String relativeToDir, String outFileName,
-              int depth, Collection<String> changelists, boolean ignoreAncestry,
-              boolean noDiffDeleted, boolean force, boolean copiesAsAdds)
+              Depth depth, Collection<String> changelists,
+              boolean ignoreAncestry, boolean noDiffDeleted, boolean force,
+              boolean copiesAsAdds)
             throws ClientException;
 
     /**
@@ -580,8 +582,9 @@ public interface ISVNClient
      */
     void diff(String target, Revision pegRevision, Revision startRevision,
               Revision endRevision, String relativeToDir, String outFileName,
-              int depth, Collection<String> changelists, boolean ignoreAncestry,
-              boolean noDiffDeleted, boolean force, boolean copiesAsAdds)
+              Depth depth, Collection<String> changelists,
+              boolean ignoreAncestry, boolean noDiffDeleted, boolean force,
+              boolean copiesAsAdds)
             throws ClientException;
 
     /**
@@ -607,7 +610,7 @@ public interface ISVNClient
      */
     void diffSummarize(String target1, Revision revision1,
                        String target2, Revision revision2,
-                       int depth, Collection<String> changelists,
+                       Depth depth, Collection<String> changelists,
                        boolean ignoreAncestry, DiffSummaryCallback receiver)
             throws ClientException;
 
@@ -641,7 +644,7 @@ public interface ISVNClient
      */
     void diffSummarize(String target, Revision pegRevision,
                        Revision startRevision, Revision endRevision,
-                       int depth, Collection<String> changelists,
+                       Depth depth, Collection<String> changelists,
                        boolean ignoreAncestry, DiffSummaryCallback receiver)
         throws ClientException;
 
@@ -658,7 +661,7 @@ public interface ISVNClient
      * @since 1.5
      */
     void properties(String path, Revision revision, Revision pegRevision,
-                    int depth, Collection<String> changelists,
+                    Depth depth, Collection<String> changelists,
                     ProplistCallback callback)
             throws ClientException;
 
@@ -677,7 +680,7 @@ public interface ISVNClient
      * @throws ClientException
      * @since 1.5
      */
-    void propertySet(String path, String name, String value, int depth,
+    void propertySet(String path, String name, String value, Depth depth,
                      Collection<String> changelists, boolean force,
                      Map<String, String> revpropTable)
             throws ClientException;
@@ -691,7 +694,7 @@ public interface ISVNClient
      * @throws ClientException
      * @since 1.5
      */
-    void propertyRemove(String path, String name, int depth,
+    void propertyRemove(String path, String name, Depth depth,
                         Collection<String> changelists)
             throws ClientException;
 
@@ -707,7 +710,7 @@ public interface ISVNClient
      * @throws ClientException
      * @since 1.5
      */
-    void propertyCreate(String path, String name, String value, int depth,
+    void propertyCreate(String path, String name, String value, Depth depth,
                         Collection<String> changelists, boolean force)
             throws ClientException;
 
@@ -861,7 +864,7 @@ public interface ISVNClient
      * @param changelists changelists to filter by
      * @since 1.5
      */
-    void addToChangelist(Set<String> paths, String changelist, int depth,
+    void addToChangelist(Set<String> paths, String changelist, Depth depth,
                          Collection<String> changelists)
             throws ClientException;
 
@@ -872,7 +875,7 @@ public interface ISVNClient
      * @param changelists changelists to filter by
      * @since 1.5
      */
-    void removeFromChangelists(Set<String> paths, int depth,
+    void removeFromChangelists(Set<String> paths, Depth depth,
                                Collection<String> changelists)
             throws ClientException;
 
@@ -884,8 +887,8 @@ public interface ISVNClient
      * @param callback    the callback to return the changelists through
      * @since 1.5
      */
-    void getChangelists(String rootPath, Collection<String> changelists, int depth,
-                        ChangelistCallback callback)
+    void getChangelists(String rootPath, Collection<String> changelists,
+                        Depth depth, ChangelistCallback callback)
             throws ClientException;
 
     /**
@@ -920,7 +923,8 @@ public interface ISVNClient
      * @since 1.5
      */
     void info2(String pathOrUrl, Revision revision, Revision pegRevision,
-               int depth, Collection<String> changelists, InfoCallback callback)
+               Depth depth, Collection<String> changelists,
+               InfoCallback callback)
         throws ClientException;
 
     /**

Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/Info2.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/Info2.java?rev=924080&r1=924079&r2=924080&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/Info2.java (original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/Info2.java Wed Mar 17 01:10:11 2010
@@ -175,7 +175,7 @@ public class Info2 implements java.io.Se
      * The depth of the item.
      * @since 1.6
      */
-    private int depth;
+    private Depth depth;
 
     /**
      * Info on any tree conflict of which this node is a victim.
@@ -216,7 +216,7 @@ public class Info2 implements java.io.Se
           String copyFromUrl, long copyFromRev, long textTime, long propTime,
           String checksum, String conflictOld, String conflictNew,
           String conflictWrk, String prejfile, String changelistName,
-          long workingSize, long reposSize, int depth,
+          long workingSize, long reposSize, Depth depth,
           ConflictDescriptor treeConflict)
     {
         this.path = path;
@@ -463,7 +463,7 @@ public class Info2 implements java.io.Se
      * item is a file.
      * @since New in 1.5.
      */
-    public int getDepth()
+    public Depth getDepth()
     {
         return depth;
     }

Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java?rev=924080&r1=924079&r2=924080&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java (original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java Wed Mar 17 01:10:11 2010
@@ -121,7 +121,7 @@ public class SVNClient implements ISVNCl
     /**
      * @since 1.5
      */
-    public native void status(String path, int depth, boolean onServer,
+    public native void status(String path, Depth depth, boolean onServer,
                               boolean getAll, boolean noIgnore,
                               boolean ignoreExternals,
                               Collection<String> changelists,
@@ -132,7 +132,7 @@ public class SVNClient implements ISVNCl
      * @since 1.5
      */
     public native void list(String url, Revision revision,
-                            Revision pegRevision, int depth, int direntFields,
+                            Revision pegRevision, Depth depth, int direntFields,
                             boolean fetchLocks, ListCallback callback)
             throws ClientException;
 
@@ -167,7 +167,7 @@ public class SVNClient implements ISVNCl
      */
     public native long checkout(String moduleName, String destPath,
                                 Revision revision, Revision pegRevision,
-                                int depth, boolean ignoreExternals,
+                                Depth depth, boolean ignoreExternals,
                                 boolean allowUnverObstructions)
             throws ClientException;
 
@@ -208,14 +208,14 @@ public class SVNClient implements ISVNCl
     /**
      * @since 1.5
      */
-    public native void revert(String path, int depth,
+    public native void revert(String path, Depth depth,
                               Collection<String> changelists)
             throws ClientException;
 
     /**
      * @since 1.5
      */
-    public native void add(String path, int depth, boolean force,
+    public native void add(String path, Depth depth, boolean force,
                            boolean noIgnores, boolean addParents)
         throws ClientException;
 
@@ -223,7 +223,7 @@ public class SVNClient implements ISVNCl
      * @since 1.5
      */
     public native long[] update(Set<String> paths, Revision revision,
-                                int depth, boolean depthIsSticky,
+                                Depth depth, boolean depthIsSticky,
                                 boolean ignoreExternals,
                                 boolean allowUnverObstructions)
             throws ClientException;
@@ -231,7 +231,7 @@ public class SVNClient implements ISVNCl
     /**
      * @since 1.5
      */
-    public native long commit(Set<String> paths, String message, int depth,
+    public native long commit(Set<String> paths, String message, Depth depth,
                               boolean noUnlock, boolean keepChangelist,
                               Collection<String> changelists,
                               Map<String, String> revpropTable)
@@ -272,7 +272,7 @@ public class SVNClient implements ISVNCl
     /**
      * @since 1.5
      */
-    public native void resolve(String path, int depth, int conflictResult)
+    public native void resolve(String path, Depth depth, int conflictResult)
         throws SubversionException;
 
     /**
@@ -281,14 +281,14 @@ public class SVNClient implements ISVNCl
     public native long doExport(String srcPath, String destPath,
                                 Revision revision, Revision pegRevision,
                                 boolean force, boolean ignoreExternals,
-                                int depth, String nativeEOL)
+                                Depth depth, String nativeEOL)
             throws ClientException;
 
     /**
      * @since 1.5
      */
     public native long doSwitch(String path, String url, Revision revision,
-                                Revision pegRevision, int depth,
+                                Revision pegRevision, Depth depth,
                                 boolean depthIsSticky, boolean ignoreExternals,
                                 boolean allowUnverObstructions)
             throws ClientException;
@@ -297,7 +297,7 @@ public class SVNClient implements ISVNCl
      * @since 1.5
      */
     public native void doImport(String path, String url, String message,
-                                int depth, boolean noIgnore,
+                                Depth depth, boolean noIgnore,
                                 boolean ignoreUnknownNodeTypes,
                                 Map<String, String> revpropTable)
             throws ClientException;
@@ -314,7 +314,7 @@ public class SVNClient implements ISVNCl
      */
     public native void merge(String path1, Revision revision1, String path2,
                              Revision revision2, String localPath,
-                             boolean force, int depth,
+                             boolean force, Depth depth,
                              boolean ignoreAncestry, boolean dryRun,
                              boolean recordOnly)
             throws ClientException;
@@ -324,7 +324,7 @@ public class SVNClient implements ISVNCl
      */
     public native void merge(String path, Revision pegRevision,
                              List<RevisionRange> revisions, String localPath,
-                             boolean force, int depth, boolean ignoreAncestry,
+                             boolean force, Depth depth, boolean ignoreAncestry,
                              boolean dryRun, boolean recordOnly)
             throws ClientException;
 
@@ -348,7 +348,7 @@ public class SVNClient implements ISVNCl
                                        Revision pegRevision,
                                        String mergeSourceUrl,
                                        Revision srcPegRevision,
-                                       boolean discoverChangedPaths, int depth,
+                                       boolean discoverChangedPaths, Depth depth,
                                        Set<String> revProps,
                                        LogMessageCallback callback)
         throws ClientException;
@@ -358,7 +358,7 @@ public class SVNClient implements ISVNCl
      */
     public native void diff(String target1, Revision revision1, String target2,
                             Revision revision2, String relativeToDir,
-                            String outFileName, int depth,
+                            String outFileName, Depth depth,
                             Collection<String> changelists,
                             boolean ignoreAncestry, boolean noDiffDeleted,
                             boolean force, boolean copiesAsAdds)
@@ -370,7 +370,7 @@ public class SVNClient implements ISVNCl
     public native void diff(String target, Revision pegRevision,
                             Revision startRevision, Revision endRevision,
                             String relativeToDir, String outFileName,
-                            int depth, Collection<String> changelists,
+                            Depth depth, Collection<String> changelists,
                             boolean ignoreAncestry, boolean noDiffDeleted,
                             boolean force, boolean copiesAsAdds)
             throws ClientException;
@@ -380,7 +380,7 @@ public class SVNClient implements ISVNCl
      */
     public native void diffSummarize(String target1, Revision revision1,
                                      String target2, Revision revision2,
-                                     int depth, Collection<String> changelists,
+                                     Depth depth, Collection<String> changelists,
                                      boolean ignoreAncestry,
                                      DiffSummaryCallback receiver)
             throws ClientException;
@@ -390,7 +390,7 @@ public class SVNClient implements ISVNCl
      */
     public native void diffSummarize(String target, Revision pegRevision,
                                      Revision startRevision,
-                                     Revision endRevision, int depth,
+                                     Revision endRevision, Depth depth,
                                      Collection<String> changelists,
                                      boolean ignoreAncestry,
                                      DiffSummaryCallback receiver)
@@ -400,7 +400,7 @@ public class SVNClient implements ISVNCl
      * @since 1.5
      */
     public native void properties(String path, Revision revision,
-                                  Revision pegRevision, int depth,
+                                  Revision pegRevision, Depth depth,
                                   Collection<String> changelists,
                                   ProplistCallback callback)
             throws ClientException;
@@ -409,7 +409,7 @@ public class SVNClient implements ISVNCl
      * @since 1.5
      */
     public native void propertySet(String path, String name, String value,
-                                   int depth, Collection<String> changelists,
+                                   Depth depth, Collection<String> changelists,
                                    boolean force,
                                    Map<String, String> revpropTable)
             throws ClientException;
@@ -417,7 +417,7 @@ public class SVNClient implements ISVNCl
     /**
      * @since 1.5
      */
-    public void propertyRemove(String path, String name, int depth,
+    public void propertyRemove(String path, String name, Depth depth,
                                Collection<String> changelists)
             throws ClientException
     {
@@ -428,7 +428,7 @@ public class SVNClient implements ISVNCl
      * @since 1.5
      */
     public void propertyCreate(String path, String name, String value,
-                               int depth, Collection<String> changelists,
+                               Depth depth, Collection<String> changelists,
                                boolean force)
             throws ClientException
     {
@@ -524,14 +524,14 @@ public class SVNClient implements ISVNCl
      * @since 1.5
      */
     public native void addToChangelist(Set<String> paths, String changelist,
-                                       int depth,
+                                       Depth depth,
                                        Collection<String> changelists)
             throws ClientException;
 
     /**
      * @since 1.5
      */
-    public native void removeFromChangelists(Set<String> paths, int depth,
+    public native void removeFromChangelists(Set<String> paths, Depth depth,
                                              Collection<String> changelists)
             throws ClientException;
 
@@ -540,7 +540,7 @@ public class SVNClient implements ISVNCl
      */
     public native void getChangelists(String rootPath,
                                       Collection<String> changelists,
-                                      int depth, ChangelistCallback callback)
+                                      Depth depth, ChangelistCallback callback)
             throws ClientException;
 
     /**
@@ -616,7 +616,7 @@ public class SVNClient implements ISVNCl
      * @since 1.5
      */
     public native void info2(String pathOrUrl, Revision revision,
-                             Revision pegRevision, int depth,
+                             Revision pegRevision, Depth depth,
                              Collection<String> changelists,
                              InfoCallback callback)
             throws ClientException;

Modified: subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Depth.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Depth.java?rev=924080&r1=924079&r2=924080&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Depth.java (original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Depth.java Wed Mar 17 01:10:11 2010
@@ -121,4 +121,44 @@ public final class Depth
     {
         return (recurse ? unknown : immediates);
     }
+    
+    public static org.apache.subversion.javahl.Depth toADepth(int depth)
+    {
+       switch(depth)
+       {
+            case infinity:
+                return org.apache.subversion.javahl.Depth.infinity;
+            case immediates:
+                return org.apache.subversion.javahl.Depth.immediates;
+            case files:
+                return org.apache.subversion.javahl.Depth.files;
+            case empty:
+                return org.apache.subversion.javahl.Depth.empty;
+            case exclude:
+                return org.apache.subversion.javahl.Depth.exclude;
+            case unknown:
+            default:
+                return org.apache.subversion.javahl.Depth.unknown;
+       }
+    }
+
+    public static int fromADepth(org.apache.subversion.javahl.Depth aDepth)
+    {
+        switch(aDepth)
+        {
+            case infinity:
+                return infinity;
+            case immediates:
+                return immediates;
+            case files:
+                return files;
+            case empty:
+                return empty;
+            case exclude:
+                return exclude;
+            case unknown:
+            default:
+                return unknown;
+        }
+    }
 }

Modified: subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Info2.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Info2.java?rev=924080&r1=924079&r2=924080&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Info2.java (original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Info2.java Wed Mar 17 01:10:11 2010
@@ -268,7 +268,7 @@ public class Info2 implements java.io.Se
              aInfo.getConflictOld(), aInfo.getConflictNew(),
              aInfo.getConflictWrk(), aInfo.getPrejfile(),
              aInfo.getChangelistName(), aInfo.getWorkingSize(),
-             aInfo.getReposSize(), aInfo.getDepth(),
+             aInfo.getReposSize(), Depth.fromADepth(aInfo.getDepth()),
              aInfo.getConflictDescriptor() == null ? null
                 : new ConflictDescriptor(aInfo.getConflictDescriptor()));
     }

Modified: subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java?rev=924080&r1=924079&r2=924080&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java (original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java Wed Mar 17 01:10:11 2010
@@ -187,8 +187,8 @@ public class SVNClient implements SVNCli
     {
         try
         {
-            aSVNClient.status(path, depth, onServer, getAll, noIgnore,
-                              ignoreExternals,
+            aSVNClient.status(path, Depth.toADepth(depth), onServer, getAll,
+                              noIgnore, ignoreExternals,
                               changelists == null ? null
                                 : Arrays.asList(changelists),
         new org.apache.subversion.javahl.callback.StatusCallback () {
@@ -281,7 +281,7 @@ public class SVNClient implements SVNCli
             aSVNClient.list(url,
                          revision == null ? null : revision.toApache(),
                          pegRevision == null ? null : pegRevision.toApache(),
-                         depth, direntFields, fetchLocks,
+                         Depth.toADepth(depth), direntFields, fetchLocks,
         new org.apache.subversion.javahl.callback.ListCallback () {
             public void doEntry(org.apache.subversion.javahl.DirEntry dirent,
                                 org.apache.subversion.javahl.Lock lock)
@@ -570,7 +570,8 @@ public class SVNClient implements SVNCli
             return aSVNClient.checkout(moduleName, destPath,
                           revision == null ? null : revision.toApache(),
                           pegRevision == null ? null : pegRevision.toApache(),
-                          depth, ignoreExternals, allowUnverObstructions);
+                          Depth.toADepth(depth), ignoreExternals,
+                          allowUnverObstructions);
         }
         catch (org.apache.subversion.javahl.ClientException ex)
         {
@@ -723,8 +724,8 @@ public class SVNClient implements SVNCli
     {
         try
         {
-            aSVNClient.revert(path, depth, changelists == null ? null
-                                : Arrays.asList(changelists));
+            aSVNClient.revert(path, Depth.toADepth(depth),
+                     changelists == null ? null : Arrays.asList(changelists));
         }
         catch (org.apache.subversion.javahl.ClientException ex)
         {
@@ -763,7 +764,8 @@ public class SVNClient implements SVNCli
     {
         try
         {
-            aSVNClient.add(path, depth, force, noIgnores, addParents);
+            aSVNClient.add(path, Depth.toADepth(depth), force, noIgnores,
+                   addParents);
         }
         catch (org.apache.subversion.javahl.ClientException ex)
         {
@@ -819,8 +821,8 @@ public class SVNClient implements SVNCli
         {
             return aSVNClient.update(new HashSet<String>(Arrays.asList(paths)),
                                 revision == null ? null : revision.toApache(),
-                                depth, depthIsSticky, ignoreExternals,
-                                allowUnverObstructions);
+                                Depth.toADepth(depth), depthIsSticky,
+                                ignoreExternals, allowUnverObstructions);
         }
         catch (org.apache.subversion.javahl.ClientException ex)
         {
@@ -863,7 +865,7 @@ public class SVNClient implements SVNCli
         try
         {
             return aSVNClient.commit(new HashSet<String>(Arrays.asList(paths)),
-                                     message, depth, noUnlock,
+                                     message, Depth.toADepth(depth), noUnlock,
                                      keepChangelist,
                                      changelists == null ? null
                                        : Arrays.asList(changelists),
@@ -1047,7 +1049,7 @@ public class SVNClient implements SVNCli
     {
         try
         {
-            aSVNClient.resolve(path, depth, conflictResult);
+            aSVNClient.resolve(path, Depth.toADepth(depth), conflictResult);
         }
         catch (org.apache.subversion.javahl.SubversionException ex)
         {
@@ -1097,7 +1099,8 @@ public class SVNClient implements SVNCli
             return aSVNClient.doExport(srcPath, destPath,
                           revision == null ? null : revision.toApache(),
                           pegRevision == null ? null : pegRevision.toApache(),
-                          force, ignoreExternals, depth, nativeEOL);
+                          force, ignoreExternals, Depth.toADepth(depth),
+                          nativeEOL);
         }
         catch (org.apache.subversion.javahl.ClientException ex)
         {
@@ -1132,7 +1135,7 @@ public class SVNClient implements SVNCli
             return aSVNClient.doSwitch(path, url,
                           revision == null ? null : revision.toApache(),
                           pegRevision == null ? null : pegRevision.toApache(),
-                          depth, depthIsSticky, ignoreExternals,
+                          Depth.toADepth(depth), depthIsSticky, ignoreExternals,
                           allowUnverObstructions);
         }
         catch (org.apache.subversion.javahl.ClientException ex)
@@ -1164,8 +1167,8 @@ public class SVNClient implements SVNCli
     {
         try
         {
-            aSVNClient.doImport(path, url, message, depth, noIgnore,
-                                ignoreUnknownNodeTypes, revpropTable);
+            aSVNClient.doImport(path, url, message, Depth.toADepth(depth),
+                                noIgnore, ignoreUnknownNodeTypes, revpropTable);
         }
         catch (org.apache.subversion.javahl.ClientException ex)
         {
@@ -1236,8 +1239,8 @@ public class SVNClient implements SVNCli
                              revision1 == null ? null : revision1.toApache(),
                              path2,
                              revision2 == null ? null : revision2.toApache(),
-                             localPath, force, depth, ignoreAncestry,
-                             dryRun, recordOnly);
+                             localPath, force, Depth.toADepth(depth),
+                             ignoreAncestry, dryRun, recordOnly);
         }
         catch (org.apache.subversion.javahl.ClientException ex)
         {
@@ -1282,7 +1285,7 @@ public class SVNClient implements SVNCli
 
             aSVNClient.merge(path,
                          pegRevision == null ? null : pegRevision.toApache(),
-                         aRevisions, localPath, force, depth,
+                         aRevisions, localPath, force, Depth.toADepth(depth),
                          ignoreAncestry, dryRun, recordOnly);
         }
         catch (org.apache.subversion.javahl.ClientException ex)
@@ -1383,7 +1386,7 @@ public class SVNClient implements SVNCli
                         mergeSourceUrl,
                         srcPegRevision == null ? null :
                                                     srcPegRevision.toApache(),
-                        discoverChangedPaths, depth,
+                        discoverChangedPaths, Depth.toADepth(depth),
                         revprops == null ? null
                           : new HashSet<String>(Arrays.asList(revprops)),
                         new aLogMessageCallback());
@@ -1479,7 +1482,7 @@ public class SVNClient implements SVNCli
                         revision1 == null ? null : revision1.toApache(),
                         target2,
                         revision2 == null ? null : revision2.toApache(),
-                        relativeToDir, outFileName, depth,
+                        relativeToDir, outFileName, Depth.toADepth(depth),
                         changelists == null ? null
                             : Arrays.asList(changelists),
                         ignoreAncestry, noDiffDeleted, force,
@@ -1544,7 +1547,7 @@ public class SVNClient implements SVNCli
                      pegRevision == null ? null : pegRevision.toApache(),
                      startRevision == null ? null : startRevision.toApache(),
                      endRevision == null ? null : endRevision.toApache(),
-                     relativeToDir, outFileName, depth,
+                     relativeToDir, outFileName, Depth.toADepth(depth),
                      changelists == null ? null : Arrays.asList(changelists),
                      ignoreAncestry, noDiffDeleted, force, copiesAsAdds);
         }
@@ -1572,7 +1575,7 @@ public class SVNClient implements SVNCli
                             revision1 == null ? null : revision1.toApache(),
                             target2,
                             revision2 == null ? null : revision2.toApache(),
-                            depth,
+                            Depth.toADepth(depth),
                             changelists == null ? null
                               : Arrays.asList(changelists),
                             ignoreAncestry, aReceiver);
@@ -1601,7 +1604,7 @@ public class SVNClient implements SVNCli
                        pegRevision == null ? null : pegRevision.toApache(),
                        startRevision == null ? null : startRevision.toApache(),
                        endRevision == null ? null : endRevision.toApache(),
-                       depth, changelists == null ? null
+                       Depth.toADepth(depth), changelists == null ? null
                             : Arrays.asList(changelists),
                        ignoreAncestry, aReceiver);
         }
@@ -1675,7 +1678,7 @@ public class SVNClient implements SVNCli
             aSVNClient.properties(path,
                           revision == null ? null : revision.toApache(),
                           pegRevision == null ? null : pegRevision.toApache(),
-                          depth, changelists == null ? null
+                          Depth.toADepth(depth), changelists == null ? null
                                 : Arrays.asList(changelists), callback);
         }
         catch (org.apache.subversion.javahl.ClientException ex)
@@ -1743,7 +1746,7 @@ public class SVNClient implements SVNCli
     {
         try
         {
-            aSVNClient.propertySet(path, name, value, depth,
+            aSVNClient.propertySet(path, name, value, Depth.toADepth(depth),
                                    changelists == null ? null
                                     : Arrays.asList(changelists),
                                    force, revpropTable);
@@ -2252,7 +2255,8 @@ public class SVNClient implements SVNCli
         try
         {
             aSVNClient.addToChangelist(
-                  new HashSet<String>(Arrays.asList(paths)), changelist, depth,
+                  new HashSet<String>(Arrays.asList(paths)), changelist,
+                  Depth.toADepth(depth),
                   changelists == null ? null : Arrays.asList(changelists));
         }
         catch (org.apache.subversion.javahl.ClientException ex)
@@ -2271,7 +2275,8 @@ public class SVNClient implements SVNCli
         try
         {
             aSVNClient.removeFromChangelists(
-                        new HashSet<String>(Arrays.asList(paths)), depth,
+                        new HashSet<String>(Arrays.asList(paths)),
+                        Depth.toADepth(depth),
                         changelists == null ? null
                            : Arrays.asList(changelists));
         }
@@ -2292,7 +2297,7 @@ public class SVNClient implements SVNCli
         {
             aSVNClient.getChangelists(rootPath, changelists == null ? null
                                         : Arrays.asList(changelists),
-                                      depth, callback);
+                                      Depth.toADepth(depth), callback);
         }
         catch (org.apache.subversion.javahl.ClientException ex)
         {
@@ -2460,7 +2465,7 @@ public class SVNClient implements SVNCli
             aSVNClient.info2(pathOrUrl,
                           revision == null ? null : revision.toApache(),
                           pegRevision == null ? null : pegRevision.toApache(),
-                          depth, changelists == null ? null
+                          Depth.toADepth(depth), changelists == null ? null
                             : Arrays.asList(changelists),
         new org.apache.subversion.javahl.callback.InfoCallback () {
             public void singleInfo(org.apache.subversion.javahl.Info2 aInfo)

Modified: subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java?rev=924080&r1=924079&r2=924080&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java (original)
+++ subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java Wed Mar 17 01:10:11 2010
@@ -3648,7 +3648,7 @@ public class BasicTests extends SVNTests
 
     private Map<String, byte[]> collectProperties(String path,
                                              Revision revision,
-                                             Revision pegRevision, int depth,
+                                             Revision pegRevision, Depth depth,
                                              Collection<String> changelists)
         throws ClientException
     {
@@ -3676,7 +3676,7 @@ public class BasicTests extends SVNTests
     }
 
     private DirEntry[] collectDirEntries(String url, Revision revision,
-                                         Revision pegRevision, int depth,
+                                         Revision pegRevision, Depth depth,
                                          int direntFields, boolean fetchLocks)
         throws ClientException
     {
@@ -3725,7 +3725,7 @@ public class BasicTests extends SVNTests
     }
 
     private Info2[] collectInfos(String pathOrUrl, Revision revision,
-                                 Revision pegRevision, int depth,
+                                 Revision pegRevision, Depth depth,
                                  Collection<String> changelists)
         throws ClientException
     {