Index: subversion/include/svn_types.h
===================================================================
--- subversion/include/svn_types.h	(revision 15414)
+++ subversion/include/svn_types.h	(working copy)
@@ -188,31 +188,6 @@
   svn_recursive
 };
 
-
-/** A general subversion directory entry. */
-typedef struct svn_dirent_t
-{
-  /** node kind */
-  svn_node_kind_t kind;
-
-  /** length of file text, or 0 for directories */
-  svn_filesize_t size;
-
-  /** does the node have props? */
-  svn_boolean_t has_props;
-
-  /** last rev in which this node changed */
-  svn_revnum_t created_rev;
-
-  /** time of created_rev (mod-time) */
-  apr_time_t time;
-
-  /** author of created_rev */
-  const char *last_author;
-
-} svn_dirent_t;
-
-
 
 
 /** Keyword substitution.
@@ -458,6 +433,67 @@
 svn_lock_t *
 svn_lock_dup (const svn_lock_t *lock, apr_pool_t *pool);
 
+
+/**
+ * A general subversion directory entry with lock information.
+ *
+ * @since New in 1.3.
+ */
+typedef struct svn_dirent2_t
+{
+  /** node kind */
+  svn_node_kind_t kind;
+
+  /** length of file text, or 0 for directories */
+  svn_filesize_t size;
+
+  /** does the node have props? */
+  svn_boolean_t has_props;
+
+  /** last rev in which this node changed */
+  svn_revnum_t created_rev;
+
+  /** time of created_rev (mod-time) */
+  apr_time_t time;
+
+  /** author of created_rev */
+  const char *last_author;
+
+  /** repository lock details, if present or NULL */
+  svn_lock_t *lock;
+
+} svn_dirent2_t;
+
+
+/**
+ * Similar to @c svn_dirent2_t except that @svn_dirent_t give only
+ * subversion directory entry.
+ *
+ * @deprecated Provided for backward compatibility with the 1.2 API.
+ */
+typedef struct svn_dirent_t
+{
+  /** node kind */
+  svn_node_kind_t kind;
+
+  /** length of file text, or 0 for directories */
+  svn_filesize_t size;
+
+  /** does the node have props? */
+  svn_boolean_t has_props;
+
+  /** last rev in which this node changed */
+  svn_revnum_t created_rev;
+
+  /** time of created_rev (mod-time) */
+  apr_time_t time;
+
+  /** author of created_rev */
+  const char *last_author;
+
+} svn_dirent_t;
+
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
Index: subversion/libsvn_ra_local/ra_plugin.c
===================================================================
--- subversion/libsvn_ra_local/ra_plugin.c	(revision 15414)
+++ subversion/libsvn_ra_local/ra_plugin.c	(working copy)
@@ -932,111 +932,7 @@
 
 
 
