telemetry.internal.util.bootstrap | index telemetry/internal/util/bootstrap.py

`Bootstrap Chrome Telemetry by downloading all its files from SVN servers.
Requires a DEPS file to specify which directories on which SVN servers
are required to run Telemetry. Format of that DEPS file is a subset of the
normal DEPS file format[1]; currently only only the "deps" dictionary is
supported and nothing else.
Fetches all files in the specified directories using WebDAV (SVN is WebDAV under
the hood).
[1] http://dev.chromium.org/developers/how-tos/depottools#TOC-DEPS-file`

Modules
`` |  |

imp logging | os urllib | urlparse |

Classes
`` |  |

__builtin__.object
  DAVClientWrapper

class DAVClientWrapper(__builtin__.object)
`` | `Knows how to retrieve subdirectories and files from WebDAV/SVN servers.`
| Methods defined here:

GetDirList(self, path)
  `Returns string names of all files and subdirs of path on the server.`

IsFile(self, path)
  `Returns True if the path is a file on the server, False if directory.`

Traverse(self, src_path, dst_path)
  `Walks the directory hierarchy pointed to by src_path download all files.
  Recursively walks src_path and saves all files and subfolders into
  dst_path.
  Args:
  src_path: string path on SVN server to save (absolute path on server).
  dest_path: string local path (relative or absolute) to save to.`

__init__(self, root_url)
  `Initialize SVN server root_url, save files to local dest_dir.
  Args:
  root_url: string url of SVN/WebDAV server`

Data descriptors defined here:

__dict__
  `dictionary for instance variables (if defined)`

__weakref__
  `list of weak references to the object (if defined)`

Functions
`` |  |

DownloadDeps(destination_dir, url)
  `Saves all the dependencies in deps_path.
  Opens and reads url, assuming the contents are in the simple DEPS-like file
  format specified in the header of this file, then download all
  files/directories listed to the destination_dir.
  Args:
  destination_dir: String path to directory to download files into.
  url: URL containing deps information to be evaluated.`

ListAllDepsPaths(deps_file)
  `Recursively returns a list of all paths indicated in this deps file.
  Note that this discards information about where path dependencies come from,
  so this is only useful in the context of a Chromium source checkout that has
  already fetched all dependencies.
  Args:
  deps_file: File containing deps information to be evaluated, in the
  format given in the header of this file.
  Returns:
  A list of string paths starting under src that are required by the
  given deps file, and all of its sub-dependencies. This amounts to
  the keys of the 'deps' dictionary.`

Data
`` |  | davclient = None