comparison tests/test_util.py @ 242:06130689a2c8

Move push into svncommands.
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Wed, 08 Apr 2009 17:53:48 +0200
parents 4950b18cf949
children ffccf0080e54
comparison
equal deleted inserted replaced
241:4950b18cf949 242:06130689a2c8
12 from mercurial import hg 12 from mercurial import hg
13 from mercurial import node 13 from mercurial import node
14 from mercurial import ui 14 from mercurial import ui
15 15
16 import svncommands 16 import svncommands
17 import push_cmd
18 17
19 # Fixtures that need to be pulled at a subdirectory of the repo path 18 # Fixtures that need to be pulled at a subdirectory of the repo path
20 subdir = {'truncatedhistory.svndump': '/project2', 19 subdir = {'truncatedhistory.svndump': '/project2',
21 'fetch_missing_files_subdir.svndump': '/foo', 20 'fetch_missing_files_subdir.svndump': '/foo',
22 } 21 }
120 def repo(self): 119 def repo(self):
121 return hg.repository(ui.ui(), self.wc_path) 120 return hg.repository(ui.ui(), self.wc_path)
122 121
123 def pushrevisions(self, stupid=False): 122 def pushrevisions(self, stupid=False):
124 before = len(self.repo) 123 before = len(self.repo)
125 push_cmd.push_revisions_to_subversion( 124 svncommands.push(ui.ui(), repo=self.repo, hg_repo_path=self.wc_path,
126 ui.ui(), repo=self.repo, hg_repo_path=self.wc_path, 125 svn_url=fileurl(self.repo_path), stupid=stupid)
127 svn_url=fileurl(self.repo_path), stupid=stupid)
128 after = len(self.repo) 126 after = len(self.repo)
129 self.assertEqual(0, after - before) 127 self.assertEqual(0, after - before)
130 128
131 def svnls(self, path, rev='HEAD'): 129 def svnls(self, path, rev='HEAD'):
132 path = self.repo_path + '/' + path 130 path = self.repo_path + '/' + path