-/* 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_fs_root_t *root;
-  svn_revnum_t youngest_rev;
-  apr_hash_t *entries;
-  apr_hash_index_t *hi;
-  svn_ra_local__session_baton_t *sbaton = session->priv;
-  const char *abs_path = sbaton->fs_path;
-  apr_pool_t *subpool;
-
-  /* ### Not sure if this counts as a workaround or not.  The
-     session baton uses the empty string to mean root, and not
-     sure that should change.  However, it would be better to use
-     a path library function to add this separator -- hardcoding
-     it is totally bogus.  See issue #559, though it may be only
-     tangentially related. */
-  if (abs_path[0] == '\0')
-    abs_path = "/";
-
-  /* If we were given a relative path to append, append it. */
-  if (path)
-    abs_path = svn_path_join (abs_path, path, pool);
-
-  /* Open the revision's root. */
-  if (! SVN_IS_VALID_REVNUM (revision))
-    {
-      SVN_ERR (svn_fs_youngest_rev (&youngest_rev, sbaton->fs, pool));
-      SVN_ERR (svn_fs_revision_root (&root, sbaton->fs, youngest_rev, pool));
-      if (fetched_rev != NULL)
-        *fetched_rev = youngest_rev;
-    }
-  else
-    SVN_ERR (svn_fs_revision_root (&root, sbaton->fs, revision, pool));
-
-  if (dirents)
-    {
-      /* Get the dir's entries. */
-      SVN_ERR (svn_fs_dir_entries (&entries, root, abs_path, pool));
-      
-      /* Loop over the fs dirents, and build a hash of general
-         svn_dirent_t's. */
-      *dirents = apr_hash_make (pool);
-      subpool = svn_pool_create (pool);
-      for (hi = apr_hash_first (pool, entries); hi; hi = apr_hash_next (hi))
-        {
-          const void *key;
-          void *val;
-          apr_hash_t *prophash;
-          const char *datestring, *entryname, *fullpath;
-          svn_fs_dirent_t *fs_entry;
-          svn_dirent_t *entry = apr_pcalloc (pool, sizeof(*entry));
-
-          svn_pool_clear (subpool);
-
-          apr_hash_this (hi, &key, NULL, &val);
-          entryname = (const char *) key;
-          fs_entry = (svn_fs_dirent_t *) val;
-          
-          /* node kind */
-          fullpath = svn_path_join (abs_path, entryname, subpool);
-          entry->kind = fs_entry->kind;
-          
-          /* size  */
-          if (entry->kind == svn_node_dir)
-            entry->size = 0;
-          else
-            SVN_ERR (svn_fs_file_length (&(entry->size), root,
-                                         fullpath, subpool));
-          
-          /* has_props? */
-          SVN_ERR (svn_fs_node_proplist (&prophash, root, fullpath, subpool));
-          entry->has_props = (apr_hash_count (prophash)) ? TRUE : FALSE;
-          
-          /* created_rev & friends */
-          SVN_ERR (svn_repos_get_committed_info (&(entry->created_rev),
-                                                 &datestring,
-                                                 &(entry->last_author),
-                                                 root, fullpath, subpool));
-          if (datestring)
-            SVN_ERR (svn_time_from_cstring (&(entry->time), datestring, pool));
-          if (entry->last_author)
-            entry->last_author = apr_pstrdup (pool, entry->last_author);
-          
-          /* Store. */
-          apr_hash_set (*dirents, entryname, APR_HASH_KEY_STRING, entry);
-        }
-      svn_pool_destroy (subpool);
-    }
-
-  /* Handle props if requested. */
-  if (props)
-    SVN_ERR (get_node_props (props, sbaton, root, abs_path, pool));
-
-  return SVN_NO_ERROR;
-}
-
-static svn_error_t *
 svn_ra_local__get_locations (svn_ra_session_t *session,
                              apr_hash_t **locations,
                              const char *relative_path,
@@ -1217,7 +1113,116 @@
 
 
 
+/* 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_fs_root_t *root;
+  svn_revnum_t youngest_rev;
+  apr_hash_t *entries;
+  apr_hash_t *lock_ent;
+  apr_hash_index_t *hi;
+  svn_ra_local__session_baton_t *sbaton = session->priv;
+  const char *abs_path = sbaton->fs_path;
+  apr_pool_t *subpool;
 
+  /* ### Not sure if this counts as a workaround or not.  The
+     session baton uses the empty string to mean root, and not
+     sure that should change.  However, it would be better to use
+     a path library function to add this separator -- hardcoding
+     it is totally bogus.  See issue #559, though it may be only
+     tangentially related. */
+  if (abs_path[0] == '\0')
+    abs_path = "/";
+
+  /* If we were given a relative path to append, append it. */
+  if (path)
+    abs_path = svn_path_join (abs_path, path, pool);
+
+  /* Open the revision's root. */
+  if (! SVN_IS_VALID_REVNUM (revision))
+    {
+      SVN_ERR (svn_fs_youngest_rev (&youngest_rev, sbaton->fs, pool));
+      SVN_ERR (svn_fs_revision_root (&root, sbaton->fs, youngest_rev, pool));
+      if (fetched_rev != NULL)
+        *fetched_rev = youngest_rev;
+    }
+  else
+    SVN_ERR (svn_fs_revision_root (&root, sbaton->fs, revision, pool));
+
+  if (dirents)
+    {
+      /* Get the dir's entries. */
+      SVN_ERR (svn_fs_dir_entries (&entries, root, abs_path, pool));
+      /* Get lock entries. */
+      SVN_ERR (svn_ra_local__get_locks (session, &lock_ent, abs_path, pool));
+
+      /* Loop over the fs dirents, and build a hash of general
+         svn_dirent_t's. */
+      *dirents = apr_hash_make (pool);
+      subpool = svn_pool_create (pool);
+      for (hi = apr_hash_first (pool, entries); hi; hi = apr_hash_next (hi))
+        {
+          const void *key;
+          void *val;
+          apr_hash_t *prophash;
+          const char *datestring, *entryname, *fullpath;
+          svn_fs_dirent_t *fs_entry;
+          svn_dirent2_t *entry = apr_pcalloc (pool, sizeof(svn_dirent2_t));
+
+          svn_pool_clear (subpool);
+
+          apr_hash_this (hi, &key, NULL, &val);
+          entryname = (const char *) key;
+          fs_entry = (svn_fs_dirent_t *) val;
+
+          /* node kind */
+          fullpath = svn_path_join (abs_path, entryname, subpool);
+          entry->kind = fs_entry->kind;
+
+          /* size  */
+          if (entry->kind == svn_node_dir)
+            entry->size = 0;
+          else
+            SVN_ERR (svn_fs_file_length (&(entry->size), root,
+                                         fullpath, subpool));
+
+          /* has_props? */
+          SVN_ERR (svn_fs_node_proplist (&prophash, root, fullpath, subpool));
+          entry->has_props = (apr_hash_count (prophash)) ? TRUE : FALSE;
+
+          /* created_rev & friends */
+          SVN_ERR (svn_repos_get_committed_info (&(entry->created_rev),
+                                                 &datestring,
+                                                 &(entry->last_author),
+                                                 root, fullpath, subpool));
+          if (datestring)
+            SVN_ERR (svn_time_from_cstring (&(entry->time), datestring, pool));
+          if (entry->last_author)
+            entry->last_author = apr_pstrdup (pool, entry->last_author);
+
+          /* Get the lock details by looking up in hash table. */
+          entry->lock = apr_hash_get (lock_ent, fullpath, APR_HASH_KEY_STRING);
+
+          /* Store. */
+          apr_hash_set (*dirents, entryname, APR_HASH_KEY_STRING, entry);
+        }
+      svn_pool_destroy (subpool);
+    }
+
+  /* Handle props if requested. */
+  if (props)
+    SVN_ERR (get_node_props (props, sbaton, root, abs_path, pool));
+
+  return SVN_NO_ERROR;
+}
+
 /*----------------------------------------------------------------*/
 
 static const svn_version_t *
