Ejemplo n.º 1
0
 def _committers_py_path(self):
     # extension can sometimes be .pyc, we always want .py
     (path, extension) = os.path.splitext(committers.__file__)
     # FIXME: When we're allowed to use python 2.6 we can use the real
     # os.path.relpath
     path = relpath(path, self._checkout_root())
     return ".".join([path, "py"])
Ejemplo n.º 2
0
 def _committers_py_path(self):
     # extension can sometimes be .pyc, we always want .py
     (path, extension) = os.path.splitext(committers.__file__)
     # FIXME: When we're allowed to use python 2.6 we can use the real
     # os.path.relpath
     path = relpath(path, self._checkout_root())
     return ".".join([path, "py"])
Ejemplo n.º 3
0
 def default_configuration(self):
     # This is a bit of a hack. This state exists in a much nicer form in
     # perl-land.
     configuration = ospath.relpath(
         self._webkit_build_directory(["--configuration"]), self._webkit_build_directory(["--top-level"])
     )
     assert configuration == "Debug" or configuration == "Release"
     return configuration
Ejemplo n.º 4
0
 def default_configuration(self):
     # This is a bit of a hack. This state exists in a much nicer form in
     # perl-land.
     configuration = ospath.relpath(
         self._webkit_build_directory(["--configuration"]),
         self._webkit_build_directory(["--top-level"]))
     assert (configuration == "Debug" or configuration == "Release")
     return configuration
Ejemplo n.º 5
0
 def __init__(self, cwd, patch_directories, executive=None):
     SCM.__init__(self, cwd, executive)
     self._bogus_dir = None
     if patch_directories == []:
         # FIXME: ScriptError is for Executive, this should probably be a normal Exception.
         raise ScriptError(script_args=svn_info_args, message='Empty list of patch directories passed to SCM.__init__')
     elif patch_directories == None:
         self._patch_directories = [ospath.relpath(cwd, self.checkout_root)]
     else:
         self._patch_directories = patch_directories
Ejemplo n.º 6
0
 def __init__(self, cwd, patch_directories, executive=None):
     SCM.__init__(self, cwd, executive)
     self._bogus_dir = None
     if patch_directories == []:
         # FIXME: ScriptError is for Executive, this should probably be a normal Exception.
         raise ScriptError(script_args=svn_info_args, message='Empty list of patch directories passed to SCM.__init__')
     elif patch_directories == None:
         self._patch_directories = [ospath.relpath(cwd, self.checkout_root)]
     else:
         self._patch_directories = patch_directories
Ejemplo n.º 7
0
def get_relative_test_path(filename, relative_to, checkout_root=scm.find_checkout_root()):
    """Constructs a relative path to |filename| from |relative_to|.
    Args:
        filename: The test file we're trying to get a relative path to.
        relative_to: The absolute path we're relative to.
    Returns:
        A relative path to filename or None if |filename| is not below
        |relative_to|.
    """
    layout_test_dir = os.path.join(checkout_root, "LayoutTests")
    abs_path = os.path.join(layout_test_dir, filename)
    return ospath.relpath(abs_path, relative_to)
def get_relative_test_path(filename, relative_to,
                           checkout_root=scm.find_checkout_root()):
    """Constructs a relative path to |filename| from |relative_to|.
    Args:
        filename: The test file we're trying to get a relative path to.
        relative_to: The absolute path we're relative to.
    Returns:
        A relative path to filename or None if |filename| is not below
        |relative_to|.
    """
    layout_test_dir = os.path.join(checkout_root, 'LayoutTests')
    abs_path = os.path.join(layout_test_dir, filename)
    return ospath.relpath(abs_path, relative_to)
Ejemplo n.º 9
0
 def relpath(self, path, start='.'):
     return ospath.relpath(path, start)
Ejemplo n.º 10
0
 def relpath(self, path, start='.'):
     return ospath.relpath(path, start, self.abspath, self.sep)
Ejemplo n.º 11
0
 def relpath(self, path, start='.'):
     return ospath.relpath(path, start)
Ejemplo n.º 12
0
 def _rel_path(self, path, abs_start_path):
     return relpath(path, abs_start_path, self.os_path_abspath)
Ejemplo n.º 13
0
 def relpath(self, path, start='.'):
     return ospath.relpath(path, start, self.abspath, self.sep)
Ejemplo n.º 14
0
 def _rel_path(self, path, abs_start_path):
     return relpath(path, abs_start_path, self.os_path_abspath)