Index: subversion/libsvn_ra/ra_loader.c
===================================================================
--- subversion/libsvn_ra/ra_loader.c	(revision 17006)
+++ subversion/libsvn_ra/ra_loader.c	(working copy)
@@ -443,6 +443,19 @@
                                    fetched_rev, props, pool);
 }
 
+svn_error_t *svn_ra_get_dir2 (svn_ra_session_t *session,
+                              const char *path,
+                              svn_revnum_t revision,
+                              apr_uint32_t dirent_fields,
+                              apr_hash_t **dirents,
+                              svn_revnum_t *fetched_rev,
+                              apr_hash_t **props,
+                              apr_pool_t *pool)
+{
+  return session->vtable->get_dir2 (session, path, revision, dirent_fields,
+                                    dirents, fetched_rev, props, pool);
+}
+
 svn_error_t *svn_ra_do_update (svn_ra_session_t *session,
                                const svn_ra_reporter2_t **reporter,
                                void **report_baton,
Index: subversion/libsvn_ra/ra_loader.h
===================================================================
--- subversion/libsvn_ra/ra_loader.h	(revision 17006)
+++ subversion/libsvn_ra/ra_loader.h	(working copy)
@@ -203,6 +203,14 @@
                              apr_hash_t **locks,
                              const char *path,
                              apr_pool_t *pool);
+  svn_error_t *(*get_dir2) (svn_ra_session_t *session,
+                            const char *path,
+                            svn_revnum_t revision,
+                            apr_uint32_t dirent_fields,
+                            apr_hash_t **dirents,
+                            svn_revnum_t *fetched_rev,
+                            apr_hash_t **props,
+                            apr_pool_t *pool);
 } svn_ra__vtable_t;
 
 /* The RA session object. */
Index: subversion/include/svn_types.h
===================================================================
--- subversion/include/svn_types.h	(revision 17006)
+++ subversion/include/svn_types.h	(working copy)
@@ -199,7 +199,44 @@
   svn_recursive
 };
 
+/**
+ * It is sometimes convenient to indicate which parts of an @c svn_dirent_t
+ * object you are actually interested in, so that calculating and sending
+ * the data corresponding to the other fields can be avoided.  These values
+ * can be used for that purpose.
+ *
+ * @defgroup svn_dirent_fields dirent fields
+ * @{
+ */
 