Index: subversion/clients/cmdline/ls-cmd.c
===================================================================
--- subversion/clients/cmdline/ls-cmd.c	(revision 15414)
+++ subversion/clients/cmdline/ls-cmd.c	(working copy)
@@ -50,7 +50,8 @@
   for (i = 0; i < array->nelts; ++i)
     {
       const char *utf8_entryname;
-      svn_dirent_t *dirent;
+      svn_dirent2_t *dirent;
+      svn_lock_t *lock;
       svn_sort__item_t *item;
 
       svn_pool_clear (subpool);
@@ -63,15 +64,15 @@
       utf8_entryname = item->key;
 
       dirent = apr_hash_get (dirents, utf8_entryname, item->klen);
-
+      lock = dirent->lock;
       if (verbose)
         {
           apr_time_t now = apr_time_now();
           apr_time_exp_t exp_time;
           apr_status_t apr_err;
           apr_size_t size;
-          char timestr[20];
-          const char *sizestr, *utf8_timestr;
+          char timestr[20], lock_timestr[20];
+          const char *sizestr, *utf8_timestr, *utf8_lock_timestr;
           
           /* svn_time_to_human_cstring gives us something *way* too long
              to use for this, so we have to roll our own.  We include
@@ -98,13 +99,42 @@
 
           sizestr = apr_psprintf (subpool, "%" SVN_FILESIZE_T_FMT,
                                   dirent->size);
+          if (lock)
+            {
+               apr_time_exp_lt (&exp_time, lock->creation_date);
+               if (apr_time_sec
+                    (now - lock->creation_date) < (365 * 86400 / 2)
+                   && apr_time_sec
+                    (lock->creation_date - now) < (365 * 86400 / 2))
+                 {
+                   apr_err = apr_strftime (lock_timestr, &size,
+                                           sizeof (lock_timestr),
+                                           "%b %d %H:%M", &exp_time);
+                 }
+               else
+                 {
+                   apr_err = apr_strftime (lock_timestr, &size,
+                                           sizeof (timestr),
+                                           "%b %d  %Y", &exp_time);
+                 }
 
+               /* if that failed, just zero out the string and print nothing */
+               if (apr_err)
+                 lock_timestr[0] = '\0';
+
+              /* we need it in UTF-8. */
+              SVN_ERR (svn_utf_cstring_to_utf8
+                         (&utf8_lock_timestr, lock_timestr, subpool));
+            }
+
           SVN_ERR (svn_cmdline_printf
-                   (subpool, "%7ld %-8.8s %10s %12s %s%s\n",
+                   (subpool, "%7ld %-12s %10s %12s %12s %-12s %s%s\n",
                     dirent->created_rev,
                     dirent->last_author ? dirent->last_author : " ? ",
                     (dirent->kind == svn_node_file) ? sizestr : "",
                     utf8_timestr,
+                    lock ? utf8_lock_timestr : "",
+                    lock ? lock->owner : "",
                     utf8_entryname,
                     (dirent->kind == svn_node_dir) ? "/" : ""));
         }
@@ -177,8 +207,9 @@
     {
       svn_stringbuf_t *sb;
       const char *utf8_entryname;
-      svn_dirent_t *dirent;
+      svn_dirent2_t *dirent;
       svn_sort__item_t *item;
+      svn_lock_t* lock;
 
       svn_pool_clear (subpool);
 
@@ -190,6 +221,7 @@
       utf8_entryname = item->key;
 
       dirent = apr_hash_get (dirents, utf8_entryname, item->klen);
+      lock = dirent->lock;
 
       sb = svn_stringbuf_create ("", subpool);
 
@@ -238,6 +270,49 @@
       /* "</commit>" */
       svn_xml_make_close_tag (&sb, subpool, "commit");
 
+      /* "<lock>" */
+      if (lock)
+        {
+          svn_xml_make_open_tag (&sb, pool, svn_xml_normal, "lock", NULL);
+
+          svn_xml_make_open_tag (&sb, pool, svn_xml_protect_pcdata,
+                                 "token", NULL);
+          svn_xml_escape_cdata_cstring (&sb, lock->token, pool);
+          svn_xml_make_close_tag (&sb, pool, "token");
+
+          svn_xml_make_open_tag (&sb, pool, svn_xml_protect_pcdata,
+                                 "owner", NULL);
+          svn_xml_escape_cdata_cstring (&sb, lock->owner, pool);
+          svn_xml_make_close_tag (&sb, pool, "owner");
+
+          if (lock->comment)
+            {
+              svn_xml_make_open_tag (&sb, pool, svn_xml_normal,
+                                     "comment", NULL);
+              svn_xml_escape_cdata_cstring (&sb, lock->comment, pool);
+              svn_xml_make_close_tag (&sb, pool, "comment");
+            }
+
+          svn_xml_make_open_tag (&sb, pool, svn_xml_protect_pcdata,
+                                 "created", NULL);
+          svn_xml_escape_cdata_cstring (&sb, svn_time_to_cstring
+                                        (lock->creation_date, pool),
+                                        pool);
+          svn_xml_make_close_tag (&sb, pool, "created");
+
+          if (lock->expiration_date != 0)
+            {
+              svn_xml_make_open_tag (&sb, pool, svn_xml_protect_pcdata,
+                                     "expires", NULL);
+              svn_xml_escape_cdata_cstring (&sb, svn_time_to_cstring
+                                            (lock->expiration_date, pool),
+                                            pool);
+              svn_xml_make_close_tag (&sb, pool, "expires");
+            }
+
+          /* "<lock>" */
+          svn_xml_make_close_tag (&sb, subpool, "lock");
+        }
       /* "</entry>" */
       svn_xml_make_close_tag (&sb, subpool, "entry");
 
Index: subversion/clients/cmdline/main.c
===================================================================
--- subversion/clients/cmdline/main.c	(revision 15414)
+++ subversion/clients/cmdline/main.c	(working copy)
@@ -389,12 +389,14 @@
        "current\n"
        "  working directory.\n"
        "\n"
-       "  With --verbose, the following fields show the status of the item:\n"
+       "  With --verbose, the following fields will be shown for each item:\n"
        "\n"
        "    Revision number of the last commit\n"
        "    Author of the last commit\n"
        "    Size (in bytes)\n"
-       "    Date and time of the last commit\n"),
+       "    Date and time of the last commit\n"
+       "    Date and time of the lock creation\n"
+       "    Owner of the lock\n"),
     {'r', 'v', 'R', svn_cl__incremental_opt, svn_cl__xml_opt,
      SVN_CL__AUTH_OPTIONS, svn_cl__config_dir_opt} },
   
