1 2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 3 <html><head><title>Python: module telemetry.internal.util.bootstrap</title> 4 <meta charset="utf-8"> 5 </head><body bgcolor="#f0f0f8"> 6 7 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> 8 <tr bgcolor="#7799ee"> 9 <td valign=bottom> <br> 10 <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.internal.html"><font color="#ffffff">internal</font></a>.<a href="telemetry.internal.util.html"><font color="#ffffff">util</font></a>.bootstrap</strong></big></big></font></td 11 ><td align=right valign=bottom 12 ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/internal/util/bootstrap.py">telemetry/internal/util/bootstrap.py</a></font></td></tr></table> 13 <p><tt>Bootstrap Chrome Telemetry by downloading all its files from SVN servers.<br> 14 <br> 15 Requires a DEPS file to specify which directories on which SVN servers<br> 16 are required to run Telemetry. Format of that DEPS file is a subset of the<br> 17 normal DEPS file format[1]; currently only only the "deps" dictionary is<br> 18 supported and nothing else.<br> 19 <br> 20 Fetches all files in the specified directories using WebDAV (SVN is WebDAV under<br> 21 the hood).<br> 22 <br> 23 [1] <a href="http://dev.chromium.org/developers/how-tos/depottools#TOC-DEPS-file">http://dev.chromium.org/developers/how-tos/depottools#TOC-DEPS-file</a></tt></p> 24 <p> 25 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 26 <tr bgcolor="#aa55cc"> 27 <td colspan=3 valign=bottom> <br> 28 <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> 29 30 <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> 31 <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="imp.html">imp</a><br> 32 <a href="logging.html">logging</a><br> 33 </td><td width="25%" valign=top><a href="os.html">os</a><br> 34 <a href="urllib.html">urllib</a><br> 35 </td><td width="25%" valign=top><a href="urlparse.html">urlparse</a><br> 36 </td><td width="25%" valign=top></td></tr></table></td></tr></table><p> 37 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 38 <tr bgcolor="#ee77aa"> 39 <td colspan=3 valign=bottom> <br> 40 <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> 41 42 <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> 43 <td width="100%"><dl> 44 <dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a> 45 </font></dt><dd> 46 <dl> 47 <dt><font face="helvetica, arial"><a href="telemetry.internal.util.bootstrap.html#DAVClientWrapper">DAVClientWrapper</a> 48 </font></dt></dl> 49 </dd> 50 </dl> 51 <p> 52 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 53 <tr bgcolor="#ffc8d8"> 54 <td colspan=3 valign=bottom> <br> 55 <font color="#000000" face="helvetica, arial"><a name="DAVClientWrapper">class <strong>DAVClientWrapper</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> 56 57 <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> 58 <td colspan=2><tt>Knows how to retrieve subdirectories and files from WebDAV/SVN servers.<br> </tt></td></tr> 59 <tr><td> </td> 60 <td width="100%">Methods defined here:<br> 61 <dl><dt><a name="DAVClientWrapper-GetDirList"><strong>GetDirList</strong></a>(self, path)</dt><dd><tt>Returns string names of all files and subdirs of path on the server.</tt></dd></dl> 62 63 <dl><dt><a name="DAVClientWrapper-IsFile"><strong>IsFile</strong></a>(self, path)</dt><dd><tt>Returns True if the path is a file on the server, False if directory.</tt></dd></dl> 64 65 <dl><dt><a name="DAVClientWrapper-Traverse"><strong>Traverse</strong></a>(self, src_path, dst_path)</dt><dd><tt>Walks the directory hierarchy pointed to by src_path download all files.<br> 66 <br> 67 Recursively walks src_path and saves all files and subfolders into<br> 68 dst_path.<br> 69 <br> 70 Args:<br> 71 src_path: string path on SVN server to save (absolute path on server).<br> 72 dest_path: string local path (relative or absolute) to save to.</tt></dd></dl> 73 74 <dl><dt><a name="DAVClientWrapper-__init__"><strong>__init__</strong></a>(self, root_url)</dt><dd><tt>Initialize SVN server root_url, save files to local dest_dir.<br> 75 <br> 76 Args:<br> 77 root_url: string url of SVN/WebDAV server</tt></dd></dl> 78 79 <hr> 80 Data descriptors defined here:<br> 81 <dl><dt><strong>__dict__</strong></dt> 82 <dd><tt>dictionary for instance variables (if defined)</tt></dd> 83 </dl> 84 <dl><dt><strong>__weakref__</strong></dt> 85 <dd><tt>list of weak references to the object (if defined)</tt></dd> 86 </dl> 87 </td></tr></table></td></tr></table><p> 88 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 89 <tr bgcolor="#eeaa77"> 90 <td colspan=3 valign=bottom> <br> 91 <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> 92 93 <tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> 94 <td width="100%"><dl><dt><a name="-DownloadDeps"><strong>DownloadDeps</strong></a>(destination_dir, url)</dt><dd><tt>Saves all the dependencies in deps_path.<br> 95 <br> 96 Opens and reads url, assuming the contents are in the simple DEPS-like file<br> 97 format specified in the header of this file, then download all<br> 98 files/directories listed to the destination_dir.<br> 99 <br> 100 Args:<br> 101 destination_dir: String path to directory to download files into.<br> 102 url: URL containing deps information to be evaluated.</tt></dd></dl> 103 <dl><dt><a name="-ListAllDepsPaths"><strong>ListAllDepsPaths</strong></a>(deps_file)</dt><dd><tt>Recursively returns a list of all paths indicated in this deps file.<br> 104 <br> 105 Note that this discards information about where path dependencies come from,<br> 106 so this is only useful in the context of a Chromium source checkout that has<br> 107 already fetched all dependencies.<br> 108 <br> 109 Args:<br> 110 deps_file: File containing deps information to be evaluated, in the<br> 111 format given in the header of this file.<br> 112 Returns:<br> 113 A list of string paths starting under src that are required by the<br> 114 given deps file, and all of its sub-dependencies. This amounts to<br> 115 the keys of the 'deps' dictionary.</tt></dd></dl> 116 </td></tr></table><p> 117 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 118 <tr bgcolor="#55aa55"> 119 <td colspan=3 valign=bottom> <br> 120 <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> 121 122 <tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> 123 <td width="100%"><strong>davclient</strong> = None</td></tr></table> 124 </body></html>