comparison tests/test_util.py @ 1363:3c213ca49f7e stable

tests: update for behavior change in subversion 1.9 In revision r1592724, subversion changed 'svn propget' when no properties are there to be an error. This is mildly annoying but oh well. We work around this to achieve the old behavior. I pity the scripts that relied on that behavior.
author Sean Farley <sean@farley.io>
date Thu, 29 Oct 2015 17:18:41 -0700
parents 38be7a6b6def
children 89997a5fc181
comparison
equal deleted inserted replaced
1361:d227cf8d0860 1363:3c213ca49f7e
356 args = ['svn', 'propget', '-r', str(rev), prop, path] 356 args = ['svn', 'propget', '-r', str(rev), prop, path]
357 p = subprocess.Popen(args, 357 p = subprocess.Popen(args,
358 stdout=subprocess.PIPE, 358 stdout=subprocess.PIPE,
359 stderr=subprocess.STDOUT) 359 stderr=subprocess.STDOUT)
360 stdout, stderr = p.communicate() 360 stdout, stderr = p.communicate()
361 if p.returncode: 361 if p.returncode and stderr:
362 raise Exception('svn ls failed on %s: %r' % (path, stderr)) 362 raise Exception('svn ls failed on %s: %r' % (path, stderr))
363 if 'W200017' in stdout:
364 # subversion >= 1.9 changed 'no properties' to be an error, so let's
365 # avoid that
366 return ''
363 return stdout.strip() 367 return stdout.strip()
364 368
365 369
366 def _obsolete_wrap(cls, name): 370 def _obsolete_wrap(cls, name):
367 origfunc = getattr(cls, name) 371 origfunc = getattr(cls, name)