⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 function.svn-log.html

📁 php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Returns the commit log messages of a repository URL</title>  <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.svn-import.html">svn_import</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.svn-ls.html">svn_ls</a></div> <div class="up"><a href="ref.svn.html">SVN Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.svn-log" class="refentry"> <div class="refnamediv">  <h1 class="refname">svn_log</h1>  <p class="verinfo">(PECL svn:0.1-0.2)</p><p class="refpurpose"><span class="refname">svn_log</span> &mdash; <span class="dc-title">Returns the commit log messages of a repository URL</span></p> </div> <div class="refsect1 description">  <h3 class="title">Description</h3>  <div class="methodsynopsis dc-description">   <span class="type">array</span> <span class="methodname"><b><b>svn_log</b></b></span>    ( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$repos_url</tt></span>   [, <span class="methodparam"><span class="type">int</span> <tt class="parameter">$start_revision</tt></span>   [, <span class="methodparam"><span class="type">int</span> <tt class="parameter">$end_revision</tt></span>   [, <span class="methodparam"><span class="type">int</span> <tt class="parameter">$limit</tt></span>   [, <span class="methodparam"><span class="type">int</span> <tt class="parameter">$flags</tt></span>  ]]]] )</div>  <p class="para rdfs-comment">   <b>svn_log()</b> returns the complete history of the item at the repository URL   <i><tt class="parameter">repos_url</tt></i>, or the history of a specific revision   if <i><tt class="parameter">start_revision</tt></i> is set. This function is equivalent   to <strong class="userinput"><code>svn log --verbose -r $start_revision $repos_url</code></strong>.  </p>  <div class="warning"><b class="warning">Warning</b>   <p class="para">    For repositories with large histories, the output may    be quite large (one array item for every revision of the item).    This function does not support the    <strong class="userinput"><code>--limit NUM</code></strong> flag, nor does it support revision    ranges (<strong class="userinput"><code>start_revision</code></strong> must be an integer).   </p>  </div> </div> <div class="refsect1 parameters">  <h3 class="title">Parameters</h3>  <p class="para">   <dl>    <dt>     <span class="term"><i><tt class="parameter">repos_url</tt></i></span>     <dd>      <p class="para">       Repository URL of the item to retrieve log history from.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">start_revision</tt></i></span>     <dd>      <p class="para">       Revision number of the first log to retrieve. Use       <b><tt>SVN_REVISON_HEAD</tt></b> to retrieve the log from       the most recent revision.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">end_revision</tt></i></span>     <dd>      <p class="para">       Revision number of the last log to retrieve. Defaults to       <i><tt class="parameter">start_revision</tt></i> if specified or to       <b><tt>SVN_REVISION_INITIAL</tt></b> otherwise.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">limit</tt></i></span>     <dd>      <p class="para">       Number of logs to retrieve.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">flags</tt></i></span>     <dd>      <p class="para">       Any combination of <b><tt>SVN_OMIT_MESSAGES</tt></b>,       <b><tt>SVN_DISCOVER_CHANGED_PATHS</tt></b> and       <b><tt>SVN_STOP_ON_COPY</tt></b>, defaults to       <strong class="userinput"><code>SVN_DISCOVER_CHANGED_PATHS | SVN_STOP_ON_COPY</code></strong>.      </p>     </dd>    </dt>   </dl>  </p> </div> <div class="refsect1 returnvalues">  <h3 class="title">Return Values</h3>  <p class="para">   On success, this function returns an array file listing in the format   of:   <div class="example-contents"><pre><div class="cdata"><pre>[0] =&gt; Array, ordered most recent (highest) revision first(    [rev] =&gt; integer revision number    [author] =&gt; string author name    [msg] =&gt; string log message    [date] =&gt; string date formatted per ISO 8601, i.e. date(&#039;c&#039;)    [paths] =&gt; Array, describing changed files        (            [0] =&gt; Array                (                    [action] =&gt; string letter signifying change                    [path] =&gt;  absolute repository path of changed file                )            [1] =&gt; ...        ))[1] =&gt; ...</pre></div>    </pre></div>  </p>  <blockquote><p><b class="note">Note</b>:        The output will always be a numerically indexed array of arrays,    even when there are none or only one log message(s).   <br />  </p></blockquote>  <p class="para">   The value of <var class="varname">action</var> is a subset of the   <a href="http://svnbook.red-bean.com/en/1.2/svn.ref.svn.c.status.html" class="link external">&raquo; status output   in the first column</a>, where possible values are:  </p>  <table border="5">   <caption><b>Actions</b></caption>   <colgroup>     <thead valign="middle">      <tr valign="middle">       <th colspan="1">Letter</th>       <th colspan="1">Description</th>      </tr>     </thead>     <tbody valign="middle" class="tbody">      <tr valign="middle">       <td colspan="1" rowspan="1" align="left">M</td>       <td colspan="1" rowspan="1" align="left">Item/props was modified</td>      </tr>      <tr valign="middle">       <td colspan="1" rowspan="1" align="left">A</td>       <td colspan="1" rowspan="1" align="left">Item was added</td>      </tr>      <tr valign="middle">       <td colspan="1" rowspan="1" align="left">D</td>       <td colspan="1" rowspan="1" align="left">Item was deleted</td>      </tr>      <tr valign="middle">       <td colspan="1" rowspan="1" align="left">R</td>       <td colspan="1" rowspan="1" align="left">Item was replaced</td>      </tr>     </tbody>    </colgroup>  </table>  <p class="para">   If no changes were made to the item, an empty array is returned.  </p> </div> <div class="refsect1 notes">  <h3 class="title">Notes</h3>  <div class="warning"><b class="warning">Warning</b><p class="simpara">This function is<em class="emphasis">EXPERIMENTAL</em>. The behaviour of this function, its name, andsurrounding documentation may change without notice in a future release of PHP.This function should be used at your own risk.</p></div> </div>   <div class="refsect1 examples">  <h3 class="title">Examples</h3>  <p class="para">   <div class="example">    <p><b>Example #1 <b>svn_log()</b> example</b></p>    <div class="example-contents"><div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />print_r</span><span style="color: #007700">(&nbsp;</span><span style="color: #0000BB">svn_log</span><span style="color: #007700">(</span><span style="color: #DD0000">'http://www.example.com/'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">23</span><span style="color: #007700">)&nbsp;);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>    </div>    <div class="example-contents"><p>The above example will output something similar to:</p></div>    <div class="example-contents"><pre><div class="cdata"><pre>Array(    [0] =&gt; Array    (        [rev] =&gt; 23        [author] =&gt; &#039;joe&#039;        [msg] =&gt; &#039;Add cheese and salami to our sandwich.&#039;        [date] =&gt; &#039;2007-04-06T16:00:27-04:00&#039;        [paths] =&gt; Array            (                [0] =&gt; Array                    (                        [action] =&gt; &#039;M&#039;                        [path] =&gt;  &#039;/sandwich.txt&#039;                    )            )    ))</pre></div>    </pre></div>   </div>  </p> </div> <div class="refsect1 seealso">  <h3 class="title">See Also</h3>  <p class="para">   <ul class="simplelist">    <li class="member">     <a href="http://svnbook.red-bean.com/en/1.2/svn.ref.svn.c.log.html" class="link external">&raquo;       SVN documentation on svn log     </a>    </li>   </ul>  </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.svn-import.html">svn_import</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.svn-ls.html">svn_ls</a></div> <div class="up"><a href="ref.svn.html">SVN Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -