~ubuntu-branches/debian/sid/subversion/sid

« back to all changes in this revision

Viewing changes to subversion/libsvn_client/log.c

  • Committer: Package Import Robot
  • Author(s): James McCoy
  • Date: 2015-08-07 21:32:47 UTC
  • mfrom: (0.2.15) (4.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20150807213247-ozyewtmgsr6tkewl
Tags: 1.9.0-1
* Upload to unstable
* New upstream release.
  + Security fixes
    - CVE-2015-3184: Mixed anonymous/authenticated path-based authz with
      httpd 2.4
    - CVE-2015-3187: svn_repos_trace_node_locations() reveals paths hidden
      by authz
* Add >= 2.7 requirement for python-all-dev Build-Depends, needed to run
  tests.
* Remove Build-Conflicts against ruby-test-unit.  (Closes: #791844)
* Remove patches/apache_module_dependency in favor of expressing the
  dependencies in authz_svn.load/dav_svn.load.
* Build-Depend on apache2-dev (>= 2.4.16) to ensure ap_some_authn_required()
  is available when building mod_authz_svn and Depend on apache2-bin (>=
  2.4.16) for runtime support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
                            svn_revnum_t *original_revision,
97
97
                            const char *path_or_url,
98
98
                            const svn_opt_revision_t *revision,
 
99
                            svn_ra_session_t *ra_session,
99
100
                            svn_client_ctx_t *ctx,
100
101
                            apr_pool_t *result_pool,
101
102
                            apr_pool_t *scratch_pool)
103
104
  svn_error_t *err;
104
105
  copyfrom_info_t copyfrom_info = { 0 };
105
106
  apr_pool_t *sesspool = svn_pool_create(scratch_pool);
106
 
  svn_ra_session_t *ra_session;
107
107
  svn_client__pathrev_t *at_loc;
 
108
  const char *old_session_url = NULL;
108
109
 
109
110
  copyfrom_info.is_first = TRUE;
110
111
  copyfrom_info.path = NULL;
111
112
  copyfrom_info.rev = SVN_INVALID_REVNUM;
112
113
  copyfrom_info.pool = result_pool;
113
114
 
114
 
  SVN_ERR(svn_client__ra_session_from_path2(&ra_session, &at_loc,
115
 
                                            path_or_url, NULL,
116
 
                                            revision, revision,
117
 
                                            ctx, sesspool));
 
115
  if (!ra_session)
 
116
    {
 
117
      SVN_ERR(svn_client__ra_session_from_path2(&ra_session, &at_loc,
 
118
                                                path_or_url, NULL,
 
119
                                                revision, revision,
 
120
                                                ctx, sesspool));
 
121
    }
 
122
  else
 
123
    {
 
124
      const char *url;
 
125
      if (svn_path_is_url(path_or_url))
 
126
        url = path_or_url;
 
127
      else
 
128
        {
 
129
          SVN_ERR(svn_client_url_from_path2(&url, path_or_url, ctx, sesspool,
 
130
                                            sesspool));
 
131
 
 
132
          if (! url)
 
133
            return svn_error_createf(SVN_ERR_ENTRY_MISSING_URL, NULL,
 
134
                                     _("'%s' has no URL"), path_or_url);
 
135
        }
 
136
 
 
137
      SVN_ERR(svn_client__ensure_ra_session_url(&old_session_url, ra_session,
 
138
                                                url, sesspool));
 
139
 
 
140
      err = svn_client__resolve_rev_and_url(&at_loc, ra_session, path_or_url,
 
141
                                            revision, revision, ctx,
 
142
                                            sesspool);
 
143
 
 
144
      /* On error reparent back (and return), otherwise reparent to new
 
145
         location */
 
146
      SVN_ERR(svn_error_compose_create(
 
147
                err,
 
148
                svn_ra_reparent(ra_session, err ? old_session_url
 
149
                                                : at_loc->url, sesspool)));
 
150
    }
118
151
 
119
152
  /* Find the copy source.  Walk the location segments to find the revision
120
153
     at which this node was created (copied or added). */
124
157
                                     copyfrom_info_receiver, &copyfrom_info,
125
158
                                     scratch_pool);
126
159
 
 
160
  if (old_session_url)
 
161
    err = svn_error_compose_create(
 
162
                    err,
 
163
                    svn_ra_reparent(ra_session, old_session_url, sesspool));
 
164
 
127
165
  svn_pool_destroy(sesspool);
128
166
 
129
167
  if (err)
265
303
 
266
304
   The limitations on TARGETS specified by svn_client_log5 are enforced here.
267
305
   So TARGETS can only contain a single WC path or a URL and zero or more
268
 
   relative paths -- anything else will raise an error. 
 
306
   relative paths -- anything else will raise an error.
269
307
 
270
308
   PEG_REVISION, TARGETS, and CTX are as per svn_client_log5.
271
309
 
604
642
               apr_array_header_t *log_segments,
605
643
               svn_client__pathrev_t *actual_loc,
606
644
               svn_ra_session_t *ra_session,
607
 
               /* The following are as per svn_client_log5. */ 
 
645
               /* The following are as per svn_client_log5. */
608
646
               const apr_array_header_t *targets,
609
647
               int limit,
610
648
               svn_boolean_t discover_changed_paths,
723
761
         So to be safe we handle that case. */
724
762
      if (matching_segment == NULL)
725
763
        continue;
726
 
      
 
764
 
727
765
      /* A segment with a NULL path means there is gap in the history.
728
766
         We'll just proceed and let svn_ra_get_log2 fail with a useful
729
767
         error...*/
905
943
  SVN_ERR(run_ra_get_log(revision_ranges, relative_targets, log_segments,
906
944
                         actual_loc, ra_session, targets, limit,
907
945
                         discover_changed_paths, strict_node_history,
908
 
                         include_merged_revisions, revprops, real_receiver,
909
 
                         real_receiver_baton, ctx, pool));
 
946
                         include_merged_revisions, revprops,
 
947
                         real_receiver, real_receiver_baton, ctx, pool));
910
948
 
911
949
  return SVN_NO_ERROR;
912
950
}