+/** An indication that you are interested in the @c kind field */
+#define SVN_DIRENT_KIND        0x00001
+
+/** An indication that you are interested in the @c size field */
+#define SVN_DIRENT_SIZE        0x00002
+
+/** An indication that you are interested in the @c has_props field */
+#define SVN_DIRENT_HAS_PROPS   0x00004
+
+/** An indication that you are interested in the @c created_rev field */
+#define SVN_DIRENT_CREATED_REV 0x00008
+
+/** An indication that you are interested in the @c time field */
+#define SVN_DIRENT_TIME        0x00010
+
+/** An indication that you are interested in the @c last_author field */
+#define SVN_DIRENT_LAST_AUTHOR 0x00020
+
+/** A combination of all the dirent fields */
+#define SVN_DIRENT_ALL (SVN_DIRENT_KIND | \
+                        SVN_DIRENT_SIZE | \
+                        SVN_DIRENT_HAS_PROPS | \
+                        SVN_DIRENT_CREATED_REV | \
+                        SVN_DIRENT_TIME | \
+                        SVN_DIRENT_LAST_AUTHOR)
+
+/** @} */
+
 /** A general subversion directory entry. */
 typedef struct svn_dirent_t
 {
Index: subversion/include/svn_client.h
===================================================================
--- subversion/include/svn_client.h	(revision 17006)
+++ subversion/include/svn_client.h	(working copy)
@@ -2146,7 +2146,31 @@
  * If @a recurse is true (and @a path_or_url is a directory) this will
  * be a recursive operation.
  *
+ * @a dirent_fields controls which fields in the @c svn_dirent_t's are
+ * filled in.  To have them totally filled in use @c SVN_DIRENT_ALL, 
+ * otherwise simply binary or together the combination of @c SVN_DIRENT_
+ * fields you care about.
+ *
+ * @since New in 1.4.
+ */
+svn_error_t *
+svn_client_ls4 (apr_hash_t **dirents,
+                apr_hash_t **locks,
+                const char *path_or_url,
+                const svn_opt_revision_t *peg_revision,
+                const svn_opt_revision_t *revision,
+                svn_boolean_t recurse,
+                apr_uint32_t dirent_fields,
+                svn_client_ctx_t *ctx,
+                apr_pool_t *pool);
+
+/**
+ * Same as svn_client_ls4(), but always passes @c SVN_DIRENT_ALL for
+ * the @a dirent_fields argument.
+ *
  * @since New in 1.3.
+ *
+ * @deprecated Provided for backward compatibility with the 1.3 API.
  */
 svn_error_t *
 svn_client_ls3 (apr_hash_t **dirents,
@@ -2157,7 +2181,6 @@
                 svn_boolean_t recurse,
                 svn_client_ctx_t *ctx,
                 apr_pool_t *pool);
-
 /**
  * Same as svn_client_ls3(), but always passes a NULL lock hash.
  *
Index: subversion/include/svn_ra.h
===================================================================
--- subversion/include/svn_ra.h	(revision 17006)
+++ subversion/include/svn_ra.h	(working copy)
@@ -657,6 +657,11 @@
  * entry names (<tt>const char *</tt>), and the values dirents 
  * (<tt>@c svn_dirent_t *</tt>).  Use @a pool for all allocations.
  *
+ * @a dirent_fields controls which portions of the <tt>@c svn_dirent_t</tt>
+ * objects are filled in.  To have them completely filled in just pass
+ * @c SVN_DIRENT_ALL, otherwise pass the binary or of all the @c SVN_DIRENT_
+ * fields you would like to have returned to you.
+ *
  * @a path is interpreted relative to the URL in @a session.
  *
  * If @a revision is @c SVN_INVALID_REVNUM (meaning 'head') and
@@ -671,7 +676,24 @@
  * etc.)  The keys are <tt>const char *</tt>, values are 
  * <tt>@c svn_string_t *</tt>.
  *
+ * @since New in 1.4.
+ */
+svn_error_t *svn_ra_get_dir2 (svn_ra_session_t *session,
+                              const char *path,
+                              svn_revnum_t revision,
+                              apr_uint32_t dirent_fields,
+                              apr_hash_t **dirents,
+                              svn_revnum_t *fetched_rev,
+                              apr_hash_t **props,
+                              apr_pool_t *pool);
+
+/**
+ * Similar to @c svn_ra_get_dir2, but with @c SVN_DIRENT_ALL for the
+ * @a dirent_fields parameter.
+ *
  * @since New in 1.2.
+ *
+ * @deprecated Provided for compatibility with the 1.3 API.
  */
 svn_error_t *svn_ra_get_dir (svn_ra_session_t *session,
                              const char *path,
Index: subversion/libsvn_ra_local/ra_plugin.c
===================================================================
--- subversion/libsvn_ra_local/ra_plugin.c	(revision 17006)
+++ subversion/libsvn_ra_local/ra_plugin.c	(working copy)
@@ -947,13 +947,14 @@
 
 /* Getting a directory's entries */
 static svn_error_t *
-svn_ra_local__get_dir (svn_ra_session_t *session,
-                       const char *path,
-                       svn_revnum_t revision,
-                       apr_hash_t **dirents,
-                       svn_revnum_t *fetched_rev,
-                       apr_hash_t **props,
-                       apr_pool_t *pool)
+svn_ra_local__get_dir2 (svn_ra_session_t *session,
+                        const char *path,
+                        svn_revnum_t revision,
+                        apr_uint32_t dirent_fields,
+                        apr_hash_t **dirents,
+                        svn_revnum_t *fetched_rev,
+                        apr_hash_t **props,
+                        apr_pool_t *pool)
 {
   svn_fs_root_t *root;
   svn_revnum_t youngest_rev;
@@ -1050,6 +1051,19 @@
 }
 
 static svn_error_t *
+svn_ra_local__get_dir (svn_ra_session_t *session,
+                       const char *path,
+                       svn_revnum_t revision,
+                       apr_hash_t **dirents,
+                       svn_revnum_t *fetched_rev,
+                       apr_hash_t **props,
+                       apr_pool_t *pool)
+{
+  return svn_ra_local__get_dir2 (session, path, revision, SVN_DIRENT_ALL,
+                                 dirents, fetched_rev, props, pool);
+}
+
+static svn_error_t *
 svn_ra_local__get_locations (svn_ra_session_t *session,
                              apr_hash_t **locations,
                              const char *relative_path,
@@ -1271,6 +1285,7 @@
   svn_ra_local__unlock,
   svn_ra_local__get_lock,
   svn_ra_local__get_locks,
+  svn_ra_local__get_dir2,
 };
 
 
Index: subversion/libsvn_client/ls.c
===================================================================
--- subversion/libsvn_client/ls.c	(revision 17006)
+++ subversion/libsvn_client/ls.c	(working copy)
@@ -28,7 +28,8 @@
 #include "svn_private_config.h"
 
 static svn_error_t *
-get_dir_contents (apr_hash_t *dirents,
+get_dir_contents (apr_uint32_t dirent_fields,
+                  apr_hash_t *dirents,
                   const char *dir,
                   svn_revnum_t rev,
                   svn_ra_session_t *ra_session,
@@ -41,8 +42,8 @@
   apr_hash_index_t *hi;
 
   /* Get the directory's entries, but not its props. */
-  SVN_ERR (svn_ra_get_dir (ra_session, dir, rev, &tmpdirents, 
-                           NULL, NULL, pool));
+  SVN_ERR (svn_ra_get_dir2 (ra_session, dir, rev, dirent_fields, &tmpdirents, 
+                            NULL, NULL, pool));
 
   if (ctx->cancel_func)
     SVN_ERR (ctx->cancel_func (ctx->cancel_baton));
@@ -64,20 +65,21 @@
       apr_hash_set (dirents, path, APR_HASH_KEY_STRING, val);
 
       if (recurse && the_ent->kind == svn_node_dir)
-        SVN_ERR (get_dir_contents (dirents, path, rev, ra_session,
-                                   recurse, ctx, pool));
+        SVN_ERR (get_dir_contents (dirent_fields, dirents, path, rev,
+                                   ra_session, recurse, ctx, pool));
     }
 
   return SVN_NO_ERROR;
 }
 
 svn_error_t *
-svn_client_ls3 (apr_hash_t **dirents,
+svn_client_ls4 (apr_hash_t **dirents,
                 apr_hash_t **locks,
                 const char *path_or_url,
                 const svn_opt_revision_t *peg_revision,
                 const svn_opt_revision_t *revision,
-                svn_boolean_t recurse,               
+                svn_boolean_t recurse,
+                apr_uint32_t dirent_fields,
                 svn_client_ctx_t *ctx,
                 apr_pool_t *pool)
 {
@@ -105,8 +107,8 @@
     {
       *dirents = apr_hash_make (pool);
 
-      SVN_ERR (get_dir_contents (*dirents, "", rev, ra_session, recurse,
-                                 ctx, pool));
+      SVN_ERR (get_dir_contents (dirent_fields, *dirents, "", rev, ra_session,
+                                 recurse, ctx, pool));
     }
   else if (url_kind == svn_node_file)
     {
@@ -184,6 +186,19 @@
   return SVN_NO_ERROR;
 }
 
+svn_error_t *
+svn_client_ls3 (apr_hash_t **dirents,
+                apr_hash_t **locks,
+                const char *path_or_url,
+                const svn_opt_revision_t *peg_revision,
+                const svn_opt_revision_t *revision,
+                svn_boolean_t recurse,
+                svn_client_ctx_t *ctx,
+                apr_pool_t *pool)
+{
+  return svn_client_ls4 (dirents, locks, path_or_url, peg_revision,
+                         revision, recurse, SVN_DIRENT_ALL, ctx, pool);
+}
 
 svn_error_t *
 svn_client_ls2 (apr_hash_t **dirents,
Index: subversion/clients/cmdline/ls-cmd.c
===================================================================
--- subversion/clients/cmdline/ls-cmd.c	(revision 17006)
+++ subversion/clients/cmdline/ls-cmd.c	(working copy)
@@ -278,6 +278,7 @@
   apr_array_header_t *targets;
   int i;
   apr_pool_t *subpool = svn_pool_create (pool); 
+  apr_uint32_t dirent_fields;
 
   SVN_ERR (svn_opt_args_to_target_array2 (&targets, os, 
                                           opt_state->targets, pool));
@@ -307,6 +308,11 @@
                                    "mode"));
     }
 
+  if (opt_state->verbose || opt_state->xml)
+    dirent_fields = SVN_DIRENT_ALL;
+  else
+    dirent_fields = SVN_DIRENT_KIND; /* the only thing we actually need... */
+
   /* For each target, try to list it. */
   for (i = 0; i < targets->nelts; i++)
     {
@@ -324,12 +330,13 @@
       SVN_ERR (svn_opt_parse_path (&peg_revision, &truepath, target,
                                    subpool));
 
-      SVN_ERR (svn_client_ls3 (&dirents,
+      SVN_ERR (svn_client_ls4 (&dirents,
                                (opt_state->xml || opt_state->verbose)
                                  ? &locks : NULL,
                                truepath, &peg_revision,
                                &(opt_state->start_revision),
-                               opt_state->recursive, ctx, subpool));
+                               opt_state->recursive, dirent_fields,
+                               ctx, subpool));
 
       if (opt_state->xml)
         SVN_ERR (print_dirents_xml (dirents, locks, truepath, ctx, subpool));
Index: subversion/libsvn_ra_svn/client.c
===================================================================
--- subversion/libsvn_ra_svn/client.c	(revision 17006)
+++ subversion/libsvn_ra_svn/client.c	(working copy)
@@ -1018,11 +1018,13 @@
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *ra_svn_get_dir(svn_ra_session_t *session, const char *path,
-                                   svn_revnum_t rev, apr_hash_t **dirents,
-                                   svn_revnum_t *fetched_rev,
-                                   apr_hash_t **props,
-                                   apr_pool_t *pool)
+static svn_error_t *ra_svn_get_dir2(svn_ra_session_t *session,
+                                    const char *path, svn_revnum_t rev,
+                                    apr_uint32_t dirent_fields,
+                                    apr_hash_t **dirents,
+                                    svn_revnum_t *fetched_rev,
+                                    apr_hash_t **props,
+                                    apr_pool_t *pool)
 {
   ra_svn_session_baton_t *sess_baton = session->priv;
   svn_ra_svn_conn_t *conn = sess_baton->conn;
@@ -1035,8 +1037,9 @@
   apr_uint64_t size;
   svn_dirent_t *dirent;
 
-  SVN_ERR(svn_ra_svn_write_cmd(conn, pool, "get-dir", "c(?r)bb", path,
-                               rev, (props != NULL), (dirents != NULL)));
+  SVN_ERR(svn_ra_svn_write_cmd(conn, pool, "get-dir", "c(?r)bbn", path,
+                               rev, (props != NULL), (dirents != NULL),
+                               (apr_uint32_t) dirent_fields));
   SVN_ERR(handle_auth_request(sess_baton, pool));
   SVN_ERR(svn_ra_svn_read_cmd_response(conn, pool, "rll", &rev, &proplist,
                                        &dirlist));
@@ -1075,6 +1078,16 @@
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *ra_svn_get_dir(svn_ra_session_t *session,
+                                   const char *path, svn_revnum_t rev,
+                                   apr_hash_t **dirents,
+                                   svn_revnum_t *fetched_rev,
+                                   apr_hash_t **props,
+                                   apr_pool_t *pool)
+{
+  return ra_svn_get_dir2(session, path, rev, SVN_DIRENT_ALL, dirents,
+                         fetched_rev, props, pool);
+}
 
 static svn_error_t *ra_svn_update(svn_ra_session_t *session,
                                   const svn_ra_reporter2_t **reporter,
@@ -1959,6 +1972,7 @@
   ra_svn_unlock,
   ra_svn_get_lock,
   ra_svn_get_locks,
+  ra_svn_get_dir2,
 };
 
 svn_error_t *
Index: subversion/libsvn_ra_dav/ra_dav.h
===================================================================
--- subversion/libsvn_ra_dav/ra_dav.h	(revision 17006)
+++ subversion/libsvn_ra_dav/ra_dav.h	(working copy)
@@ -245,6 +245,16 @@
   apr_hash_t **props,
   apr_pool_t *pool);
 
+svn_error_t *svn_ra_dav__get_dir2(
+  svn_ra_session_t *session,
+  const char *path,
+  svn_revnum_t revision,
+  apr_uint32_t dirent_fields,
+  apr_hash_t **dirents,
+  svn_revnum_t *fetched_rev,
+  apr_hash_t **props,
+  apr_pool_t *pool);
+
 svn_error_t * svn_ra_dav__abort_commit(
  void *session_baton,
  void *edit_baton);
Index: subversion/libsvn_ra_dav/session.c
===================================================================
--- subversion/libsvn_ra_dav/session.c	(revision 17006)
+++ subversion/libsvn_ra_dav/session.c	(working copy)
@@ -1593,6 +1593,7 @@
   svn_ra_dav__unlock,
   svn_ra_dav__get_lock,
   svn_ra_dav__get_locks,
+  svn_ra_dav__get_dir2,
 };
 
 svn_error_t *
Index: subversion/libsvn_ra_dav/fetch.c
===================================================================
--- subversion/libsvn_ra_dav/fetch.c	(revision 17006)
+++ subversion/libsvn_ra_dav/fetch.c	(working copy)
@@ -18,6 +18,8 @@
 
 
 
+#include <assert.h>
+
 #define APR_WANT_STRFUNC
 #include <apr_want.h> /* for strcmp() */
 
@@ -921,13 +923,14 @@
 }
 
 
-svn_error_t *svn_ra_dav__get_dir(svn_ra_session_t *session,
-                                 const char *path,
-                                 svn_revnum_t revision,
-                                 apr_hash_t **dirents,
-                                 svn_revnum_t *fetched_rev,
-                                 apr_hash_t **props,
-                                 apr_pool_t *pool)
+svn_error_t *svn_ra_dav__get_dir2(svn_ra_session_t *session,
+                                  const char *path,
+                                  svn_revnum_t revision,
+                                  apr_uint32_t dirent_fields,
+                                  apr_hash_t **dirents,
+                                  svn_revnum_t *fetched_rev,
+                                  apr_hash_t **props,
+                                  apr_pool_t *pool)
 {
   svn_ra_dav_resource_t *rsrc;
   apr_hash_index_t *hi;
@@ -936,6 +939,7 @@
   apr_size_t final_url_n_components;
   svn_ra_dav__session_t *ras = session->priv;
   const char *url = svn_path_url_add_component (ras->url->data, path, pool);
+  apr_pool_t *subpool = svn_pool_create (pool);
 
   /* If the revision is invalid (head), then we're done.  Just fetch
      the public URL, because that will always get HEAD. */
@@ -963,11 +967,82 @@
 
   if (dirents)
     {
+      ne_propname *which_props;
+
+      /* if we didn't ask for the has_props field, we can get individual
+         properties. */
+      if ((SVN_DIRENT_HAS_PROPS & dirent_fields) == 0)
+        {
+          apr_size_t num_props = 1; /* start with one for the final NULL */
+
+          if (dirent_fields & SVN_DIRENT_KIND)
+            ++num_props;
+
+          if (dirent_fields & SVN_DIRENT_SIZE)
+            ++num_props;
+
+          if (dirent_fields & SVN_DIRENT_CREATED_REV)
+            ++num_props;
+
+          if (dirent_fields & SVN_DIRENT_TIME)
+            ++num_props;
+
+          if (dirent_fields & SVN_DIRENT_LAST_AUTHOR)
+            ++num_props;
+
+          which_props = apr_pcalloc (subpool,
+                                     num_props * sizeof (ne_propname));
+
+          /* first, null out the end... */
+          which_props[num_props].nspace = NULL;
+          which_props[num_props--].name = NULL;
+
+          /* Now, go through and fill in the ones we care about, moving along
+             the array as we go. */
+
+          if (dirent_fields & SVN_DIRENT_KIND)
+            {
+              which_props[num_props].nspace = "DAV:";
+              which_props[num_props--].name = "resourcetype";
+            }
+
+          if (dirent_fields & SVN_DIRENT_SIZE)
+            {
+              which_props[num_props].nspace = "DAV:";
+              which_props[num_props--].name = "getcontentlength";
+            }
+
+          if (dirent_fields & SVN_DIRENT_CREATED_REV)
+            {
+              which_props[num_props].nspace = "DAV:";
+              which_props[num_props--].name = "version-name";
+            }
+
+          if (dirent_fields & SVN_DIRENT_TIME)
+            {
+              which_props[num_props].nspace = "DAV:";
+              which_props[num_props--].name = "creationdate";
+            }
+
+          if (dirent_fields & SVN_DIRENT_LAST_AUTHOR)
+            {
+              which_props[num_props].nspace = "DAV:";
+              which_props[num_props--].name = "creator-displayname";
+            }
+
+          assert (num_props == 0);
+        }
+      else
+        {
+          /* get all props, since we need them all to do has_props */
+          which_props = NULL;
+        }
+
       /* Just like Nautilus, Cadaver, or any other browser, we do a
          PROPFIND on the directory of depth 1. */
       SVN_ERR( svn_ra_dav__get_props(&resources, ras->sess,
                                      final_url, NE_DEPTH_ONE,
-                                     NULL, NULL /* all props */, pool) );
+                                     NULL, which_props, pool) );
       
       /* Count the number of path components in final_url. */
       final_url_n_components = svn_path_component_count(final_url);
@@ -1000,57 +1075,76 @@
             continue;
           
           entry = apr_pcalloc (pool, sizeof(*entry));
-          
-          /* node kind */
-          entry->kind = resource->is_collection ? svn_node_dir : svn_node_file;
-          
-          /* size */
-          propval = apr_hash_get(resource->propset,
-                                 SVN_RA_DAV__PROP_GETCONTENTLENGTH,
-                                 APR_HASH_KEY_STRING);
-          if (propval == NULL)
-            entry->size = 0;
-          else
-            entry->size = svn__atoui64(propval->data);
-          
-          /* does this resource contain any 'svn' or 'custom' properties,
-             i.e.  ones actually created and set by the user? */
-          for (h = apr_hash_first (pool, resource->propset);
-               h; h = apr_hash_next (h))
+
+          if (dirent_fields & SVN_DIRENT_KIND)
             {
-              const void *kkey;
-              void *vval;
-              apr_hash_this (h, &kkey, NULL, &vval);
+              /* node kind */
+              entry->kind = resource->is_collection ? svn_node_dir
+                                                    : svn_node_file;
+            }
+
+          if (dirent_fields & SVN_DIRENT_SIZE)
+            {
+              /* size */
+              propval = apr_hash_get(resource->propset,
+                                     SVN_RA_DAV__PROP_GETCONTENTLENGTH,
+                                     APR_HASH_KEY_STRING);
+              if (propval == NULL)
+                entry->size = 0;
+              else
+                entry->size = svn__atoui64(propval->data);
+            }
+         
+          if (dirent_fields & SVN_DIRENT_HAS_PROPS)
+            { 
+              /* does this resource contain any 'svn' or 'custom' properties,
+                 i.e.  ones actually created and set by the user? */
+              for (h = apr_hash_first (pool, resource->propset);
+                   h; h = apr_hash_next (h))
+                {
+                  const void *kkey;
+                  void *vval;
+                  apr_hash_this (h, &kkey, NULL, &vval);
               
-              if (strncmp((const char *)kkey, SVN_DAV_PROP_NS_CUSTOM,
-                          sizeof(SVN_DAV_PROP_NS_CUSTOM) - 1) == 0)
-                entry->has_props = TRUE;
+                  if (strncmp((const char *)kkey, SVN_DAV_PROP_NS_CUSTOM,
+                              sizeof(SVN_DAV_PROP_NS_CUSTOM) - 1) == 0)
+                    entry->has_props = TRUE;
               
-              else if (strncmp((const char *)kkey, SVN_DAV_PROP_NS_SVN,
-                               sizeof(SVN_DAV_PROP_NS_SVN) - 1) == 0)
-                entry->has_props = TRUE;
+                  else if (strncmp((const char *)kkey, SVN_DAV_PROP_NS_SVN,
+                                   sizeof(SVN_DAV_PROP_NS_SVN) - 1) == 0)
+                    entry->has_props = TRUE;
+                }
+             }
+
+          if (dirent_fields & SVN_DIRENT_CREATED_REV)
+            { 
+              /* created_rev & friends */
+              propval = apr_hash_get(resource->propset,
+                                     SVN_RA_DAV__PROP_VERSION_NAME,
+                                     APR_HASH_KEY_STRING);
+              if (propval != NULL)
+                entry->created_rev = SVN_STR_TO_REV(propval->data);
             }
-          
-          /* created_rev & friends */
-          propval = apr_hash_get(resource->propset,
-                                 SVN_RA_DAV__PROP_VERSION_NAME,
-                                 APR_HASH_KEY_STRING);
-          if (propval != NULL)
-            entry->created_rev = SVN_STR_TO_REV(propval->data);
-          
-          propval = apr_hash_get(resource->propset,
-                                 SVN_RA_DAV__PROP_CREATIONDATE,
-                                 APR_HASH_KEY_STRING);
-          if (propval != NULL)
-            SVN_ERR( svn_time_from_cstring(&(entry->time),
-                                           propval->data, pool) );
-          
-          propval = apr_hash_get(resource->propset,
-                                 SVN_RA_DAV__PROP_CREATOR_DISPLAYNAME,
-                                 APR_HASH_KEY_STRING);
-          if (propval != NULL)
-            entry->last_author = propval->data;
-          
+
+          if (dirent_fields & SVN_DIRENT_TIME)
+            {
+              propval = apr_hash_get(resource->propset,
+                                     SVN_RA_DAV__PROP_CREATIONDATE,
+                                     APR_HASH_KEY_STRING);
+              if (propval != NULL)
+                SVN_ERR( svn_time_from_cstring(&(entry->time),
+                                               propval->data, pool) );
+            }
+
+          if (dirent_fields & SVN_DIRENT_LAST_AUTHOR)    
+            {
+              propval = apr_hash_get(resource->propset,
+                                     SVN_RA_DAV__PROP_CREATOR_DISPLAYNAME,
+                                     APR_HASH_KEY_STRING);
+              if (propval != NULL)
+                entry->last_author = propval->data;
+            }
+
           apr_hash_set(*dirents, 
                        svn_path_uri_decode(svn_path_basename(childname, pool),
                                            pool),
@@ -1068,9 +1162,22 @@
       SVN_ERR (filter_props (*props, rsrc, TRUE, pool));
     }
 
+  svn_pool_destroy (subpool);
+
   return SVN_NO_ERROR;
 }
 
