]> git.pld-linux.org Git - packages/subversion.git/blob - subversion-apache2.patch
- two more fixes
[packages/subversion.git] / subversion-apache2.patch
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
4 @@ -72,6 +72,9 @@
5    /* This records the filesystem path to the SVN FS */
6    const char *fs_path;
7  
8 +  /* The name of this repository */
9 +  const char *repo_name;
10 +
11    /* the open repository */
12    svn_repos_t *repos;
13  
14 @@ -264,6 +267,8 @@
15  /* Return the special URI to be used for this resource. */
16  const char *dav_svn_get_special_uri(request_rec *r);
17  
18 +/* Return a descriptive name for the repository */
19 +const char *dav_svn_get_repo_name(request_rec *r);
20  
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
26 @@ -193,7 +193,8 @@
27        /* else unknown element; skip it */
28      }
29  
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);
33    lrb.output = output;
34    lrb.pool = svn_pool_create(resource->pool);
35  
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
39 @@ -339,7 +339,7 @@
40                                   "previous revision.");
41      }
42  
43 -  bb = apr_brigade_create(pool);
44 +  bb = apr_brigade_create(pool, output->c->bucket_alloc);
45  
46    /* prep some strings */
47    
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
51 @@ -45,7 +45,7 @@
52  /* per-dir configuration */
53  typedef struct {
54    const char *fs_path;          /* path to the SVN FS */
55 -
56 +  const char *repo_name;        /* repository name */
57  } dav_svn_dir_conf;
58  
59  #define INHERIT_VALUE(parent, child, field) \
60 @@ -115,10 +115,21 @@
61      newconf = apr_pcalloc(p, sizeof(*newconf));
62  
63      newconf->fs_path = INHERIT_VALUE(parent, child, fs_path);
64 +    newconf->repo_name = INHERIT_VALUE(parent, child, repo_name);
65  
66      return newconf;
67  }
68  
69 +static const char *dav_svn_repo_name(cmd_parms *cmd, void *config,
70 +                                     const char *arg1)
71 +{
72 +  dav_svn_dir_conf *conf = config;
73 +
74 +  conf->repo_name = apr_pstrdup(cmd->pool, arg1);
75 +
76 +  return NULL;
77 +}
78 +
79  static const char *dav_svn_path_cmd(cmd_parms *cmd, void *config,
80                                      const char *arg1)
81  {
82 @@ -171,6 +182,14 @@
83      return conf->fs_path;
84  }
85  
86 +const char *dav_svn_get_repo_name(request_rec *r)
87 +{
88 +    dav_svn_dir_conf *conf;
89 +
90 +    conf = ap_get_module_config(r->per_dir_config, &dav_svn_module);
91 +    return conf->repo_name;
92 +}
93 +
94  const char *dav_svn_get_special_uri(request_rec *r)
95  {
96      dav_svn_server_conf *conf;
97 @@ -195,6 +214,10 @@
98                  "specify the URI component for special Subversion "
99                  "resources"),
100  
101 +  /* per directory/location */
102 +  AP_INIT_TAKE1("SVNReposName", dav_svn_repo_name, NULL, ACCESS_CONF,
103 +                "specify the name of a Subversion repository"),
104 +
105    { NULL }
106  };
107  
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
111 @@ -835,6 +835,7 @@
112                                          dav_resource **resource)
113  {
114    const char *fs_path;
115 +  const char *repo_name;
116    dav_resource_combined *comb;
117    dav_svn_repos *repos;
118    apr_size_t len1;
119 @@ -858,6 +859,8 @@
120                             "of this resource's repository.");
121      }
122  
123 +  repo_name = dav_svn_get_repo_name(r);
124 +
125    comb = apr_pcalloc(r->pool, sizeof(*comb));
126    comb->res.info = &comb->priv;
127    comb->res.hooks = &dav_svn_hooks_repos;
128 @@ -949,6 +952,9 @@
129    /* where is the SVN FS for this resource? */
130    repos->fs_path = fs_path;
131  
132 +  /* A name for the repository */
133 +  repos->repo_name = repo_name;
134 +
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 @@
139    apr_status_t status;
140  
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 @@
150    apr_status_t status;
151  
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);
163  
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,
168 +                          title);
169 +
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);
173  
174 @@ -1541,7 +1552,7 @@
175               "<a href=\"http://subversion.tigris.org/\">Subversion</a>"
176               "</em>\n</body></html>");
177  
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 @@
184            break;
185  
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 @@
195        }
196  
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
208 @@ -562,7 +562,7 @@
209    uc.output = output;
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);
214  
215    /* Get the root of the revision we want to update to. This will be used
216       to generated stable id values. */
This page took 0.114359 seconds and 3 git commands to generate.