[[[
Expose the depth member of svn_info_t to JavaHL's Info2 class.

* subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java
  (testBasicInfo2): Updated tests to check depth.

* subversion/bindings/javahl/native/EnumMapper.h
  (mapDepth): New function.

* subversion/bindings/javahl/native/EnumMapper.cpp
  (mapDepth): Implementation.

* subversion/bindings/javahl/native/InfoCallback.cpp
  (createJavaInfo2): Updated to call new depth-aware constructor.

* subversion/bindings/javahl/src/org/tigris/subversion/javahl/Info2.java
  (Info2): Updated constructor for depth argument.
  (getDepth, setDepth): New functions.
]]]

Index: subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java
===================================================================
--- subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java	(revision 31917)
+++ subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java	(working copy)
@@ -2095,7 +2095,7 @@
     }
 
     /**
-     * Test the baisc SVNClient.info2 functionality.
+     * Test the basic SVNClient.info2 functionality.
      * @throws Throwable
      * @since 1.2
      */
@@ -2128,6 +2128,21 @@
         Revision rev = new Revision.Number(1);
         infos = client.info2(thisTest.getWCPath(), rev, rev, true);
         assertEquals(failureMsg, 21, infos.length);
+        
+        // Examine default
+        assertEquals(Depth.unknown, infos[0].getDepth());
+        
+        // Create wc with a depth of Depth.empty
+        String secondWC = thisTest.getWCPath() + ".empty";
+        removeDirOrFile(new File(secondWC));
+        
+        client.checkout(thisTest.getUrl(), secondWC, null, null, Depth.empty,
+        		false, true);
+        
+        infos = client.info2(secondWC, null, null, false);
+        
+        // Examine that depth is Depth.empty
+        assertEquals(Depth.empty, infos[0].getDepth());
     }
 
     /**
Index: subversion/bindings/javahl/native/EnumMapper.h
===================================================================
--- subversion/bindings/javahl/native/EnumMapper.h	(revision 31917)
+++ subversion/bindings/javahl/native/EnumMapper.h	(working copy)
@@ -44,6 +44,7 @@
   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);
 };
 
 #endif  // ENUM_MAPPER_H
Index: subversion/bindings/javahl/native/InfoCallback.cpp
===================================================================
--- subversion/bindings/javahl/native/InfoCallback.cpp	(revision 31917)
+++ subversion/bindings/javahl/native/InfoCallback.cpp	(working copy)
@@ -118,7 +118,7 @@
                              "ZILjava/lang/String;JJJ"
                              "Ljava/lang/String;Ljava/lang/String;"
                              "Ljava/lang/String;Ljava/lang/String;"
-                             "Ljava/lang/String;Ljava/lang/String;JJ)V");
+                             "Ljava/lang/String;Ljava/lang/String;JJI)V");
       if (mid == 0 || JNIUtil::isJavaExceptionThrown())
         return NULL;
     }
@@ -194,7 +194,8 @@
                                   (jlong) info->prop_time, jchecksum,
                                   jconflictOld, jconflictNew, jconflictWrk,
                                   jprejfile, jchangelist,
-                                  jworkingSize, jreposSize);
+                                  jworkingSize, jreposSize,
+                                  EnumMapper::mapDepth(info->depth));
   if (JNIUtil::isJavaExceptionThrown())
     return NULL;
 
Index: subversion/bindings/javahl/native/EnumMapper.cpp
===================================================================
--- subversion/bindings/javahl/native/EnumMapper.cpp	(revision 31917)
+++ subversion/bindings/javahl/native/EnumMapper.cpp	(working copy)
@@ -34,6 +34,7 @@
 #include "../include/org_tigris_subversion_javahl_ConflictDescriptor_Kind.h"
 #include "../include/org_tigris_subversion_javahl_ConflictDescriptor_Action.h"
 #include "../include/org_tigris_subversion_javahl_ConflictDescriptor_Reason.h"
+#include "../include/org_tigris_subversion_javahl_Depth.h";
 
 /**
  * Map a C commit state flag constant to the Java constant.
@@ -429,3 +430,28 @@
       return org_tigris_subversion_javahl_ConflictDescriptor_Reason_unversioned;
     }
 }
+
+jint EnumMapper::mapDepth(svn_depth_t depth)
+{
+  switch (depth)
+	{
+	case svn_depth_unknown:
+	default:
+	  return org_tigris_subversion_javahl_Depth_unknown;
+	
+	case svn_depth_exclude:
+	  return org_tigris_subversion_javahl_Depth_exclude;
+	
+	case svn_depth_empty:
+	  return org_tigris_subversion_javahl_Depth_empty;
+	
+	case svn_depth_files:
+	  return org_tigris_subversion_javahl_Depth_files;
+	
+	case svn_depth_immediates:
+	  return org_tigris_subversion_javahl_Depth_immediates;
+	
+	case svn_depth_infinity:
+	  return org_tigris_subversion_javahl_Depth_infinity;
+	}
+}
Index: subversion/bindings/javahl/src/org/tigris/subversion/javahl/Info2.java
===================================================================
--- subversion/bindings/javahl/src/org/tigris/subversion/javahl/Info2.java	(revision 31917)
+++ subversion/bindings/javahl/src/org/tigris/subversion/javahl/Info2.java	(working copy)
@@ -167,6 +167,12 @@
     private long reposSize;
 
     /**
+     * The depth of the item.
+     * @since 1.6
+     */
+    private int depth;
+
+    /**
      * constructor to build the object by native code. See fields for
      * parameters
      * @param path
@@ -190,6 +196,7 @@
      * @param conflictNew
      * @param conflictWrk
      * @param prejfile
+     * @param depth
      */
     Info2(String path, String url, long rev, int kind, String reposRootUrl,
           String reposUUID, long lastChangedRev, long lastChangedDate,
@@ -197,7 +204,7 @@
           String copyFromUrl, long copyFromRev, long textTime, long propTime,
           String checksum, String conflictOld, String conflictNew,
           String conflictWrk, String prejfile, String changelistName,
-          long workingSize, long reposSize)
+          long workingSize, long reposSize, int depth)
     {
         this.path = path;
         this.url = url;
@@ -223,6 +230,7 @@
         this.changelistName = changelistName;
         this.workingSize = workingSize;
         this.reposSize = reposSize;
+        this.depth = depth;
     }
 
     /**
@@ -437,6 +445,15 @@
     }
 
     /**
+     * @return The depth of the directory or <code>null</code> if the
+     * item is a file.
+     */
+    public int getDepth()
+    {
+        return depth;
+    }
+
+    /**
      * @return A string representation of this info.
      */
     public String toString()
