Mercurial > hgsubversion
comparison tests/test_push_command.py @ 866:20e73b5ab6f7
test_util: merge load_svndump_fixture() into TestBase
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Thu, 19 Apr 2012 18:29:28 +0200 |
parents | 04729f3a3d17 |
children | a279b5838aaf |
comparison
equal
deleted
inserted
replaced
865:04729f3a3d17 | 866:20e73b5ab6f7 |
---|---|
74 pass | 74 pass |
75 tip = self.repo['tip'] | 75 tip = self.repo['tip'] |
76 self.assertEqual(new_hash, tip.node()) | 76 self.assertEqual(new_hash, tip.node()) |
77 | 77 |
78 def internal_push_over_svnserve(self, subdir='', commit=True): | 78 def internal_push_over_svnserve(self, subdir='', commit=True): |
79 test_util.load_svndump_fixture(self.repo_path, 'simple_branch.svndump') | 79 repo_path = self.load_svndump('simple_branch.svndump') |
80 open(os.path.join(self.repo_path, 'conf', 'svnserve.conf'), | 80 open(os.path.join(repo_path, 'conf', 'svnserve.conf'), |
81 'w').write('[general]\nanon-access=write\n[sasl]\n') | 81 'w').write('[general]\nanon-access=write\n[sasl]\n') |
82 self.port = random.randint(socket.IPPORT_USERRESERVED, 65535) | 82 self.port = random.randint(socket.IPPORT_USERRESERVED, 65535) |
83 self.host = 'localhost' | 83 self.host = 'localhost' |
84 args = ['svnserve', '--daemon', '--foreground', | 84 args = ['svnserve', '--daemon', '--foreground', |
85 '--listen-port=%d' % self.port, | 85 '--listen-port=%d' % self.port, |
86 '--listen-host=%s' % self.host, | 86 '--listen-host=%s' % self.host, |
87 '--root=%s' % self.repo_path] | 87 '--root=%s' % repo_path] |
88 | 88 |
89 svnserve = subprocess.Popen(args, stdout=subprocess.PIPE, | 89 svnserve = subprocess.Popen(args, stdout=subprocess.PIPE, |
90 stderr=subprocess.STDOUT) | 90 stderr=subprocess.STDOUT) |
91 self.svnserve_pid = svnserve.pid | 91 self.svnserve_pid = svnserve.pid |
92 try: | 92 try: |