You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2017/05/14 21:06:28 UTC

svn commit: r1795120 - /subversion/trunk/subversion/libsvn_fs_fs/tree.c

Author: stefan2
Date: Sun May 14 21:06:28 2017
New Revision: 1795120

URL: http://svn.apache.org/viewvc?rev=1795120&view=rev
Log:
Improve error message when DAG lookup fails in FSFS.

Suggested by: Orivej Desh <orivej{_AT_}gmx.fr> 

* subversion/libsvn_fs_fs/tree.c
  (open_path): Report the txn / rev in which we were looking for PATH.

Modified:
    subversion/trunk/subversion/libsvn_fs_fs/tree.c

Modified: subversion/trunk/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/tree.c?rev=1795120&r1=1795119&r2=1795120&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/tree.c Sun May 14 21:06:28 2017
@@ -1144,6 +1144,8 @@ open_path(parent_path_t **parent_path_p,
       /* The path isn't finished yet; we'd better be in a directory.  */
       if (svn_fs_fs__dag_node_kind(child) != svn_node_dir)
         {
+          const char *msg;
+
           /* Since this is not a directory and we are looking for some
              sub-path, that sub-path will not exist.  That will be o.k.,
              if we are just here to check for the path's existence. */
@@ -1154,8 +1156,14 @@ open_path(parent_path_t **parent_path_p,
             }
 
           /* It's really a problem ... */
-          SVN_ERR_W(SVN_FS__ERR_NOT_DIRECTORY(fs, path_so_far->data),
-                    apr_psprintf(iterpool, _("Failure opening '%s'"), path));
+          msg = root->is_txn_root
+              ? apr_psprintf(iterpool,
+                             _("Failure opening '%s' in transaction '%s'"),
+                             path, root->txn)
+              : apr_psprintf(iterpool,
+                             _("Failure opening '%s' in revision %ld"),
+                             path, root->rev);
+          SVN_ERR_W(SVN_FS__ERR_NOT_DIRECTORY(fs, path_so_far->data), msg);
         }
 
       rest = next;