Mercurial > hgsubversion
comparison tests/test_svnwrap.py @ 479:83fcb1cf6d8f
Avoid 'ValueError: close_fds is not supported on Windows platforms' exception
| author | Risto Kankkunen <risto.kankkunen@iki.fi> |
|---|---|
| date | Wed, 29 Jul 2009 17:26:29 +0300 |
| parents | 37304494cd15 |
| children | 7fa100ae1a11 |
comparison
equal
deleted
inserted
replaced
| 478:37304494cd15 | 479:83fcb1cf6d8f |
|---|---|
| 15 self.repo_path = '%s/testrepo' % self.tmpdir | 15 self.repo_path = '%s/testrepo' % self.tmpdir |
| 16 subprocess.call(['svnadmin', 'create', self.repo_path,]) | 16 subprocess.call(['svnadmin', 'create', self.repo_path,]) |
| 17 inp = open(os.path.join(os.path.dirname(__file__), 'fixtures', | 17 inp = open(os.path.join(os.path.dirname(__file__), 'fixtures', |
| 18 'project_root_at_repo_root.svndump')) | 18 'project_root_at_repo_root.svndump')) |
| 19 proc = subprocess.call(['svnadmin', 'load', self.repo_path,], | 19 proc = subprocess.call(['svnadmin', 'load', self.repo_path,], |
| 20 stdin=inp, close_fds=True, | 20 stdin=inp, |
| 21 close_fds=test_util.canCloseFds, | |
| 21 stdout=subprocess.PIPE, | 22 stdout=subprocess.PIPE, |
| 22 stderr=subprocess.STDOUT) | 23 stderr=subprocess.STDOUT) |
| 23 assert proc == 0 | 24 assert proc == 0 |
| 24 self.repo = svnwrap.SubversionRepo('file://%s' % self.repo_path) | 25 self.repo = svnwrap.SubversionRepo('file://%s' % self.repo_path) |
| 25 | 26 |
| 60 self.repo_path = '%s/testrepo' % self.tmpdir | 61 self.repo_path = '%s/testrepo' % self.tmpdir |
| 61 subprocess.call(['svnadmin', 'create', self.repo_path,]) | 62 subprocess.call(['svnadmin', 'create', self.repo_path,]) |
| 62 inp = open(os.path.join(os.path.dirname(__file__), 'fixtures', | 63 inp = open(os.path.join(os.path.dirname(__file__), 'fixtures', |
| 63 'project_root_not_repo_root.svndump')) | 64 'project_root_not_repo_root.svndump')) |
| 64 ret = subprocess.call(['svnadmin', 'load', self.repo_path,], | 65 ret = subprocess.call(['svnadmin', 'load', self.repo_path,], |
| 65 stdin=inp, close_fds=True, | 66 stdin=inp, |
| 67 close_fds=test_util.canCloseFds, | |
| 66 stdout=subprocess.PIPE, | 68 stdout=subprocess.PIPE, |
| 67 stderr=subprocess.STDOUT) | 69 stderr=subprocess.STDOUT) |
| 68 assert ret == 0 | 70 assert ret == 0 |
| 69 self.repo = svnwrap.SubversionRepo('file://%s/dummyproj' % | 71 self.repo = svnwrap.SubversionRepo('file://%s/dummyproj' % |
| 70 self.repo_path) | 72 self.repo_path) |