+svn_error_t *svn_ra_dav__get_dir(svn_ra_session_t *session,
+                                 const char *path,
+                                 svn_revnum_t revision,
+                                 apr_hash_t **dirents,
+                                 svn_revnum_t *fetched_rev,
+                                 apr_hash_t **props,
+                                 apr_pool_t *pool)
+{
+  return svn_ra_dav__get_dir2(session, path, revision, SVN_DIRENT_ALL,
+                              dirents, fetched_rev, props, pool);
+}
 
 
 /* ------------------------------------------------------------------------- */
Index: subversion/svnserve/serve.c
===================================================================
--- subversion/svnserve/serve.c	(revision 17006)
+++ subversion/svnserve/serve.c	(working copy)
@@ -1062,9 +1062,10 @@
   svn_fs_root_t *root;
   apr_pool_t *subpool;
   svn_boolean_t want_props, want_contents;
+  apr_uint64_t dirent_fields = SVN_DIRENT_ALL;
 
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "c(?r)bb", &path, &rev,
-                                 &want_props, &want_contents));
+  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "c(?r)bb?n", &path, &rev,
+                                 &want_props, &want_contents, &dirent_fields));
 
   full_path = svn_path_join(b->fs_path->data,
                             svn_path_canonicalize(path, pool), pool);
