subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dan...@apache.org
Subject svn commit: r929279 [4/20] - in /subversion/branches/svn-patch-improvements: ./ build/ac-macros/ build/generator/ build/generator/templates/ contrib/client-side/emacs/ notes/feedback/ notes/meetings/ notes/wc-ng/ subversion/ subversion/bindings/javahl/...
Date Tue, 30 Mar 2010 20:58:01 GMT
Modified: subversion/branches/svn-patch-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp (original)
+++ subversion/branches/svn-patch-improvements/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp Tue Mar 30 20:57:53 2010
@@ -25,7 +25,6 @@
  */
 
 #include "../include/org_apache_subversion_javahl_SVNClient.h"
-#include "../include/org_apache_subversion_javahl_ClientLogLevel.h"
 #include "JNIUtil.h"
 #include "JNIStackElement.h"
 #include "JNIStringHolder.h"
@@ -33,7 +32,7 @@
 #include "SVNClient.h"
 #include "Revision.h"
 #include "RevisionRange.h"
-#include "Notify.h"
+#include "EnumMapper.h"
 #include "NotifyCallback.h"
 #include "ConflictResolverCallback.h"
 #include "ProgressListener.h"
@@ -140,7 +139,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,15 +160,15 @@ 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, jobjectArray jchangelists,
+ jboolean jignoreExternals, jobject jchangelists,
  jobject jstatusCallback)
 {
   JNIEntry(SVNClient, status);
@@ -186,7 +185,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);
@@ -261,9 +260,9 @@ Java_org_apache_subversion_javahl_SVNCli
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_logMessages
 (JNIEnv *env, jobject jthis, jstring jpath, jobject jpegRevision,
- jobjectArray jranges, jboolean jstopOnCopy,
- jboolean jdisoverPaths, jboolean jincludeMergedRevisions,
- jobjectArray jrevProps, jlong jlimit, jobject jlogMessageCallback)
+ jobject jranges, jboolean jstopOnCopy, jboolean jdisoverPaths,
+ jboolean jincludeMergedRevisions, jobject jrevProps, jlong jlimit,
+ jobject jlogMessageCallback)
 {
   JNIEntry(SVNClient, logMessages);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -287,22 +286,17 @@ Java_org_apache_subversion_javahl_SVNCli
     return;
 
   // Build the revision range vector from the Java array.
-  std::vector<RevisionRange> revisionRanges;
-
-  jint arraySize = env->GetArrayLength(jranges);
+  Array ranges(jranges);
   if (JNIUtil::isExceptionThrown())
     return;
 
-  if (JNIUtil::isExceptionThrown())
-    return;
+  std::vector<RevisionRange> revisionRanges;
+  std::vector<jobject> rangeVec = ranges.vector();
 
-  for (int i = 0; i < arraySize; ++i)
+  for (std::vector<jobject>::const_iterator it = rangeVec.begin();
+        it < rangeVec.end(); ++it)
     {
-      jobject elem = env->GetObjectArrayElement(jranges, i);
-      if (JNIUtil::isExceptionThrown())
-        return;
-
-      RevisionRange revisionRange(elem);
+      RevisionRange revisionRange(*it);
       if (JNIUtil::isExceptionThrown())
         return;
 
@@ -318,7 +312,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);
@@ -345,30 +339,12 @@ 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);
 }
 
 JNIEXPORT void JNICALL
