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

« back to all changes in this revision

Viewing changes to subversion/tests/cmdline/svntest/objects.py

  • 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:
156
156
 
157
157
    """Run 'svnadmin dump' on the repository."""
158
158
    exit_code, stdout, stderr = \
159
 
      actions.run_and_verify_svnadmin(None, None, None,
 
159
      actions.run_and_verify_svnadmin(None, None,
160
160
                                      'dump', self.repo_absdir)
161
161
    ldumpfile = local_path(output_dir + "/svnadmin.dump")
162
162
    main.file_write(ldumpfile, ''.join(stderr))
167
167
    make, and each directory is a path relative to the repository root,
168
168
    neither starting nor ending with a slash."""
169
169
    urls = [self.repo_url + '/' + dir for dir in dirs]
170
 
    actions.run_and_verify_svn(None, None, [],
 
170
    actions.run_and_verify_svn(None, [],
171
171
                               'mkdir', '-m', 'svn_mkdirs()', '--parents',
172
172
                               *urls)
173
173
    self.head_rev += 1
207
207
 
208
208
  def svn_mkdir(self, rpath):
209
209
    lpath = local_path(rpath)
210
 
    actions.run_and_verify_svn(None, None, [], 'mkdir', lpath)
 
210
    actions.run_and_verify_svn(None, [], 'mkdir', lpath)
211
211
 
212
212
    self.state.add({
213
213
      rpath : wc.StateItem(status='A ')
216
216
#  def propset(self, pname, pvalue, *rpaths):
217
217
#    "Set property 'pname' to value 'pvalue' on each path in 'rpaths'"
218
218
#    local_paths = tuple([local_path(rpath) for rpath in rpaths])
219
 
#    actions.run_and_verify_svn(None, None, [], 'propset', pname, pvalue,
 
219
#    actions.run_and_verify_svn(None, [], 'propset', pname, pvalue,
220
220
#                               *local_paths)
221
221
 
222
222
  def svn_set_props(self, rpath, props):
224
224
    """
225
225
    lpath = local_path(rpath)
226
226
    #for prop in path's existing props:
227
 
    #  actions.run_and_verify_svn(None, None, [], 'propdel',
 
227
    #  actions.run_and_verify_svn(None, [], 'propdel',
228
228
    #                             prop, lpath)
229
229
    for prop in props:
230
 
      actions.run_and_verify_svn(None, None, [], 'propset',
 
230
      actions.run_and_verify_svn(None, [], 'propset',
231
231
                                 prop, props[prop], lpath)
232
232
    self.state.tweak(rpath, props=props)
233
233
 
240
240
      content = "This is the file '" + filename + "'.\n" + \
241
241
                "Last changed in '$Revision$'.\n"
242
242
    main.file_write(lpath, content)
243
 
    actions.run_and_verify_svn(None, None, [], 'add', lpath)
 
243
    actions.run_and_verify_svn(None, [], 'add', lpath)
244
244
 
245
245
    self.state.add({
246
246
      rpath : wc.StateItem(status='A ')
257
257
    lpath = local_path(rpath)
258
258
    if content is not None:
259
259
      #main.file_append(lpath, "An extra line.\n")
260
 
      #actions.run_and_verify_svn(None, None, [], 'propset',
 
260
      #actions.run_and_verify_svn(None, [], 'propset',
261
261
      #                           'newprop', 'v', lpath)
262
262
      main.file_write(lpath, content)
263
263
      self.state.tweak(rpath, content=content)
274
274
    args = [lpath1, lpath2]
275
275
    if parents:
276
276
      args += ['--parents']
277
 
    actions.run_and_verify_svn(None, None, [], 'copy', *args)
 
277
    actions.run_and_verify_svn(None, [], 'copy', *args)
278
278
    self.state.add({
279
279
      rpath2: self.state.desc[rpath1]
280
280
    })
292
292
      args += ['-r', rev]
293
293
    if parents:
294
294
      args += ['--parents']
295
 
    actions.run_and_verify_svn(None, None, [], 'copy', *args)
 
295
    actions.run_and_verify_svn(None, [], 'copy', *args)
296
296
    self.state.add({
297
297
      rpath2: self.state.desc[rpath1]
298
298
    })
303
303
    args = []
304
304
    if even_if_modified:
305
305
      args += ['--force']
306
 
    actions.run_and_verify_svn(None, None, [], 'delete', lpath, *args)
 
306
    actions.run_and_verify_svn(None, [], 'delete', lpath, *args)
307
307
 
308
308
  def svn_commit(self, rpath='', log=''):
309
309
    "Commit a WC path (recursively). Return the new revision number."
310
310
    lpath = local_path(rpath)
311
 
    actions.run_and_verify_svn(None, verify.AnyOutput, [],
 
311
    actions.run_and_verify_svn(verify.AnyOutput, [],
312
312
                               'commit', '-m', log, lpath)
313
313
    actions.run_and_verify_update(lpath, None, None, None)
314
314
    self.repo.head_rev += 1
332
332
#      exp_1 = "--- Merging r.* into '" + target_re + ".*':"
333
333
#      exp_2 = "(A |D |[UG] | [UG]|[UG][UG])   " + target_re + ".*"
334
334
#      exp_out = verify.RegexOutput(exp_1 + "|" + exp_2)
335
 
#    actions.run_and_verify_svn(None, exp_out, [],
 
335
#    actions.run_and_verify_svn(exp_out, [],
336
336
#                               'merge', rev_spec, lsource, ltarget)
337
337