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>&nbsp;<br>
10<font color="#ffffff" face="helvetica, arial">&nbsp;<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&nbsp;Chrome&nbsp;Telemetry&nbsp;by&nbsp;downloading&nbsp;all&nbsp;its&nbsp;files&nbsp;from&nbsp;SVN&nbsp;servers.<br>
14&nbsp;<br>
15Requires&nbsp;a&nbsp;DEPS&nbsp;file&nbsp;to&nbsp;specify&nbsp;which&nbsp;directories&nbsp;on&nbsp;which&nbsp;SVN&nbsp;servers<br>
16are&nbsp;required&nbsp;to&nbsp;run&nbsp;Telemetry.&nbsp;Format&nbsp;of&nbsp;that&nbsp;DEPS&nbsp;file&nbsp;is&nbsp;a&nbsp;subset&nbsp;of&nbsp;the<br>
17normal&nbsp;DEPS&nbsp;file&nbsp;format[1];&nbsp;currently&nbsp;only&nbsp;only&nbsp;the&nbsp;"deps"&nbsp;dictionary&nbsp;is<br>
18supported&nbsp;and&nbsp;nothing&nbsp;else.<br>
19&nbsp;<br>
20Fetches&nbsp;all&nbsp;files&nbsp;in&nbsp;the&nbsp;specified&nbsp;directories&nbsp;using&nbsp;WebDAV&nbsp;(SVN&nbsp;is&nbsp;WebDAV&nbsp;under<br>
21the&nbsp;hood).<br>
22&nbsp;<br>
23[1]&nbsp;<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>&nbsp;<br>
28<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
29
30<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</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>&nbsp;<br>
40<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
41
42<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</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>&nbsp;<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>&nbsp;&nbsp;&nbsp;</tt></td>
58<td colspan=2><tt>Knows&nbsp;how&nbsp;to&nbsp;retrieve&nbsp;subdirectories&nbsp;and&nbsp;files&nbsp;from&nbsp;WebDAV/SVN&nbsp;servers.<br>&nbsp;</tt></td></tr>
59<tr><td>&nbsp;</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&nbsp;string&nbsp;names&nbsp;of&nbsp;all&nbsp;files&nbsp;and&nbsp;subdirs&nbsp;of&nbsp;path&nbsp;on&nbsp;the&nbsp;server.</tt></dd></dl>
62
63<dl><dt><a name="DAVClientWrapper-IsFile"><strong>IsFile</strong></a>(self, path)</dt><dd><tt>Returns&nbsp;True&nbsp;if&nbsp;the&nbsp;path&nbsp;is&nbsp;a&nbsp;file&nbsp;on&nbsp;the&nbsp;server,&nbsp;False&nbsp;if&nbsp;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&nbsp;the&nbsp;directory&nbsp;hierarchy&nbsp;pointed&nbsp;to&nbsp;by&nbsp;src_path&nbsp;download&nbsp;all&nbsp;files.<br>
66&nbsp;<br>
67Recursively&nbsp;walks&nbsp;src_path&nbsp;and&nbsp;saves&nbsp;all&nbsp;files&nbsp;and&nbsp;subfolders&nbsp;into<br>
68dst_path.<br>
69&nbsp;<br>
70Args:<br>
71&nbsp;&nbsp;src_path:&nbsp;string&nbsp;path&nbsp;on&nbsp;SVN&nbsp;server&nbsp;to&nbsp;save&nbsp;(absolute&nbsp;path&nbsp;on&nbsp;server).<br>
72&nbsp;&nbsp;dest_path:&nbsp;string&nbsp;local&nbsp;path&nbsp;(relative&nbsp;or&nbsp;absolute)&nbsp;to&nbsp;save&nbsp;to.</tt></dd></dl>
73
74<dl><dt><a name="DAVClientWrapper-__init__"><strong>__init__</strong></a>(self, root_url)</dt><dd><tt>Initialize&nbsp;SVN&nbsp;server&nbsp;root_url,&nbsp;save&nbsp;files&nbsp;to&nbsp;local&nbsp;dest_dir.<br>
75&nbsp;<br>
76Args:<br>
77&nbsp;&nbsp;root_url:&nbsp;string&nbsp;url&nbsp;of&nbsp;SVN/WebDAV&nbsp;server</tt></dd></dl>
78
79<hr>
80Data descriptors defined here:<br>
81<dl><dt><strong>__dict__</strong></dt>
82<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
83</dl>
84<dl><dt><strong>__weakref__</strong></dt>
85<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;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>&nbsp;<br>
91<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
92
93<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
94<td width="100%"><dl><dt><a name="-DownloadDeps"><strong>DownloadDeps</strong></a>(destination_dir, url)</dt><dd><tt>Saves&nbsp;all&nbsp;the&nbsp;dependencies&nbsp;in&nbsp;deps_path.<br>
95&nbsp;<br>
96Opens&nbsp;and&nbsp;reads&nbsp;url,&nbsp;assuming&nbsp;the&nbsp;contents&nbsp;are&nbsp;in&nbsp;the&nbsp;simple&nbsp;DEPS-like&nbsp;file<br>
97format&nbsp;specified&nbsp;in&nbsp;the&nbsp;header&nbsp;of&nbsp;this&nbsp;file,&nbsp;then&nbsp;download&nbsp;all<br>
98files/directories&nbsp;listed&nbsp;to&nbsp;the&nbsp;destination_dir.<br>
99&nbsp;<br>
100Args:<br>
101&nbsp;&nbsp;destination_dir:&nbsp;String&nbsp;path&nbsp;to&nbsp;directory&nbsp;to&nbsp;download&nbsp;files&nbsp;into.<br>
102&nbsp;&nbsp;url:&nbsp;URL&nbsp;containing&nbsp;deps&nbsp;information&nbsp;to&nbsp;be&nbsp;evaluated.</tt></dd></dl>
103 <dl><dt><a name="-ListAllDepsPaths"><strong>ListAllDepsPaths</strong></a>(deps_file)</dt><dd><tt>Recursively&nbsp;returns&nbsp;a&nbsp;list&nbsp;of&nbsp;all&nbsp;paths&nbsp;indicated&nbsp;in&nbsp;this&nbsp;deps&nbsp;file.<br>
104&nbsp;<br>
105Note&nbsp;that&nbsp;this&nbsp;discards&nbsp;information&nbsp;about&nbsp;where&nbsp;path&nbsp;dependencies&nbsp;come&nbsp;from,<br>
106so&nbsp;this&nbsp;is&nbsp;only&nbsp;useful&nbsp;in&nbsp;the&nbsp;context&nbsp;of&nbsp;a&nbsp;Chromium&nbsp;source&nbsp;checkout&nbsp;that&nbsp;has<br>
107already&nbsp;fetched&nbsp;all&nbsp;dependencies.<br>
108&nbsp;<br>
109Args:<br>
110&nbsp;&nbsp;deps_file:&nbsp;File&nbsp;containing&nbsp;deps&nbsp;information&nbsp;to&nbsp;be&nbsp;evaluated,&nbsp;in&nbsp;the<br>
111&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;format&nbsp;given&nbsp;in&nbsp;the&nbsp;header&nbsp;of&nbsp;this&nbsp;file.<br>
112Returns:<br>
113&nbsp;&nbsp;A&nbsp;list&nbsp;of&nbsp;string&nbsp;paths&nbsp;starting&nbsp;under&nbsp;src&nbsp;that&nbsp;are&nbsp;required&nbsp;by&nbsp;the<br>
114&nbsp;&nbsp;given&nbsp;deps&nbsp;file,&nbsp;and&nbsp;all&nbsp;of&nbsp;its&nbsp;sub-dependencies.&nbsp;This&nbsp;amounts&nbsp;to<br>
115&nbsp;&nbsp;the&nbsp;keys&nbsp;of&nbsp;the&nbsp;'deps'&nbsp;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>&nbsp;<br>
120<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
121
122<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
123<td width="100%"><strong>davclient</strong> = None</td></tr></table>
124</body></html>