-Java_org_apache_subversion_javahl_SVNClient_notification
-(JNIEnv *env, jobject jthis, jobject jnotify)
-{
-  JNIEntry(SVNClient, notification);
-  SVNClient *cl = SVNClient::getCppObject(jthis);
-  if (cl == NULL)
-    {
-      JNIUtil::throwError(_("bad C++ this"));
-      return;
-    }
-  Notify *notify = Notify::makeCNotify(jnotify);
-  if (JNIUtil::isExceptionThrown())
-    return;
-
-  cl->notification(notify);
-}
-
-JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_notification2
 (JNIEnv *env, jobject jthis, jobject jnotify2)
 {
@@ -445,7 +421,7 @@ Java_org_apache_subversion_javahl_SVNCli
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_remove
-(JNIEnv *env, jobject jthis, jobjectArray jtargets, jstring jmessage,
+(JNIEnv *env, jobject jthis, jobject jtargets, jstring jmessage,
  jboolean jforce, jboolean keepLocal, jobject jrevpropTable)
 {
   JNIEntry(SVNClient, remove);
@@ -455,7 +431,8 @@ Java_org_apache_subversion_javahl_SVNCli
       JNIUtil::throwError(_("bad C++ this"));
       return;
     }
-  Targets targets(jtargets);
+  StringArray targetsArr(jtargets);
+  Targets targets(targetsArr);
   JNIStringHolder message(jmessage);
   if (JNIUtil::isExceptionThrown())
     return;
@@ -470,8 +447,8 @@ Java_org_apache_subversion_javahl_SVNCli
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_revert
-(JNIEnv *env, jobject jthis, jstring jpath, jint jdepth,
- jobjectArray jchangelists)
+(JNIEnv *env, jobject jthis, jstring jpath, jobject jdepth,
+ jobject jchangelists)
 {
   JNIEntry(SVNClient, revert);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -488,12 +465,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);
@@ -507,14 +484,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, jobjectArray jpath, jobject jrevision,
- jint jdepth, jboolean jdepthIsSticky, jboolean jignoreExternals,
+(JNIEnv *env, jobject jthis, jobject jtargets, jobject jrevision,
+ jobject jdepth, jboolean jdepthIsSticky, jboolean jignoreExternals,
  jboolean jallowUnverObstructions)
 {
   JNIEntry(SVNClient, update);
@@ -528,11 +505,12 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return NULL;
 
-  Targets targets(jpath);
+  StringArray targetsArr(jtargets);
+  Targets targets(targetsArr);
   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);
@@ -540,9 +518,9 @@ Java_org_apache_subversion_javahl_SVNCli
 
 JNIEXPORT jlong JNICALL
 Java_org_apache_subversion_javahl_SVNClient_commit
-(JNIEnv *env, jobject jthis, jobjectArray jtargets, jstring jmessage,
- jint jdepth, jboolean jnoUnlock, jboolean jkeepChangelist,
- jobjectArray jchangelists, jobject jrevpropTable)
+(JNIEnv *env, jobject jthis, jobject jtargets, jstring jmessage, jobject jdepth,
+ jboolean jnoUnlock, jboolean jkeepChangelist, jobject jchangelists,
+ jobject jrevpropTable)
 {
   JNIEntry(SVNClient, commit);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -551,7 +529,8 @@ Java_org_apache_subversion_javahl_SVNCli
       JNIUtil::throwError(_("bad C++ this"));
       return -1;
     }
-  Targets targets(jtargets);
+  StringArray targetsArr(jtargets);
+  Targets targets(targetsArr);
   JNIStringHolder message(jmessage);
   if (JNIUtil::isExceptionThrown())
     return -1;
@@ -565,14 +544,14 @@ 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);
 }
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_copy
-(JNIEnv *env, jobject jthis, jobjectArray jcopySources, jstring jdestPath,
+(JNIEnv *env, jobject jthis, jobject jcopySources, jstring jdestPath,
  jstring jmessage, jboolean jcopyAsChild, jboolean jmakeParents,
  jboolean jignoreExternals, jobject jrevpropTable)
 {
@@ -584,13 +563,19 @@ Java_org_apache_subversion_javahl_SVNCli
       JNIUtil::throwError(_("bad C++ this"));
       return;
     }
-  CopySources copySources(jcopySources);
+  Array copySrcArray(jcopySources);
+  if (JNIUtil::isExceptionThrown())
+    return;
+
+  CopySources copySources(copySrcArray);
   if (JNIUtil::isExceptionThrown())
     return;
+
   JNIStringHolder destPath(jdestPath);
   if (JNIUtil::isExceptionThrown())
     return;
-  JNIStringHolder message(jmessage);
+
+JNIStringHolder message(jmessage);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -605,7 +590,7 @@ Java_org_apache_subversion_javahl_SVNCli
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_move
-(JNIEnv *env, jobject jthis, jobjectArray jsrcPaths, jstring jdestPath,
+(JNIEnv *env, jobject jthis, jobject jsrcPaths, jstring jdestPath,
  jstring jmessage, jboolean jforce, jboolean jmoveAsChild,
  jboolean jmakeParents, jobject jrevpropTable)
 {
@@ -617,7 +602,8 @@ Java_org_apache_subversion_javahl_SVNCli
       JNIUtil::throwError(_("bad C++ this"));
       return;
     }
-  Targets srcPaths(jsrcPaths);
+  StringArray srcPathArr(jsrcPaths);
+  Targets srcPaths(srcPathArr);
   if (JNIUtil::isExceptionThrown())
     return;
   JNIStringHolder destPath(jdestPath);
@@ -638,7 +624,7 @@ Java_org_apache_subversion_javahl_SVNCli
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_mkdir
-(JNIEnv *env, jobject jthis, jobjectArray jtargets, jstring jmessage,
+(JNIEnv *env, jobject jthis, jobject jtargets, jstring jmessage,
  jboolean jmakeParents, jobject jrevpropTable)
 {
   JNIEntry(SVNClient, mkdir);
@@ -648,7 +634,8 @@ Java_org_apache_subversion_javahl_SVNCli
       JNIUtil::throwError(_("bad C++ this"));
       return;
     }
-  Targets targets(jtargets);
+  StringArray targetsArr(jtargets);
+  Targets targets(targetsArr);
   JNIStringHolder message(jmessage);
   if (JNIUtil::isExceptionThrown())
     return;
@@ -680,7 +667,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, jobject jchoice)
 {
   JNIEntry(SVNClient, resolve);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -693,14 +680,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),
+              EnumMapper::toConflictChoice(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);
@@ -731,13 +719,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);
@@ -763,7 +751,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);
@@ -772,7 +761,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);
@@ -798,7 +787,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);
 }
@@ -827,10 +816,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);
@@ -860,16 +850,16 @@ 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_2_3Lorg_apache_subversion_javahl_RevisionRange_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,
- jobjectArray jranges, jstring jlocalPath, jboolean jforce,
- jint jdepth, jboolean jignoreAncestry, jboolean jdryRun, jboolean jrecordOnly)
+ jobject jranges, jstring jlocalPath, jboolean jforce, jobject jdepth,
+ jboolean jignoreAncestry, jboolean jdryRun, jboolean jrecordOnly)
 {
   JNIEntry(SVNClient, merge);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -892,22 +882,17 @@ Java_org_apache_subversion_javahl_SVNCli
     return;
 
   // Build the revision range vector from the Java array.
-  std::vector<RevisionRange> revisionRanges;
-
-  jint arraySize = env->GetArrayLength(jranges);
+  Array ranges(jranges);
   if (JNIUtil::isExceptionThrown())
     return;
 
-  if (JNIUtil::isExceptionThrown())
-    return;
+  std::vector<RevisionRange> revisionRanges;
+  std::vector<jobject> rangeVec = ranges.vector();
 
-  for (int i = 0; i < arraySize; ++i)
+  for (std::vector<jobject>::const_iterator it = rangeVec.begin();
+        it < rangeVec.end(); ++it)
     {
-      jobject elem = env->GetObjectArrayElement(jranges, i);
-      if (JNIUtil::isExceptionThrown())
-        return;
-
-      RevisionRange revisionRange(elem);
+      RevisionRange revisionRange(*it);
       if (JNIUtil::isExceptionThrown())
         return;
 
@@ -915,7 +900,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);
 }