@@ -1102,30 +1103,48 @@
           file_path = svn_path_join(full_path, name, subpool);
           entry = apr_pcalloc(pool, sizeof(*entry));
 
-          /* kind */
-          entry->kind = fsent->kind;
+          if (dirent_fields & SVN_DIRENT_KIND)
+            {
+              /* kind */
+              entry->kind = fsent->kind;
+            }
 
-          /* size */
-          if (entry->kind == svn_node_dir)
-            entry->size = 0;
-          else
-            SVN_CMD_ERR(svn_fs_file_length(&entry->size, root, file_path,
-                                           subpool));
+          if (dirent_fields & SVN_DIRENT_SIZE)
+            {
+              /* size */
+              if (entry->kind == svn_node_dir)
+                entry->size = 0;
+              else
+                SVN_CMD_ERR(svn_fs_file_length(&entry->size, root, file_path,
+                                               subpool));
+            }
 
-          /* has_props */
-          SVN_CMD_ERR(svn_fs_node_proplist(&file_props, root, file_path,
-                                           subpool));
-          entry->has_props = (apr_hash_count(file_props) > 0) ? TRUE : FALSE;
+          if (dirent_fields & SVN_DIRENT_SIZE)
+            {
+              /* has_props */
+              SVN_CMD_ERR(svn_fs_node_proplist(&file_props, root, file_path,
+                                               subpool));
+              entry->has_props = (apr_hash_count(file_props) > 0) ? TRUE
+                                                                  : FALSE;
+            }
 