Index: subversion/clients/cmdline/dtd/list.dtd
===================================================================
--- subversion/clients/cmdline/dtd/list.dtd	(revision 15414)
+++ subversion/clients/cmdline/dtd/list.dtd	(working copy)
@@ -8,9 +8,16 @@
 <!ELEMENT lists (list+)>
 <!ELEMENT list (entry*)>
 <!ATTLIST list path CDATA #REQUIRED>  <!-- local path or URL -->
-<!ELEMENT entry (name, size?, commit)>
+<!ELEMENT entry (name, size?, commit, lock?)>
 <!ATTLIST entry kind (dir | file) #REQUIRED>
 <!ELEMENT name (#PCDATA)>  <!-- name of file or directory -->
 <!ELEMENT size (#PCDATA)>  <!-- file size in bytes: integer -->
 <!ELEMENT commit (author, date)>
 <!ATTLIST commit revision CDATA #REQUIRED>  <!-- revision number: integer -->
+<!-- Lock info stored repos. -->
+<!ELEMENT lock (token, owner, comment?, created, expires?)>
+<!ELEMENT token (#PCDATA)>    <!-- lock token URI -->
+<!ELEMENT owner (#PCDATA)>    <!-- lock owner -->
+<!ELEMENT comment (#PCDATA)>  <!-- lock comment -->
+<!ELEMENT created (#PCDATA)>  <!-- creation date in ISO format -->
+<!ELEMENT expires (#PCDATA)>  <!-- expiration date in ISO format -->
Index: subversion/libsvn_ra_svn/client.c
===================================================================
--- subversion/libsvn_ra_svn/client.c	(revision 15414)
+++ subversion/libsvn_ra_svn/client.c	(working copy)
@@ -933,7 +933,8 @@
   const char *name, *kind, *cdate, *cauthor;
   svn_boolean_t has_props;
   apr_uint64_t size;
-  svn_dirent_t *dirent;
+  svn_dirent2_t *dirent;
+  const char *lpath, *ltoken, *lowner, *lcomment, *lcdate, *ledate;
 
   SVN_ERR(svn_ra_svn_write_cmd(conn, pool, "get-dir", "c(?r)bb", path,
                                rev, (props != NULL), (dirents != NULL)));
@@ -958,17 +959,39 @@
       if (elt->kind != SVN_RA_SVN_LIST)
         return svn_error_create(SVN_ERR_RA_SVN_MALFORMED_DATA, NULL,
                                 _("Dirlist element not a list"));
-      SVN_ERR(svn_ra_svn_parse_tuple(elt->u.list, pool, "cwnbr(?c)(?c)",
+      SVN_ERR(svn_ra_svn_parse_tuple(elt->u.list, pool,
+                                     "cwnbr(?c)(?c)(?c)(?c)(?c)(?c)(?c)(?c)",
                                      &name, &kind, &size, &has_props,
-                                     &crev, &cdate, &cauthor));
+                                     &crev, &cdate, &cauthor, &lpath,
+                                     &ltoken, &lowner, &lcomment,
+                                     &lcdate, &ledate));
+
       name = svn_path_canonicalize(name, pool);
       dirent = apr_palloc(pool, sizeof(*dirent));
+      dirent->lock = apr_palloc(pool, sizeof(svn_lock_t));
       SVN_ERR(interpret_kind(kind, pool, &dirent->kind));
       dirent->size = size;/* FIXME: svn_filesize_t */
       dirent->has_props = has_props;
       dirent->created_rev = crev;
       SVN_ERR(svn_time_from_cstring(&dirent->time, cdate, pool));
       dirent->last_author = cauthor;
+
+      /* Setting up lock information */
+      if (lpath && ltoken && lowner && lcdate)
+        {
+          dirent->lock->path = svn_path_canonicalize(lpath, pool);
+          dirent->lock->token = ltoken;
+          dirent->lock->owner = lowner;
+          dirent->lock->comment = lcomment;
+          SVN_ERR(svn_time_from_cstring(&dirent->lock->creation_date,
+                                        lcdate, pool));
+          if (ledate)
+            SVN_ERR(svn_time_from_cstring(&dirent->lock->expiration_date,
+                                          ledate, pool));
+        }
+      else
+        dirent->lock = NULL;
+            
       apr_hash_set(*dirents, name, APR_HASH_KEY_STRING, dirent);
     }
 
Index: subversion/libsvn_ra_svn/protocol
===================================================================
--- subversion/libsvn_ra_svn/protocol	(revision 15414)
+++ subversion/libsvn_ra_svn/protocol	(working copy)
@@ -252,7 +252,10 @@
     response: ( rev:number props:proplist ( entry:dirent ... ) )]
     dirent:   ( name:string kind:node-kind size:number has-props:bool
                 created-rev:number [ created-date:string ]
-                [ last-author:string ] )
+                [ last-author:string ] [ lock-path:string ]
+                [ lock-token:string ] [ lock-owner:string ]
+                [ lock-comment:string] [ lock-creation-date:string ]
+                [ lock-expiration-date:string ] )
 
   check-path
     params:   ( path:string [ rev:number ] )
Index: subversion/libsvn_ra_dav/fetch.c
===================================================================
--- subversion/libsvn_ra_dav/fetch.c	(revision 15414)
+++ subversion/libsvn_ra_dav/fetch.c	(working copy)
@@ -930,6 +930,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, path, pool);
+  apr_hash_t *locks;
 
   /* If the revision is invalid (head), then we're done.  Just fetch
      the public URL, because that will always get HEAD. */
@@ -951,6 +952,9 @@
       final_url = svn_path_url_add_component(bc_url.data,
                                              bc_relative.data,
                                              pool);
+      /* Getting locks */
+      SVN_ERR (svn_ra_dav__get_locks(session, &locks, path, pool));
+
       if (fetched_rev != NULL)
         *fetched_rev = got_rev;
     }
@@ -980,12 +984,12 @@
           svn_ra_dav_resource_t *resource;
           const svn_string_t *propval;
           apr_hash_index_t *h;
-          svn_dirent_t *entry;
+          svn_dirent2_t *entry;
+          const svn_string_t *bc_rel;
           
           apr_hash_this (hi, &key, NULL, &val);
           childname =  key;
           resource = val;
-          
           /* Skip the effective '.' entry that comes back from NE_DEPTH_ONE.
              The children must have one more component then final_url.
              Note that we can't just strcmp the URLs because of URL encoding
@@ -1044,7 +1048,14 @@
                                  APR_HASH_KEY_STRING);
           if (propval != NULL)
             entry->last_author = propval->data;
-          
+
+          bc_rel = apr_hash_get (resource->propset,
+                                 SVN_RA_DAV__PROP_BASELINE_RELPATH,
+                                 APR_HASH_KEY_STRING);
+          entry->lock = apr_hash_get (locks,
+                                      apr_psprintf (pool, "/%s", bc_rel->data),
+                                      APR_HASH_KEY_STRING);
+
           apr_hash_set(*dirents, 
                        svn_path_uri_decode(svn_path_basename(childname, pool),
                                            pool),
Index: subversion/svnserve/serve.c
===================================================================
--- subversion/svnserve/serve.c	(revision 15414)
+++ subversion/svnserve/serve.c	(working copy)
@@ -868,12 +868,14 @@
   apr_hash_t *entries, *props = NULL, *file_props;
   apr_hash_index_t *hi;
   svn_fs_dirent_t *fsent;
-  svn_dirent_t *entry;
+  svn_dirent2_t *entry;
   const void *key;
   void *val;
   svn_fs_root_t *root;
   apr_pool_t *subpool;
   svn_boolean_t want_props, want_contents;
+  const char *lock_cdate, *lock_edate;
+  svn_lock_t *lock;
 
   SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "c(?r)bb", &path, &rev,
                                  &want_props, &want_contents));
@@ -908,6 +910,9 @@
 
           file_path = svn_path_join(full_path, name, subpool);
           entry = apr_pcalloc(pool, sizeof(*entry));
+
+          /* lock */
+          SVN_CMD_ERR(svn_fs_get_lock(&entry->lock, b->fs, file_path, pool));
 
           /* kind */
           entry->kind = fsent->kind;
@@ -953,11 +958,27 @@
           entry = val;
           cdate = (entry->time == (time_t) -1) ? NULL
             : svn_time_to_cstring(entry->time, pool);
-          SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "cwnbr(?c)(?c)", name,
-                                         kind_word(entry->kind),
+
+          lock = entry->lock;
+          if (lock)
+            {
+              lock_cdate = svn_time_to_cstring(lock->creation_date, pool);
+              lock_edate = lock->expiration_date ? svn_time_to_cstring (
+                            lock->expiration_date, pool) : NULL;
+            }
+
+          SVN_ERR(svn_ra_svn_write_tuple(conn, pool,
+                                         "cwnbr(?c)(?c)(?c)(?c)(?c)(?c)(?c)(?c)",
+                                         name, kind_word(entry->kind),
                                          (apr_uint64_t) entry->size,
                                          entry->has_props, entry->created_rev,
-                                         cdate, entry->last_author));
+                                         cdate, entry->last_author,
+                                         lock ? lock->path : NULL,
+                                         lock ? lock->token : NULL,
+                                         lock ? lock->owner : NULL,
+                                         lock ? lock->comment: NULL,
+                                         lock ? lock_cdate : NULL,
+                                         lock ? lock_edate: NULL));
         }
     }
   SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!))"));