@@ -952,7 +937,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, jobjectArray jchangelists,
+ jobject jpegRevision, jobject jdepth, jobject jchangelists,
  jobject jproplistCallback)
 {
   JNIEntry(SVNClient, properties);
@@ -979,15 +964,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, jobjectArray jchangelists, jboolean jforce,
- jobject jrevpropTable)
+ jobject jdepth, jobject jchangelists, jboolean jforce, jobject jrevpropTable)
 {
   JNIEntry(SVNClient, propertySet);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -1016,7 +1000,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);
 }
 
@@ -1156,9 +1140,9 @@ Java_org_apache_subversion_javahl_SVNCli
 }
 
 JNIEXPORT void JNICALL Java_org_apache_subversion_javahl_SVNClient_getMergeinfoLog
-(JNIEnv *env, jobject jthis, jint jkind, jstring jpathOrUrl,
+(JNIEnv *env, jobject jthis, jobject jkind, jstring jpathOrUrl,
  jobject jpegRevision, jstring jmergeSourceUrl, jobject jsrcPegRevision,
- jboolean jdiscoverChangedPaths, jint jdepth, jobjectArray jrevProps,
+ jboolean jdiscoverChangedPaths, jobject jdepth, jobject jrevProps,
  jobject jlogMessageCallback)
 {
   JNIEntry(SVNClient, getMergeinfoLog);
@@ -1191,16 +1175,17 @@ JNIEXPORT void JNICALL Java_org_apache_s
 
   LogMessageCallback callback(jlogMessageCallback);
 
-  cl->getMergeinfoLog((int)jkind, pathOrUrl, pegRevision, mergeSourceUrl,
+  cl->getMergeinfoLog(EnumMapper::toMergeinfoLogKind(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_2I_3Ljava_lang_String_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, jobjectArray jchangelists,
+ jstring joutfileName, jobject jdepth, jobject jchangelists,
  jboolean jignoreAncestry, jboolean jnoDiffDeleted, jboolean jforce,
  jboolean jcopiesAsAdds)
 {
@@ -1240,17 +1225,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_2I_3Ljava_lang_String_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, jobjectArray jchangelists,
+ jstring joutfileName, jobject jdepth, jobject jchangelists,
  jboolean jignoreAncestry, jboolean jnoDiffDeleted, jboolean jforce,
  jboolean jcopiesAsAdds)
 {
@@ -1290,16 +1275,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_2I_3Ljava_lang_String_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, jobjectArray jchangelists,
+ jstring jtarget2, jobject jrevision2, jobject jdepth, jobject jchangelists,
  jboolean jignoreAncestry, jobject jdiffSummaryReceiver)
 {
   JNIEntry(SVNClient, diffSummarize);
@@ -1335,15 +1320,15 @@ 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_2I_3Ljava_lang_String_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,
- jobjectArray jchangelists, jboolean jignoreAncestry,
+ jobject jStartRevision, jobject jEndRevision, jobject jdepth,
+ jobject jchangelists, jboolean jignoreAncestry,
  jobject jdiffSummaryReceiver)
 {
   JNIEntry(SVNClient, diffSummarize);
@@ -1375,7 +1360,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);
 }
 
@@ -1472,26 +1457,10 @@ JNIEXPORT void JNICALL Java_org_apache_s
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_enableLogging
-(JNIEnv *env, jclass jclazz, jint jlogLevel, jstring jpath)
+(JNIEnv *env, jclass jclazz, jobject jlogLevel, jstring jpath)
 {
   JNIEntryStatic(SVNClient, enableLogging);
-  int cLevel = JNIUtil::noLog;
-  switch(jlogLevel)
-    {
-    case org_apache_subversion_javahl_ClientLogLevel_NoLog:
-      cLevel = JNIUtil::noLog;
-      break;
-    case org_apache_subversion_javahl_ClientLogLevel_ErrorLog:
-      cLevel = JNIUtil::errorLog;
-      break;
-    case org_apache_subversion_javahl_ClientLogLevel_ExceptionLog:
-      cLevel = JNIUtil::exceptionLog;
-      break;
-    case org_apache_subversion_javahl_ClientLogLevel_EntryLog:
-      cLevel = JNIUtil::entryLog;
-      break;
-    }
-  JNIUtil::initLogFile(cLevel, jpath);
+  JNIUtil::initLogFile(EnumMapper::toLogLevel(jlogLevel), jpath);
 
 }
 
@@ -1661,8 +1630,8 @@ Java_org_apache_subversion_javahl_SVNCli
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_addToChangelist
-(JNIEnv *env, jobject jthis, jobjectArray jtargets, jstring jchangelist,
- jint jdepth, jobjectArray jchangelists)
+(JNIEnv *env, jobject jthis, jobject jtargets, jstring jchangelist,
+ jobject jdepth, jobject jchangelists)
 {
   JNIEntry(SVNClient, addToChangelist);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -1671,7 +1640,8 @@ Java_org_apache_subversion_javahl_SVNCli
       JNIUtil::throwError("bad C++ this");
       return;
     }
-  Targets targets(jtargets);
+  StringArray targetsArr(jtargets);
+  Targets targets(targetsArr);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -1683,14 +1653,14 @@ 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, jobjectArray jtargets, jint jdepth,
- jobjectArray jchangelists)
+(JNIEnv *env, jobject jthis, jobject jtargets, jobject jdepth,
+ jobject jchangelists)
 {
   JNIEntry(SVNClient, removeFromChangelist);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -1699,7 +1669,8 @@ Java_org_apache_subversion_javahl_SVNCli
       JNIUtil::throwError("bad C++ this");
       return;
     }
-  Targets targets(jtargets);
+  StringArray targetsArr(jtargets);
+  Targets targets(targetsArr);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -1707,13 +1678,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, jobjectArray jchangelists,
- jint jdepth, jobject jchangelistCallback)
+(JNIEnv *env, jobject jthis, jstring jroot_path, jobject jchangelists,
+ jobject jdepth, jobject jchangelistCallback)
 {
   JNIEntry(SVNClient, getChangelist);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -1732,12 +1703,13 @@ 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
 Java_org_apache_subversion_javahl_SVNClient_lock
-(JNIEnv *env, jobject jthis, jobjectArray jtargets, jstring jcomment,
+(JNIEnv *env, jobject jthis, jobject jtargets, jstring jcomment,
  jboolean jforce)
 {
   JNIEntry(SVNClient, lock);
@@ -1747,7 +1719,8 @@ Java_org_apache_subversion_javahl_SVNCli
       JNIUtil::throwError("bad C++ this");
       return;
     }
-  Targets targets(jtargets);
+  StringArray targetsArr(jtargets);
+  Targets targets(targetsArr);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -1760,7 +1733,7 @@ Java_org_apache_subversion_javahl_SVNCli
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_unlock
-(JNIEnv *env, jobject jthis, jobjectArray jtargets, jboolean jforce)
+(JNIEnv *env, jobject jthis, jobject jtargets, jboolean jforce)
 {
   JNIEntry(SVNClient, unlock);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -1770,7 +1743,8 @@ Java_org_apache_subversion_javahl_SVNCli
       return;
     }
 
-  Targets targets(jtargets);
+  StringArray targetsArr(jtargets);
+  Targets targets(targetsArr);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -1781,7 +1755,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, jobjectArray jchangelists,
+ jobject jpegRevision, jobject jdepth, jobject jchangelists,
  jobject jinfoCallback)
 {
   JNIEntry(SVNClient, info2);
@@ -1808,6 +1782,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/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ChangePath.java
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ChangePath.java?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ChangePath.java (original)
+++ subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ChangePath.java Tue Mar 30 20:57:53 2010
@@ -42,14 +42,17 @@ public class ChangePath implements java.
      * @param action            action performed
      * @param nodeKind          the kind of the changed path
      */
-    ChangePath(String path, long copySrcRevision, String copySrcPath,
-               char action, int nodeKind)
+    public ChangePath(String path, long copySrcRevision, String copySrcPath,
+               char action, NodeKind nodeKind, Tristate textMods,
+               Tristate propMods)
     {
         this.path = path;
         this.copySrcRevision = copySrcRevision;
         this.copySrcPath = copySrcPath;
         this.action = action;
         this.nodeKind = nodeKind;
+        this.textMods = textMods;
+        this.propMods = propMods;
     }
 
     /** Path of commited item */
@@ -65,7 +68,13 @@ public class ChangePath implements java.
     private char action;
 
     /** The kind of the changed path. */
-    private int nodeKind;
+    private NodeKind nodeKind;
+
+    /** Whether the text was modified. */
+    private Tristate textMods;
+
+    /** Whether the properties were modified. */
+    private Tristate propMods;
 
     /**
      * Retrieve the path to the commited item
@@ -107,8 +116,26 @@ public class ChangePath implements java.
      * Retrieve the node kind
      * @return  the node kind
      */
-    public int getNodeKind()
+    public NodeKind getNodeKind()
     {
         return nodeKind;
     }
+
+    /**
+     * Retrieve whether the text was modified.
+     * @return   the text mod state
+     */
+    public Tristate getTextMods()
+    {
+        return textMods;
+    }
+
+    /**
+     * Retrieve whether the properties were modified.
+     * @return   the prop mod state
+     */
+    public Tristate getPropMods()
+    {
+        return propMods;
+    }
 }

Modified: subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitItem.java
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitItem.java?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitItem.java (original)
+++ subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitItem.java Tue Mar 30 20:57:53 2010
@@ -45,7 +45,7 @@ public class CommitItem implements java.
     /**
      * the kind node (file or directory)
      */
-    int nodeKind;
+    NodeKind nodeKind;
 
     /**
      * the kind of change to be commited (See CommitItemStateFlages)
@@ -76,7 +76,7 @@ public class CommitItem implements java.
      * @param cu    copy source url
      * @param r     revision number
      */
-    CommitItem(String p, int nk, int sf, String u, String cu, long r)
+    public CommitItem(String p, NodeKind nk, int sf, String u, String cu, long r)
     {
         path = p;
         nodeKind = nk;
@@ -99,7 +99,7 @@ public class CommitItem implements java.
      * return the node kind of the commit item
      * @return the node kind. Look at the NodeKind class.
      */
-    public int getNodeKind()
+    public NodeKind getNodeKind()
     {
         return nodeKind;
     }

Modified: subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictDescriptor.java
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictDescriptor.java?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictDescriptor.java (original)
+++ subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictDescriptor.java Tue Mar 30 20:57:53 2010
@@ -33,37 +33,17 @@ public class ConflictDescriptor
 {
     private String path;
 
-    /**
-     * @see .Kind
-     */
-    private int conflictKind;
+    private Kind conflictKind;
 
-    /**
-     * @see NodeKind
-     */
-    private int nodeKind;
+    private NodeKind nodeKind;
 
     private String propertyName;
 
     private boolean isBinary;
     private String mimeType;
 
-    // svn_wc_conflict_description_t also provides us with an
-    // svn_wc_adm_access_t *.  However, that is only useful to
-    // JNI-based APIs written against svn_wc.h.  So, we don't (yet)
-    // expose that to JavaHL.  We could expose it is a long
-    // representing the memory address of the struct, which could be
-    // passed off to other JNI APIs.
-
-    /**
-     * @see #Action
-     */
-    private int action;
-
-    /**
-     * @see #Reason
-     */
-    private int reason;
+    private Action action;
+    private Reason reason;
 
     // File paths, present only when the conflict involves the merging
     // of two files descended from a common ancestor, here are the
@@ -79,7 +59,7 @@ public class ConflictDescriptor
     /**
      * @see Operation
      */
-    private int operation;
+    private Operation operation;
 
     /**
      * @see ConflictVersion
@@ -92,9 +72,9 @@ public class ConflictDescriptor
     private ConflictVersion srcRightVersion;
 
     /** This constructor should only be called from JNI code. */
-    ConflictDescriptor(String path, int conflictKind, int nodeKind,
+    public ConflictDescriptor(String path, Kind conflictKind, NodeKind nodeKind,
                        String propertyName, boolean isBinary, String mimeType,
-                       int action, int reason, int operation,
+                       Action action, Reason reason, Operation operation,
                        String basePath, String theirPath,
                        String myPath, String mergedPath,
                        ConflictVersion srcLeft, ConflictVersion srcRight)
@@ -121,18 +101,12 @@ public class ConflictDescriptor
         return path;
     }
 
-    /**
-     * @see .Kind
-     */
-    public int getKind()
+    public Kind getKind()
     {
         return conflictKind;
     }
 
-    /**
-     * @see NodeKind
-     */
-    public int getNodeKind()
+    public NodeKind getNodeKind()
     {
         return nodeKind;
     }
@@ -152,18 +126,12 @@ public class ConflictDescriptor
         return mimeType;
     }
 
-    /**
-     * @see .Action
-     */
-    public int getAction()
+    public Action getAction()
     {
         return action;
     }
 
-    /**
-     * @see .Reason
-     */
-    public int getReason()
+    public Reason getReason()
     {
         return reason;
     }
@@ -188,7 +156,7 @@ public class ConflictDescriptor
         return mergedPath;
     }
 
-    public int getOperation()
+    public Operation getOperation()
     {
         return operation;
     }
@@ -204,76 +172,92 @@ public class ConflictDescriptor
     }
 
     /**
-     * Poor man's enum for <code>svn_wc_conflict_kind_t</code>.
+     * Rich man's enum for <code>svn_wc_conflict_kind_t</code>.
      */
-    public final class Kind
+    public enum Kind
     {
-        /**
-         * Attempting to change text or props.
-         */
-        public static final int text = 0;
+        /** Attempting to change text or props.  */
+        text,
 
-        /**
-         * Attempting to add object.
-         */
-        public static final int property = 1;
+        /** Attempting to add object.  */
+        property,
+
+        /** Tree conflict.  */
+        tree;
     }
 
     /**
-     * Poor man's enum for <code>svn_wc_conflict_action_t</code>.
+     * Rich man's enum for <code>svn_wc_conflict_action_t</code>.
      */
-    public final class Action
+    public enum Action
     {
         /**
          * Attempting to change text or props.
          */
-        public static final int edit = 0;
+        edit,
 
         /**
          * Attempting to add object.
          */
-        public static final int add = 1;
+        add,
 
         /**
          * Attempting to delete object.
          */
-        public static final int delete = 2;
+        delete;
     }
 
     /**
-     * Poor man's enum for <code>svn_wc_conflict_reason_t</code>.
+     * Rich man's enum for <code>svn_wc_conflict_reason_t</code>.
      */
-    public final class Reason
+    public enum Reason
     {
         /**
          * Local edits are already present.
          */
-        public static final int edited = 0;
+        edited,
 
         /**
          * Another object is in the way.
          */
-        public static final int obstructed = 1;
+        obstructed,
 
         /**
          * Object is already schedule-delete.
          */
-        public static final int deleted = 2;
+        deleted,
 
         /**
          * Object is unknown or missing.
          */
-        public static final int missing = 3;
+        missing,
 
         /**
          * Object is unversioned.
          */
-        public static final int unversioned = 4;
+        unversioned,
 
         /**
          * Object is already added or schedule-add.
          * @since New in 1.6.
          */
-        public static final int added = 5;
+        added;
+    }
+
+    public enum Operation
+    {
+        /* none */
+        none,
+
+        /* update */
+        update,
+
+        /* switch */
+        /* Note: this is different that svn_wc.h, because 'switch' is a
+        * reserved word in java  :(  */
+        switched,
+
+        /* merge */
+        merge;
     }
 }

