1 diff -urN subversion-r1587.org/subversion/mod_dav_svn/dav_svn.h subversion-r1587/subversion/mod_dav_svn/dav_svn.h
2 --- subversion-r1587.org/subversion/mod_dav_svn/dav_svn.h Mon Apr 8 20:08:50 2002
3 +++ subversion-r1587/subversion/mod_dav_svn/dav_svn.h Mon Apr 8 21:39:24 2002
5 /* This records the filesystem path to the SVN FS */
8 + /* The name of this repository */
9 + const char *repo_name;
11 /* the open repository */
15 /* Return the special URI to be used for this resource. */
16 const char *dav_svn_get_special_uri(request_rec *r);
18 +/* Return a descriptive name for the repository */
19 +const char *dav_svn_get_repo_name(request_rec *r);
21 /* convert an svn_error_t into a dav_error, possibly pushing a message. use
22 the provided HTTP status for the DAV errors */
23 diff -urN subversion-r1587.org/subversion/mod_dav_svn/log.c subversion-r1587/subversion/mod_dav_svn/log.c
24 --- subversion-r1587.org/subversion/mod_dav_svn/log.c Mon Apr 8 20:08:50 2002
25 +++ subversion-r1587/subversion/mod_dav_svn/log.c Mon Apr 8 21:39:26 2002
27 /* else unknown element; skip it */
30 - lrb.bb = apr_brigade_create(resource->pool); /* not the subpool! */
31 + lrb.bb = apr_brigade_create(resource->pool, /* not the subpool! */
32 + output->c->bucket_alloc);
34 lrb.pool = svn_pool_create(resource->pool);
36 diff -urN subversion-r1587.org/subversion/mod_dav_svn/merge.c subversion-r1587/subversion/mod_dav_svn/merge.c
37 --- subversion-r1587.org/subversion/mod_dav_svn/merge.c Mon Apr 8 20:08:50 2002
38 +++ subversion-r1587/subversion/mod_dav_svn/merge.c Mon Apr 8 21:39:27 2002
40 "previous revision.");
43 - bb = apr_brigade_create(pool);
44 + bb = apr_brigade_create(pool, output->c->bucket_alloc);
46 /* prep some strings */
48 diff -urN subversion-r1587.org/subversion/mod_dav_svn/mod_dav_svn.c subversion-r1587/subversion/mod_dav_svn/mod_dav_svn.c
49 --- subversion-r1587.org/subversion/mod_dav_svn/mod_dav_svn.c Mon Apr 8 20:08:50 2002
50 +++ subversion-r1587/subversion/mod_dav_svn/mod_dav_svn.c Mon Apr 8 21:39:27 2002
52 /* per-dir configuration */
54 const char *fs_path; /* path to the SVN FS */
56 + const char *repo_name; /* repository name */
59 #define INHERIT_VALUE(parent, child, field) \
61 newconf = apr_pcalloc(p, sizeof(*newconf));
63 newconf->fs_path = INHERIT_VALUE(parent, child, fs_path);
64 + newconf->repo_name = INHERIT_VALUE(parent, child, repo_name);
69 +static const char *dav_svn_repo_name(cmd_parms *cmd, void *config,
72 + dav_svn_dir_conf *conf = config;
74 + conf->repo_name = apr_pstrdup(cmd->pool, arg1);
79 static const char *dav_svn_path_cmd(cmd_parms *cmd, void *config,
86 +const char *dav_svn_get_repo_name(request_rec *r)
88 + dav_svn_dir_conf *conf;
90 + conf = ap_get_module_config(r->per_dir_config, &dav_svn_module);
91 + return conf->repo_name;
94 const char *dav_svn_get_special_uri(request_rec *r)
96 dav_svn_server_conf *conf;
98 "specify the URI component for special Subversion "
101 + /* per directory/location */
102 + AP_INIT_TAKE1("SVNReposName", dav_svn_repo_name, NULL, ACCESS_CONF,
103 + "specify the name of a Subversion repository"),
108 diff -urN subversion-r1587.org/subversion/mod_dav_svn/repos.c subversion-r1587/subversion/mod_dav_svn/repos.c
109 --- subversion-r1587.org/subversion/mod_dav_svn/repos.c Mon Apr 8 20:08:50 2002
110 +++ subversion-r1587/subversion/mod_dav_svn/repos.c Mon Apr 8 21:39:29 2002
112 dav_resource **resource)
115 + const char *repo_name;
116 dav_resource_combined *comb;
117 dav_svn_repos *repos;
120 "of this resource's repository.");
123 + repo_name = dav_svn_get_repo_name(r);
125 comb = apr_pcalloc(r->pool, sizeof(*comb));
126 comb->res.info = &comb->priv;
127 comb->res.hooks = &dav_svn_hooks_repos;
129 /* where is the SVN FS for this resource? */
130 repos->fs_path = fs_path;
132 + /* A name for the repository */
133 + repos->repo_name = repo_name;
135 /* Remember various bits for later URL construction */
136 repos->base_url = ap_construct_url(r->pool, "", r);
137 repos->special_uri = dav_svn_get_special_uri(r);
138 @@ -1421,8 +1427,8 @@
141 /* take the current data and shove it into the filter */
142 - bb = apr_brigade_create(dc->pool);
143 - bkt = apr_bucket_transient_create(buffer, *len);
144 + bb = apr_brigade_create(dc->pool, dc->output->c->bucket_alloc);
145 + bkt = apr_bucket_transient_create(buffer, *len, dc->output->c->bucket_alloc);
146 APR_BRIGADE_INSERT_TAIL(bb, bkt);
147 if ((status = ap_pass_brigade(dc->output, bb)) != APR_SUCCESS) {
148 return svn_error_create(status, 0, NULL, dc->pool,
149 @@ -1440,8 +1446,8 @@
152 /* done with the file. write an EOS bucket now. */
153 - bb = apr_brigade_create(dc->pool);
154 - bkt = apr_bucket_eos_create();
155 + bb = apr_brigade_create(dc->pool, dc->output->c->bucket_alloc);
156 + bkt = apr_bucket_eos_create(dc->output->c->bucket_alloc);
157 APR_BRIGADE_INSERT_TAIL(bb, bkt);
158 if ((status = ap_pass_brigade(dc->output, bb)) != APR_SUCCESS) {
159 return svn_error_create(status, 0, NULL, dc->pool,
160 @@ -1489,7 +1495,12 @@
161 title = apr_psprintf(resource->pool, "Revision %ld: %s",
162 resource->info->root.rev, title);
164 - bb = apr_brigade_create(resource->pool);
165 + if (resource->info->repos->repo_name)
166 + title = apr_psprintf(resource->pool, "%s - %s",
167 + resource->info->repos->repo_name,
170 + bb = apr_brigade_create(resource->pool, output->c->bucket_alloc);
171 ap_fprintf(output, bb, "<html><head><title>%s</title></head>\n"
172 "<body>\n <h2>%s</h2>\n <ul>\n", title, title);
174 @@ -1541,7 +1552,7 @@
175 "<a href=\"http://subversion.tigris.org/\">Subversion</a>"
176 "</em>\n</body></html>");
178 - bkt = apr_bucket_eos_create();
179 + bkt = apr_bucket_eos_create(output->c->bucket_alloc);
180 APR_BRIGADE_INSERT_TAIL(bb, bkt);
181 if ((status = ap_pass_brigade(output, bb)) != APR_SUCCESS) {
182 return dav_new_error(resource->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
183 @@ -1587,8 +1598,8 @@
186 /* build a brigade and write to the filter ... */
187 - bb = apr_brigade_create(resource->pool);
188 - bkt = apr_bucket_transient_create(block, bufsize);
189 + bb = apr_brigade_create(resource->pool, output->c->bucket_alloc);
190 + bkt = apr_bucket_transient_create(block, bufsize, output->c->bucket_alloc);
191 APR_BRIGADE_INSERT_TAIL(bb, bkt);
192 if ((status = ap_pass_brigade(output, bb)) != APR_SUCCESS) {
193 /* ### what to do with status; and that HTTP code... */
194 @@ -1598,8 +1609,8 @@
197 /* done with the file. write an EOS bucket now. */
198 - bb = apr_brigade_create(resource->pool);
199 - bkt = apr_bucket_eos_create();
200 + bb = apr_brigade_create(resource->pool, output->c->bucket_alloc);
201 + bkt = apr_bucket_eos_create(output->c->bucket_alloc);
202 APR_BRIGADE_INSERT_TAIL(bb, bkt);
203 if ((status = ap_pass_brigade(output, bb)) != APR_SUCCESS) {
204 /* ### what to do with status; and that HTTP code... */
205 diff -urN subversion-r1587.org/subversion/mod_dav_svn/update.c subversion-r1587/subversion/mod_dav_svn/update.c
206 --- subversion-r1587.org/subversion/mod_dav_svn/update.c Mon Apr 8 20:08:50 2002
207 +++ subversion-r1587/subversion/mod_dav_svn/update.c Mon Apr 8 21:39:26 2002
210 uc.anchor = resource->info->repos_path;
211 uc.dst_path = dst_path;
212 - uc.bb = apr_brigade_create(resource->pool);
213 + uc.bb = apr_brigade_create(resource->pool, output->c->bucket_alloc);
215 /* Get the root of the revision we want to update to. This will be used
216 to generated stable id values. */