Mercurial > bitten > bitten-test
changeset 605:c94481bc4646
0.6dev: Reverting [677] as many of these paths are also used for URLs, and hadn't considered this change enough. No major point in changing code that already works well, so simply reverting seems the best idea...
author | osimons |
---|---|
date | Thu, 30 Jul 2009 19:51:11 +0000 |
parents | 74618e617c4c |
children | 07ac9218f649 |
files | bitten/build/ctools.py bitten/build/javatools.py bitten/build/monotools.py bitten/build/svntools.py bitten/web_ui.py |
diffstat | 5 files changed, 14 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/bitten/build/ctools.py +++ b/bitten/build/ctools.py @@ -13,6 +13,7 @@ import logging import re import os +import posixpath import shlex from bitten.build import CommandLine, FileSet @@ -171,7 +172,7 @@ for file_elem in location.children('File'): filepath = file_elem.gettext() if srcdir is not None: - filepath = os.path.join(srcdir, filepath) + filepath = posixpath.join(srcdir, filepath) test.attr['file'] = filepath break for line_elem in location.children('Line'):
--- a/bitten/build/javatools.py +++ b/bitten/build/javatools.py @@ -14,6 +14,7 @@ from glob import glob import logging import os +import posixpath import shlex import tempfile @@ -119,7 +120,7 @@ test.attr['duration'] = testcase.attr['time'] if srcdir is not None: cls = testcase.attr['classname'].split('.') - test.attr['file'] = os.path.join(srcdir, *cls) + \ + test.attr['file'] = posixpath.join(srcdir, *cls) + \ '.java' result = list(testcase.children()) @@ -216,7 +217,7 @@ for filename, name in class_names.iteritems(): counter = counters[filename] module = xmlio.Element('coverage', name=name, - file=os.path.join(srcdir, filename), + file=posixpath.join(srcdir, filename), lines=counter.num_lines, percentage=counter.percentage) module.append(xmlio.Element('line_hits')[counter.line_hits])
--- a/bitten/build/monotools.py +++ b/bitten/build/monotools.py @@ -15,6 +15,7 @@ from glob import glob import logging import os +import posixpath import shlex import tempfile
--- a/bitten/build/svntools.py +++ b/bitten/build/svntools.py @@ -11,6 +11,7 @@ """Recipe commands for Subversion.""" import logging +import posixpath import re import shutil import os @@ -85,7 +86,7 @@ if revision: args += ['-r', revision] if path: - final_url = os.path.join(url, path.lstrip('/')) + final_url = posixpath.join(url, path.lstrip('/')) else: final_url = url if username: @@ -128,7 +129,7 @@ if revision: args += ['-r', revision] if path: - url = os.path.join(url, path) + url = posixpath.join(url, path) if username: args += ['--username', username] if password:
--- a/bitten/web_ui.py +++ b/bitten/web_ui.py @@ -10,7 +10,7 @@ """Implementation of the Bitten web interface.""" -import os +import posixpath import re from StringIO import StringIO @@ -708,16 +708,16 @@ cache = {} def _replace(m): - filepath = os.path.normpath(m.group('path').replace('\\', '/')) + filepath = posixpath.normpath(m.group('path').replace('\\', '/')) if not cache.get(filepath) is True: parts = filepath.split('/') path = '' for part in parts: - path = os.path.join(path, part) + path = posixpath.join(path, part) if path not in cache: try: - full_path = os.path.join(config.path, path) - full_path = os.path.normpath(full_path) + full_path = posixpath.join(config.path, path) + full_path = posixpath.normpath(full_path) if full_path.startswith(config.path + "/") \ or full_path == config.path: repos.get_node(full_path,