Modified: subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictResult.java
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictResult.java?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictResult.java (original)
+++ subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictResult.java Tue Mar 30 20:57:53 2010
@@ -33,50 +33,10 @@ package org.apache.subversion.javahl;
 public class ConflictResult
 {
     /**
-     * Nothing done to resolve the conflict; conflict remains.
-     */
-    public static final int postpone = 0;
-
-    /**
-     * Resolve the conflict by choosing the base file.
-     */
-    public static final int chooseBase = 1;
-
-    /**
-     * Resolve the conflict by choosing the incoming (repository)
-     * version of the object.
-     */
-    public static final int chooseTheirsFull = 2;
-
-    /**
-     * Resolve the conflict by choosing own (local) version of the
-     * object.
-     */
-    public static final int chooseMineFull = 3;
-
-    /**
-     * Resolve the conflict by choosing the incoming (repository)
-     * version of the object (for conflicted hunks only).
-     */
-    public static final int chooseTheirsConflict = 4;
-
-    /**
-     * Resolve the conflict by choosing own (local) version of the
-     * object (for conflicted hunks only).
-     */
-    public static final int chooseMineConflict = 5;
-
-    /**
-     * Resolve the conflict by choosing the merged object
-     * (potentially manually edited).
-     */
-    public static final int chooseMerged = 6;
-
-    /**
      * A value corresponding to the
      * <code>svn_wc_conflict_choice_t</code> enum.
      */
-    private int choice;
+    private Choice choice;
 
     /**
      * The path to the result of a merge, or <code>null</code>.
@@ -86,7 +46,7 @@ public class ConflictResult
     /**
      * Create a new conflict result instace.
      */
-    public ConflictResult(int choice, String mergedPath)
+    public ConflictResult(Choice choice, String mergedPath)
     {
       this.choice = choice;
       this.mergedPath = mergedPath;
@@ -96,7 +56,7 @@ public class ConflictResult
      * @return A value corresponding to the
      * <code>svn_wc_conflict_choice_t</code> enum.
      */
-    public int getChoice()
+    public Choice getChoice()
     {
         return choice;
     }
@@ -108,4 +68,43 @@ public class ConflictResult
     {
         return mergedPath;
     }
+
+    public enum Choice
+    {
+        /** Nothing done to resolve the conflict; conflict remains.  */
+        postpone,
+
+        /** Resolve the conflict by choosing the base file.  */
+        chooseBase,
+
+        /**
+         * Resolve the conflict by choosing the incoming (repository)
+         * version of the object.
+         */
+        chooseTheirsFull,
+
+        /**
+         * Resolve the conflict by choosing own (local) version of the
+         * object.
+         */
+        chooseMineFull,
+
+        /**
+         * Resolve the conflict by choosing the incoming (repository)
+         * version of the object (for conflicted hunks only).
+         */
+        chooseTheirsConflict,
+
+        /**
+         * Resolve the conflict by choosing own (local) version of the
+         * object (for conflicted hunks only).
+         */
+        chooseMineConflict,
+
+        /**
+         * Resolve the conflict by choosing the merged object
+         * (potentially manually edited).
+         */
+        chooseMerged;
+    }
 }

Modified: subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictVersion.java
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictVersion.java?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictVersion.java (original)
+++ subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictVersion.java Tue Mar 30 20:57:53 2010
@@ -35,14 +35,11 @@ public class ConflictVersion
     private long pegRevision;
     private String pathInRepos;
 
-    /**
-     * @see NodeKind
-     */
-    private int nodeKind;
+    private NodeKind nodeKind;
 
     /** This constructor should only be called from JNI code. */
-    ConflictVersion(String reposURL, long pegRevision, String pathInRepos,
-                    int nodeKind)
+    public ConflictVersion(String reposURL, long pegRevision, String pathInRepos,
+                    NodeKind nodeKind)
     {
         this.reposURL = reposURL;
         this.pegRevision = pegRevision;
@@ -68,13 +65,13 @@ public class ConflictVersion
     /**
      * @see NodeKind
      */
-    public int getNodeKind()
+    public NodeKind getNodeKind()
     {
         return nodeKind;
     }
 
     public String toString() {
-        return "(" + NodeKind.getNodeKindName(nodeKind) + ") " + reposURL +
+        return "(" + nodeKind + ") " + reposURL +
         "/" + pathInRepos + "@" + pegRevision;
     }
 }

Modified: subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/Depth.java
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/Depth.java?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/Depth.java (original)
+++ subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/Depth.java Tue Mar 30 20:57:53 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/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/DiffSummary.java
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/DiffSummary.java?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/DiffSummary.java (original)
+++ subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/DiffSummary.java Tue Mar 30 20:57:53 2010
@@ -45,22 +45,22 @@ public class DiffSummary extends EventOb
 
     private DiffKind diffKind;
     private boolean propsChanged;
-    private int nodeKind;
+    private NodeKind nodeKind;
 
     /**
      * This constructor is to be used by the native code.
      *
      * @param path The path we have a diff for.
      * @param diffKind The kind of diff this describes.
-     * @param propChanged Whether any properties have changed.
+     * @param propsChanged Whether any properties have changed.
      * @param nodeKind The type of node which changed (corresponds to
      * the {@link NodeKind} enumeration).
      */
-    DiffSummary(String path, int diffKind, boolean propsChanged,
-                int nodeKind)
+    public DiffSummary(String path, DiffKind diffKind, boolean propsChanged,
+                NodeKind nodeKind)
     {
         super(path);
-        this.diffKind = DiffKind.getInstance(diffKind);
+        this.diffKind = diffKind;
         this.propsChanged = propsChanged;
         this.nodeKind = nodeKind;
     }
@@ -93,7 +93,7 @@ public class DiffSummary extends EventOb
      * @return The type of node which changed (corresponds to the
      * {@link NodeKind} enumeration).
      */
-    public int getNodeKind()
+    public NodeKind getNodeKind()
     {
         return this.nodeKind;
     }
@@ -109,78 +109,26 @@ public class DiffSummary extends EventOb
     /**
      * The type of difference being summarized.
      */
-    public static class DiffKind
+    public enum DiffKind
     {
-        // Corresponds to the svn_client_diff_summarize_kind_t enum.
-        public static DiffKind NORMAL = new DiffKind(0);
-        public static DiffKind ADDED = new DiffKind(1);
-        public static DiffKind MODIFIED = new DiffKind(2);
-        public static DiffKind DELETED = new DiffKind(3);
-
-        private int kind;
-
-        private DiffKind(int kind)
-        {
-            this.kind = kind;
-        }
+        normal      ("normal"),
+        added       ("added"),
+        modified    ("modified"),
+        deleted     ("deleted");
 
         /**
-         * @return The appropriate instance.
-         * @throws IllegalArgumentException If the diff kind is not
-         * recognized.
+         * The description of the action.
          */
-        public static DiffKind getInstance(int diffKind)
-            throws IllegalArgumentException
-        {
-            switch (diffKind)
-            {
-            case 0:
-                return NORMAL;
-            case 1:
-                return ADDED;
-            case 2:
-                return MODIFIED;
-            case 3:
-                return DELETED;
-            default:
-                throw new IllegalArgumentException("Diff kind " + diffKind +
-                                                   " not recognized");
-            }
-        }
+        private String description;
 
-        /**
-         * @param diffKind A DiffKind for comparison.
-         * @return Whether both DiffKinds are of the same type.
-         */
-        public boolean equals(Object diffKind)
-        {
-            return (((DiffKind) diffKind).kind == this.kind);
-        }
-
-        public int hashCode()
+        DiffKind(String description)
         {
-            // Equivalent to new Integer(this.kind).hashCode().
-            return this.kind;
+            this.description = description;
         }
 
-        /**
-         * @return A textual representation of the type of diff.
-         */
         public String toString()
         {
-            switch (this.kind)
-            {
-            case 0:
-                return "normal";
-            case 1:
-                return "added";
-            case 2:
-                return "modified";
-            case 3:
-                return "deleted";
-            default:
-                return "unknown";
-            }
+            return description;
         }
     }
 }

