Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 6145

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Returns the commit log messages of a repository URL</title>

 </head>
 <body><div class="manualnavbar" 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 &gt;= 0.1.0)</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" id="refsect1-function.svn-log-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">array</span> <span class="methodname"><strong>svn_log</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$repos_url</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$start_revision</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$end_revision</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$limit</code><span class="initializer"> = 0</span></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code><span class="initializer"> = SVN_DISCOVER_CHANGED_PATHS | SVN_STOP_ON_COPY</span></span>
  ]]]] )</div>

  <p class="para rdfs-comment">
    <span class="function"><strong>svn_log()</strong></span> returns the complete history of the item at the repository URL
   <em><code class="parameter">repos_url</code></em>, or the history of a specific revision
   if <em><code class="parameter">start_revision</code></em> is set. This function is equivalent
   to <strong class="userinput"><code>svn log --verbose -r $start_revision $repos_url</code></strong>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.svn-log-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>

     <span class="term"><em><code class="parameter">repos_url</code></em></span>
     <dd>

      <p class="para">
       Repository URL of the item to retrieve log history from.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">start_revision</code></em></span>
     <dd>

      <p class="para">
       Revision number of the first log to retrieve. Use
       <strong><code>SVN_REVISION_HEAD</code></strong> to retrieve the log from
       the most recent revision.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">end_revision</code></em></span>
     <dd>

      <p class="para">
       Revision number of the last log to retrieve. Defaults to
       <em><code class="parameter">start_revision</code></em> if specified or to
       <strong><code>SVN_REVISION_INITIAL</code></strong> otherwise.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">limit</code></em></span>
     <dd>

      <p class="para">
       Number of logs to retrieve.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">flags</code></em></span>
     <dd>

      <p class="para">
       Any combination of <strong><code>SVN_OMIT_MESSAGES</code></strong>,
       <strong><code>SVN_DISCOVER_CHANGED_PATHS</code></strong> and
       <strong><code>SVN_STOP_ON_COPY</code></strong>.
      </p>
     </dd>

    </dt>

   </dl>

  </p>

 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.svn-log-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 screen">
<div class="returnvaluescode"><pre class="returnvaluescode">[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>
    </div>
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    The output will always be a numerically indexed array of arrays,
    even when there are none or only one log message(s).
   </p>
  </p></blockquote>
  <p class="para">
   The value of <var class="varname"><var class="varname">action</var></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;&nbsp;status output
   in the first column</a>, where possible values are:
  </p>
  <table class="doctable table">
   <caption><strong>Actions</strong></caption>
   
     <thead>
      <tr>
       <th>Letter</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>M</td>
       <td>Item/props was modified</td>
      </tr>

      <tr>
       <td>A</td>
       <td>Item was added</td>
      </tr>

      <tr>
       <td>D</td>
       <td>Item was deleted</td>
      </tr>

      <tr>
       <td>R</td>
       <td>Item was replaced</td>
      </tr>

     </tbody>
    
  </table>

  <p class="para">
   If no changes were made to the item, an empty array is returned.
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.svn-log-notes">
  <h3 class="title">Notes</h3>
  <div class="warning"><strong class="warning">Warning</strong><p class="simpara">This function is
<em class="emphasis">EXPERIMENTAL</em>. The behaviour of this function, its name, and
surrounding 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" id="refsect1-function.svn-log-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   <div class="example" id="example-4669">
    <p><strong>Example #1  <span class="function"><strong>svn_log()</strong></span> example</strong></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 screen">
<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>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.svn-log-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;&nbsp;
      SVN documentation on svn log
     </a>
    </li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" 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>