# HG changeset patch # User osimons # Date 1248983471 0 # Node ID c94481bc46467cbf3f89be344acbdef552b8e108 # Parent 74618e617c4cc77199e7903da0a329b85f69f6b7 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... diff --git a/bitten/build/ctools.py b/bitten/build/ctools.py --- 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'): diff --git a/bitten/build/javatools.py b/bitten/build/javatools.py --- 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]) diff --git a/bitten/build/monotools.py b/bitten/build/monotools.py --- 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 diff --git a/bitten/build/svntools.py b/bitten/build/svntools.py --- 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: diff --git a/bitten/web_ui.py b/bitten/web_ui.py --- 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,