]> git.pld-linux.org Git - packages/subversion.git/blob - subversion-apache2.patch
b1352c2189798099f9c184797db906da subversion-r1587.tar.gz
[packages/subversion.git] / subversion-apache2.patch
1 diff -urN subversion-r1587.org/subversion/mod_dav_svn/log.c subversion-r1587/subversion/mod_dav_svn/log.c
2 --- subversion-r1587.org/subversion/mod_dav_svn/log.c   Mon Apr  8 20:08:50 2002
3 +++ subversion-r1587/subversion/mod_dav_svn/log.c       Mon Apr  8 21:40:00 2002
4 @@ -193,7 +193,8 @@
5        /* else unknown element; skip it */
6      }
7  
8 -  lrb.bb = apr_brigade_create(resource->pool);  /* not the subpool! */
9 +  lrb.bb = apr_brigade_create(resource->pool,  /* not the subpool! */
10 +                              output->c->bucket_alloc);
11    lrb.output = output;
12    lrb.pool = svn_pool_create(resource->pool);
13  
14 diff -urN subversion-r1587.org/subversion/mod_dav_svn/merge.c subversion-r1587/subversion/mod_dav_svn/merge.c
15 --- subversion-r1587.org/subversion/mod_dav_svn/merge.c Mon Apr  8 20:08:50 2002
16 +++ subversion-r1587/subversion/mod_dav_svn/merge.c     Mon Apr  8 21:40:01 2002
17 @@ -339,7 +339,7 @@
18                                   "previous revision.");
19      }
20  
21 -  bb = apr_brigade_create(pool);
22 +  bb = apr_brigade_create(pool, output->c->bucket_alloc);
23  
24    /* prep some strings */
25    
26 diff -urN subversion-r1587.org/subversion/mod_dav_svn/mod_dav_svn.c subversion-r1587/subversion/mod_dav_svn/mod_dav_svn.c
27 --- subversion-r1587.org/subversion/mod_dav_svn/mod_dav_svn.c   Mon Apr  8 20:08:50 2002
28 +++ subversion-r1587/subversion/mod_dav_svn/mod_dav_svn.c       Mon Apr  8 21:40:25 2002
29 @@ -45,7 +45,7 @@
30  /* per-dir configuration */
31  typedef struct {
32    const char *fs_path;          /* path to the SVN FS */
33 -
34 +  const char *repo_name;        /* repository name */
35  } dav_svn_dir_conf;
36  
37  #define INHERIT_VALUE(parent, child, field) \
38 @@ -115,10 +115,21 @@
39      newconf = apr_pcalloc(p, sizeof(*newconf));
40  
41      newconf->fs_path = INHERIT_VALUE(parent, child, fs_path);
42 +    newconf->repo_name = INHERIT_VALUE(parent, child, repo_name);
43  
44      return newconf;
45  }
46  
47 +static const char *dav_svn_repo_name(cmd_parms *cmd, void *config,
48 +                                     const char *arg1)
49 +{
50 +  dav_svn_dir_conf *conf = config;
51 +
52 +  conf->repo_name = apr_pstrdup(cmd->pool, arg1);
53 +
54 +  return NULL;
55 +}
56 +
57  static const char *dav_svn_path_cmd(cmd_parms *cmd, void *config,
58                                      const char *arg1)
59  {
60 @@ -171,6 +182,14 @@
61      return conf->fs_path;
62  }
63  
64 +const char *dav_svn_get_repo_name(request_rec *r)
65 +{
66 +    dav_svn_dir_conf *conf;
67 +
68 +    conf = ap_get_module_config(r->per_dir_config, &dav_svn_module);
69 +    return conf->repo_name;
70 +}
71 +
72  const char *dav_svn_get_special_uri(request_rec *r)
73  {
74      dav_svn_server_conf *conf;
75 @@ -195,6 +214,10 @@
76                  "specify the URI component for special Subversion "
77                  "resources"),
78  
79 +  /* per directory/location */
80 +  AP_INIT_TAKE1("SVNReposName", dav_svn_repo_name, NULL, ACCESS_CONF,
81 +                "specify the name of a Subversion repository"),
82 +
83    { NULL }
84  };
85  
86 diff -urN subversion-r1587.org/subversion/mod_dav_svn/repos.c subversion-r1587/subversion/mod_dav_svn/repos.c
87 --- subversion-r1587.org/subversion/mod_dav_svn/repos.c Mon Apr  8 20:08:50 2002
88 +++ subversion-r1587/subversion/mod_dav_svn/repos.c     Mon Apr  8 21:40:02 2002
89 @@ -835,6 +835,7 @@
90                                          dav_resource **resource)
91  {
92    const char *fs_path;
93 +  const char *repo_name;
94    dav_resource_combined *comb;
95    dav_svn_repos *repos;
96    apr_size_t len1;
97 @@ -858,6 +859,8 @@
98                             "of this resource's repository.");
99      }
100  
101 +  repo_name = dav_svn_get_repo_name(r);
102 +
103    comb = apr_pcalloc(r->pool, sizeof(*comb));
104    comb->res.info = &comb->priv;
105    comb->res.hooks = &dav_svn_hooks_repos;
106 @@ -949,6 +952,9 @@
107    /* where is the SVN FS for this resource? */
108    repos->fs_path = fs_path;
109  
110 +  /* A name for the repository */
111 +  repos->repo_name = repo_name;
112 +
113    /* Remember various bits for later URL construction */
114    repos->base_url = ap_construct_url(r->pool, "", r);
115    repos->special_uri = dav_svn_get_special_uri(r);
116 @@ -1421,8 +1427,8 @@
117    apr_status_t status;
118  
119    /* take the current data and shove it into the filter */
120 -  bb = apr_brigade_create(dc->pool);
121 -  bkt = apr_bucket_transient_create(buffer, *len);
122 +  bb = apr_brigade_create(dc->pool, dc->output->c->bucket_alloc);
123 +  bkt = apr_bucket_transient_create(buffer, *len, dc->output->c->bucket_alloc);
124    APR_BRIGADE_INSERT_TAIL(bb, bkt);
125    if ((status = ap_pass_brigade(dc->output, bb)) != APR_SUCCESS) {
126      return svn_error_create(status, 0, NULL, dc->pool,
127 @@ -1440,8 +1446,8 @@
128    apr_status_t status;
129  
130    /* done with the file. write an EOS bucket now. */
131 -  bb = apr_brigade_create(dc->pool);
132 -  bkt = apr_bucket_eos_create();
133 +  bb = apr_brigade_create(dc->pool, dc->output->c->bucket_alloc);
134 +  bkt = apr_bucket_eos_create(dc->output->c->bucket_alloc);
135    APR_BRIGADE_INSERT_TAIL(bb, bkt);
136    if ((status = ap_pass_brigade(dc->output, bb)) != APR_SUCCESS) {
137      return svn_error_create(status, 0, NULL, dc->pool,
138 @@ -1489,7 +1495,12 @@
139        title = apr_psprintf(resource->pool, "Revision %ld: %s",
140                             resource->info->root.rev, title);
141  
142 -    bb = apr_brigade_create(resource->pool);
143 +    if (resource->info->repos->repo_name)
144 +      title = apr_psprintf(resource->pool, "%s - %s",
145 +                          resource->info->repos->repo_name,
146 +                          title);
147 +
148 +    bb = apr_brigade_create(resource->pool, output->c->bucket_alloc);
149      ap_fprintf(output, bb, "<html><head><title>%s</title></head>\n"
150                "<body>\n <h2>%s</h2>\n <ul>\n", title, title);
151  
152 @@ -1541,7 +1552,7 @@
153               "<a href=\"http://subversion.tigris.org/\">Subversion</a>"
154               "</em>\n</body></html>");
155  
156 -    bkt = apr_bucket_eos_create();
157 +    bkt = apr_bucket_eos_create(output->c->bucket_alloc);
158      APR_BRIGADE_INSERT_TAIL(bb, bkt);
159      if ((status = ap_pass_brigade(output, bb)) != APR_SUCCESS) {
160        return dav_new_error(resource->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
161 @@ -1587,8 +1598,8 @@
162            break;
163  
164          /* build a brigade and write to the filter ... */
165 -        bb = apr_brigade_create(resource->pool);
166 -        bkt = apr_bucket_transient_create(block, bufsize);
167 +        bb = apr_brigade_create(resource->pool, output->c->bucket_alloc);
168 +        bkt = apr_bucket_transient_create(block, bufsize, output->c->bucket_alloc);
169          APR_BRIGADE_INSERT_TAIL(bb, bkt);
170          if ((status = ap_pass_brigade(output, bb)) != APR_SUCCESS) {
171            /* ### what to do with status; and that HTTP code... */
172 @@ -1598,8 +1609,8 @@
173        }
174  
175        /* done with the file. write an EOS bucket now. */
176 -      bb = apr_brigade_create(resource->pool);
177 -      bkt = apr_bucket_eos_create();
178 +      bb = apr_brigade_create(resource->pool, output->c->bucket_alloc);
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          /* ### what to do with status; and that HTTP code... */
183 diff -urN subversion-r1587.org/subversion/mod_dav_svn/update.c subversion-r1587/subversion/mod_dav_svn/update.c
184 --- subversion-r1587.org/subversion/mod_dav_svn/update.c        Mon Apr  8 20:08:50 2002
185 +++ subversion-r1587/subversion/mod_dav_svn/update.c    Mon Apr  8 21:40:04 2002
186 @@ -562,7 +562,7 @@
187    uc.output = output;
188    uc.anchor = resource->info->repos_path;
189    uc.dst_path = dst_path;
190 -  uc.bb = apr_brigade_create(resource->pool);
191 +  uc.bb = apr_brigade_create(resource->pool, output->c->bucket_alloc);
192  
193    /* Get the root of the revision we want to update to. This will be used
194       to generated stable id values. */
This page took 0.09135 seconds and 3 git commands to generate.