comparison tests/test_util.py @ 333:a59ab58969d9

test_util: normalize path in svnls()
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Tue, 12 May 2009 20:12:32 +0200
parents 75f082b5897e
children 3c3c3264c362
comparison
equal deleted inserted replaced
332:56d877e6ccbb 333:a59ab58969d9
11 from mercurial import context 11 from mercurial import context
12 from mercurial import commands 12 from mercurial import commands
13 from mercurial import hg 13 from mercurial import hg
14 from mercurial import node 14 from mercurial import node
15 from mercurial import ui 15 from mercurial import ui
16
17 import util
16 18
17 # Fixtures that need to be pulled at a subdirectory of the repo path 19 # Fixtures that need to be pulled at a subdirectory of the repo path
18 subdir = {'truncatedhistory.svndump': '/project2', 20 subdir = {'truncatedhistory.svndump': '/project2',
19 'fetch_missing_files_subdir.svndump': '/foo', 21 'fetch_missing_files_subdir.svndump': '/foo',
20 'empty_dir_in_trunk_not_repo_root.svndump': '/project', 22 'empty_dir_in_trunk_not_repo_root.svndump': '/project',
114 after = len(self.repo) 116 after = len(self.repo)
115 self.assertEqual(0, after - before) 117 self.assertEqual(0, after - before)
116 118
117 def svnls(self, path, rev='HEAD'): 119 def svnls(self, path, rev='HEAD'):
118 path = self.repo_path + '/' + path 120 path = self.repo_path + '/' + path
119 path = fileurl(path) 121 path = util.normalize_url(fileurl(path))
120 args = ['svn', 'ls', '-r', rev, '-R', path] 122 args = ['svn', 'ls', '-r', rev, '-R', path]
121 p = subprocess.Popen(args, 123 p = subprocess.Popen(args,
122 stdout=subprocess.PIPE, 124 stdout=subprocess.PIPE,
123 stderr=subprocess.STDOUT) 125 stderr=subprocess.STDOUT)
124 stdout, stderr = p.communicate() 126 stdout, stderr = p.communicate()