<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.svn.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'function.svn-log.php',
    1 => 'svn_log',
    2 => 'Returns the commit log messages of a repository URL',
  ),
  'up' => 
  array (
    0 => 'ref.svn.php',
    1 => 'SVN Functions',
  ),
  'prev' => 
  array (
    0 => 'function.svn-import.php',
    1 => 'svn_import',
  ),
  'next' => 
  array (
    0 => 'function.svn-ls.php',
    1 => 'svn_ls',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/svn/functions/svn-log.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<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="methodname"><strong>svn_log</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$repos_url</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$start_revision</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$end_revision</code><span class="initializer"> = ?</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$limit</code><span class="initializer"> = 0</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$flags</code><span class="initializer"> = SVN_DISCOVER_CHANGED_PATHS | SVN_STOP_ON_COPY</span></span><br>): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>

  <p class="simpara">
   <span class="function"><strong>svn_log()</strong></span> returns the complete history of the item at the repository URL
   <code class="parameter">repos_url</code>, or the history of a specific revision
   if <code class="parameter">start_revision</code> 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>
  <dl>
   
    <dt><code class="parameter">repos_url</code></dt>
    <dd>
     <span class="simpara">
      Repository URL of the item to retrieve log history from.
     </span>
    </dd>
   
   
    <dt><code class="parameter">start_revision</code></dt>
    <dd>
     <span class="simpara">
      Revision number of the first log to retrieve. Use
      <strong><code><a href="svn.constants.php#constant.svn-revision-head">SVN_REVISION_HEAD</a></code></strong> to retrieve the log from
      the most recent revision.
     </span>
    </dd>
   
   
    <dt><code class="parameter">end_revision</code></dt>
    <dd>
     <span class="simpara">
      Revision number of the last log to retrieve. Defaults to
      <code class="parameter">start_revision</code> if specified or to
      <strong><code>SVN_REVISION_INITIAL</code></strong> otherwise.
     </span>
    </dd>
   
   
    <dt><code class="parameter">limit</code></dt>
    <dd>
     <span class="simpara">
      Number of logs to retrieve.
     </span>
    </dd>
   
   
    <dt><code class="parameter">flags</code></dt>
    <dd>
     <span class="simpara">
      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>.
     </span>
    </dd>
   
  </dl>

 </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>: 
   <span class="simpara">
    The output will always be a numerically indexed array of arrays,
    even when there are none or only one log message(s).
   </span>
  </p></blockquote>
  <p class="simpara">
   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;&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="simpara">
   If no changes were made to the item, an empty array is returned.
  </p>
 </div>


 

 

 <div class="refsect1 examples" id="refsect1-function.svn-log-examples">
  <h3 class="title">Examples</h3>
  <div class="example" id="example-1">
   <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">( </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">, </span><span style="color: #0000BB">23</span><span style="color: #007700">) );<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="examplescode"><pre class="examplescode">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>
 </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>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 seealso" id="refsect1-function.svn-log-seealso">
  <h3 class="title">See Also</h3>
  <ul class="simplelist">
   <li>
    <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>
 </div>


</div><?php manual_footer($setup); ?>