Modified: subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/DirEntry.java
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/DirEntry.java?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/DirEntry.java (original)
+++ subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/DirEntry.java Tue Mar 30 20:57:53 2010
@@ -104,7 +104,7 @@ public class DirEntry implements java.io
     /**
      * the kind of the node (directory or file)
      */
-    private int nodeKind;
+    private NodeKind nodeKind;
 
     /**
      * the size of the file
@@ -133,7 +133,7 @@ public class DirEntry implements java.io
      * @param lastChanged           the date of the last change
      * @param lastAuthor            the author of the last change
      */
-    DirEntry(String path, String absPath, int nodeKind, long size,
+    public DirEntry(String path, String absPath, NodeKind nodeKind, long size,
              boolean hasProps, long lastChangedRevision, long lastChanged,
              String lastAuthor)
     {
@@ -214,7 +214,7 @@ public class DirEntry implements java.io
      * Return the kind of entry (file or directory)
      * @return the kind of the entry (file or directory) see NodeKind class
      */
-    public int getNodeKind()
+    public NodeKind getNodeKind()
     {
         return nodeKind;
     }

Modified: subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java (original)
+++ subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java Tue Mar 30 20:57:53 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;
 
@@ -136,7 +136,7 @@ public interface ISVNClient
      * Retrieve the log messages for an item.
      * @param path          path or url to get the log message for.
      * @param pegRevision   revision to interpret path
-     * @param revisionRanges an array of revision ranges to show
+     * @param ranges        an array of revision ranges to show
      * @param stopOnCopy    do not continue on copy operations
      * @param discoverPath  returns the paths of the changed items in the
      *                      returned objects
@@ -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, ConflictResult.Choice 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;
 
@@ -530,10 +531,10 @@ public interface ISVNClient
      * @param callback               the object to receive the log messages
      * @since 1.7
      */
-    void getMergeinfoLog(int kind, String pathOrUrl,
+    void getMergeinfoLog(MergeinfoLogKind 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/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/Info.java
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/Info.java?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/Info.java (original)
+++ subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/Info.java Tue Mar 30 20:57:53 2010
@@ -53,10 +53,10 @@ public class Info implements java.io.Ser
     private String repository;
 
     /** the schedule on the next commit (see NodeKind) */
-    private int schedule;
+    private Info2.ScheduleKind schedule;
 
     /** the kind of node (file or directory or unknown */
-    private int nodeKind;
+    private NodeKind nodeKind;
 
     /** the author of the last commit before base */
     private String author;
@@ -113,10 +113,10 @@ public class Info implements java.io.Ser
      * @param copyRev               copy source revision
      * @param copyUrl               copy source url
      */
-    Info(String name, String url, String uuid, String repository, int schedule,
-         int nodeKind, String author, long revision, long lastChangedRevision,
-         Date lastChangedDate, Date lastDateTextUpdate,
-         Date lastDatePropsUpdate, boolean copied,
+    public Info(String name, String url, String uuid, String repository,
+         Info2.ScheduleKind schedule, NodeKind nodeKind, String author,
+         long revision, long lastChangedRevision, Date lastChangedDate,
+         Date lastDateTextUpdate, Date lastDatePropsUpdate, boolean copied,
          boolean deleted, boolean absent, boolean incomplete, long copyRev,
          String copyUrl)
     {
@@ -180,7 +180,7 @@ public class Info implements java.io.Ser
      * Retrieves the schedule of the next commit
      * @return schedule of the next commit
      */
-    public int getSchedule()
+    public Info2.ScheduleKind getSchedule()
     {
         return schedule;
     }
@@ -189,7 +189,7 @@ public class Info implements java.io.Ser
      * Retrieves the nodeKind
      * @return nodeKind
      */
-    public int getNodeKind()
+    public NodeKind getNodeKind()
     {
         return nodeKind;
     }

Modified: subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/Info2.java
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/Info2.java?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/Info2.java (original)
+++ subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/Info2.java Tue Mar 30 20:57:53 2010
@@ -57,9 +57,9 @@ public class Info2 implements java.io.Se
     private long rev;
 
     /**
-     * the item kinds (see NodeKind)
+     * the item kinds
      */
-    private int kind;
+    private NodeKind kind;
 
     /**
      * the root URL of the repository
@@ -97,9 +97,9 @@ public class Info2 implements java.io.Se
     private boolean hasWcInfo;
 
     /**
-     * the scheduled operation at next commit (see ScheduleKind)
+     * the scheduled operation at next commit
      */
-    private int schedule;
+    private ScheduleKind schedule;
 
     /**
      * if the item was copied, the source url
@@ -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.
@@ -210,14 +210,14 @@ public class Info2 implements java.io.Se
      * @param depth
      * @param treeConflict
      */
-    Info2(String path, String url, long rev, int kind, String reposRootUrl,
-          String reposUUID, long lastChangedRev, long lastChangedDate,
-          String lastChangedAuthor, Lock lock, boolean hasWcInfo, int schedule,
-          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,
-          ConflictDescriptor treeConflict)
+    public Info2(String path, String url, long rev, NodeKind kind,
+          String reposRootUrl, String reposUUID, long lastChangedRev,
+          long lastChangedDate, String lastChangedAuthor, Lock lock,
+          boolean hasWcInfo, ScheduleKind schedule, String copyFromUrl,
+          long copyFromRev, long textTime, long propTime, String checksum,
+          String conflictOld, String conflictNew, String conflictWrk,
+          String prejfile, String changelistName, long workingSize,
+          long reposSize, Depth depth, ConflictDescriptor treeConflict)
     {
         this.path = path;
         this.url = url;
@@ -274,7 +274,7 @@ public class Info2 implements java.io.Se
     /**
      * return the item kinds (see NodeKind)
      */
-    public int getKind()
+    public NodeKind getKind()
     {
         return kind;
     }
@@ -341,7 +341,7 @@ public class Info2 implements java.io.Se
     /**
      * return the scheduled operation at next commit (see ScheduleKind)
      */
-    public int getSchedule()
+    public ScheduleKind getSchedule()
     {
         return schedule;
     }
@@ -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;
     }
@@ -484,4 +484,19 @@ public class Info2 implements java.io.Se
     {
         return getUrl();
     }
+
+    public enum ScheduleKind
+    {
+        /** exists, but uninteresting */
+        normal,
+
+        /** Slated for addition */
+        add,
+
+        /** Slated for deletion */
+        delete,
+
+        /** Slated for replacement (delete + add) */
+        replace;
+    }
 }

Modified: subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/Lock.java
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/Lock.java?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/Lock.java (original)
+++ subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/Lock.java Tue Mar 30 20:57:53 2010
@@ -80,7 +80,7 @@ public class Lock implements java.io.Ser
      * @param creationDate      the date when the lock was created
      * @param expirationDate    the date when the lock will expire
      */
-    Lock(String owner, String path, String token, String comment,
+    public Lock(String owner, String path, String token, String comment,
          long creationDate, long expirationDate)
     {
         this.owner = owner;

Modified: subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/MergeinfoLogKind.java
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/MergeinfoLogKind.java?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/MergeinfoLogKind.java (original)
+++ subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/MergeinfoLogKind.java Tue Mar 30 20:57:53 2010
@@ -27,11 +27,11 @@ package org.apache.subversion.javahl;
  * Constants to specify which collection of revisions to report in
  * getMergeinfoLog.
  */
-public interface MergeinfoLogKind
+public enum MergeinfoLogKind
 {
     /** Revisions eligible for merging from merge-source to merge-target. */
-    public static final int eligible = 0;
+    eligible,
 
     /** Revisions already merged from merge-source to merge-target. */
-    public static final int merged = 1;
+    merged;
 }

Modified: subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java (original)
+++ subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java Tue Mar 30 20:57:53 2010
@@ -33,9 +33,19 @@ package org.apache.subversion.javahl;
 public class NativeResources
 {
     /**
-     * Version information about the underlying native libraries.
+     * @return Version information about the underlying native libraries.
      */
-    static public Version version;
+    private static Version version;
+
+    /**
+     * Returns version information about the underlying native libraries.
+     *
+     * @return version
+     *
+     */
+    public static Version getVersion() {
+        return version;
+    }
 
     /**
      * Load the required native library whose path is specified by the

Modified: subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/NodeKind.java
URL: http://svn.apache.org/viewvc/subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/NodeKind.java?rev=929279&r1=929278&r2=929279&view=diff
==============================================================================
--- subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/NodeKind.java (original)
+++ subversion/branches/svn-patch-improvements/subversion/bindings/javahl/src/org/apache/subversion/javahl/NodeKind.java Tue Mar 30 20:57:53 2010
@@ -24,40 +24,34 @@
 package org.apache.subversion.javahl;
 
 /**
- * Poor mans enum for svn_node_kind_t
+ * Rich man's enum for svn_node_kind_t
  */
-public final class NodeKind
+public enum NodeKind
 {
     /* absent */
-    public static final int none = 0;
+    none    ("none"),
 
     /* regular file */
-    public static final int file = 1;
+    file    ("file"),
 
     /* directory */
-    public static final int dir = 2;
+    dir     ("dir"),
 
     /* something's here, but we don't know what */
-    public static final int unknown = 3;
+    unknown ("unknown");
 
     /**
-     * mapping for the constants to text
+     * The description of the node kind.
      */
-    private static final String[] statusNames =
+    private String description;
+
+    NodeKind(String description)
     {
-        "none",
-        "file",
-        "dir ",
-        "unknown",
-    };
+        this.description = description;
+    }
 
-    /**
-     * Returns the textual representation for a NodeKind
-     * @param kind  kind of node
-     * @return english text
-     */
-    public static final String getNodeKindName(int kind)
+    public String toString()
     {
-        return statusNames[kind];
+        return description;
     }
 }



Mime
View raw message