Fix issue #2442, svn list fails over DAV with peg revision and deleted
path.

* subversion/libsvn_ra_dav/fetch.c
  (svn_ra_dav__get_locks): Make the DAV version of get locks work the
   same as the other versions when the path no longer exists in HEAD,
   just return no locks instead of returning a 404 error.

Index: subversion/libsvn_ra_dav/fetch.c
===================================================================
--- subversion/libsvn_ra_dav/fetch.c	(revision 17306)
+++ subversion/libsvn_ra_dav/fetch.c	(working copy)
@@ -1714,8 +1714,8 @@
 
 
   /* We always run the report on the 'public' URL, which represents
-     HEAD anyway.  If the path doesn't exist in HEAD, then
-     svn_ra_get_locks() *should* fail.  Lock queries are always on HEAD. */
+     HEAD anyway.  If the path doesn't exist in HEAD, then there can't
+     possibly be a lock, so we just return no locks. */
   url = svn_path_url_add_component (ras->url->data, path, pool);
 
   err = svn_ra_dav__parsed_request(ras->sess, "REPORT", url,
@@ -1729,6 +1729,13 @@
                                    FALSE,
                                    pool);
 
+  if (err && err->apr_err == SVN_ERR_RA_DAV_PATH_NOT_FOUND)
+    {
+      svn_error_clear (err);
+      *locks = baton.lock_hash;
+      return SVN_NO_ERROR;
+    }
+
   /* ### Should svn_ra_dav__parsed_request() take care of storing auth
      ### info itself? */
   err = svn_ra_dav__maybe_store_auth_info_after_result(err, ras, pool);
