comparison tests/test_util.py @ 793:e698be84c22d

pushmod: fix binary files svn:mime-type (issue255) - Handle single directory layout - Reset svn:mime-type when the file is no longer binary
author Patrick Mezard <pmezard@gmail.com>
date Thu, 10 Mar 2011 22:17:56 +0100
parents f3af4fe98d37
children f07bfd66db13
comparison
equal deleted inserted replaced
792:ba65c0b01d4f 793:e698be84c22d
348 stdout=subprocess.PIPE, 348 stdout=subprocess.PIPE,
349 stderr=subprocess.STDOUT) 349 stderr=subprocess.STDOUT)
350 stdout, stderr = p.communicate() 350 stdout, stderr = p.communicate()
351 if p.returncode: 351 if p.returncode:
352 raise Exception('svn co failed on %s: %r' % (svnpath, stderr)) 352 raise Exception('svn co failed on %s: %r' % (svnpath, stderr))
353
354 def svnpropget(self, path, prop, rev='HEAD'):
355 path = self.repo_path + '/' + path
356 path = util.normalize_url(fileurl(path))
357 args = ['svn', 'propget', '-r', str(rev), prop, path]
358 p = subprocess.Popen(args,
359 stdout=subprocess.PIPE,
360 stderr=subprocess.STDOUT)
361 stdout, stderr = p.communicate()
362 if p.returncode:
363 raise Exception('svn ls failed on %s: %r' % (path, stderr))
364 return stdout.strip()
353 365
354 def commitchanges(self, changes, parent='tip', message='automated test'): 366 def commitchanges(self, changes, parent='tip', message='automated test'):
355 """Commit changes to mercurial directory 367 """Commit changes to mercurial directory
356 368
357 'changes' is a sequence of tuples (source, dest, data). It can look 369 'changes' is a sequence of tuples (source, dest, data). It can look