One of my after-hours activities is to help maintain a community
hosting site for Common Lisp development.
During our latest system migration, I noticed that mod_dav_svn acts
weird in view of symlinks:
If you check http://svn.common-lisp.net/, the repository listing page
is empty. However, if you go to http://svn.common-lisp.net/armedbear,
you'll find that a repository is being listed. The repository is a
symlink in the parent path. This works great for ViewVC and also for
hosting the actual repositories, but it doesn't work out for listing
the available repositories.
The patch below fixes that, but I don't know if there are explicit
considerations to have the current behaviour, so I'm holding off my
commit for now.
Bye,
Erik.
[[[
Check node kind of resolved special nodes to be a directory, in order
to include symlinks pointing to directories.
* subversion/mod_dav_svn/repos.c
(deliver): Extend 'is directory' check for inclusion
in parent path listing to include symlinks-to-directory.
]]]
Index: subversion/mod_dav_svn/repos.c
===================================================================
--- subversion/mod_dav_svn/repos.c (revision 1132467)
+++ subversion/mod_dav_svn/repos.c (working copy)
@@ -3247,7 +3247,23 @@
apr_hash_this(hi, &key, NULL, &val);
dirent = val;
- if (dirent->kind != svn_node_dir)
+ if (dirent->kind == svn_node_file && dirent->special)
+ {
+ svn_node_kind_t resolved_kind;
+ const char *name = key;
+
+ serr = svn_io_check_resolved_path(name, &resolved_kind,
+ resource->pool);
+ if (serr != NULL)
+ return dav_svn__convert_err(serr,
+ HTTP_INTERNAL_SERVER_ERROR,
+ "couldn't fetch dirents "
+ "of SVNParentPath",
+ resource->pool);
+ if (resolved_kind != svn_node_dir)
+ continue;
+ }
+ else if (dirent->kind != svn_node_dir)
continue;
ent->name = key;
Received on 2011-06-05 20:45:07 CEST