-          /* created_rev, last_author, time */
-          SVN_CMD_ERR(svn_repos_get_committed_info(&entry->created_rev, &cdate,
-                                                   &cauthor, root, file_path,
-                                                   subpool));
-          entry->last_author = apr_pstrdup(pool, cauthor);
-          if (cdate)
-            SVN_CMD_ERR(svn_time_from_cstring(&entry->time, cdate, subpool));
-          else
-            entry->time = (time_t) -1;
+          if ((dirent_fields & SVN_DIRENT_LAST_AUTHOR)
+              || (dirent_fields & SVN_DIRENT_TIME)
+              || (dirent_fields & SVN_DIRENT_CREATED_REV))
+            {
+              /* created_rev, last_author, time */
+              SVN_CMD_ERR(svn_repos_get_committed_info(&entry->created_rev,
+                                                       &cdate,
+                                                       &cauthor, root,
+                                                       file_path,
+                                                       subpool));
+              entry->last_author = apr_pstrdup(pool, cauthor);
+              if (cdate)
+                SVN_CMD_ERR(svn_time_from_cstring(&entry->time, cdate,
+                                                  subpool));
+              else
+                entry->time = (time_t) -1;
+            }
 
           /* Store the entry. */
           apr_hash_set(entries, name, APR_HASH_KEY_STRING, entry);


