cvs: phpdoc /en/reference/svn/functions svn-log.xml
| From: | Jakub Vrana | Date: | Fri, 04 Jul 2008 12:35:28 +0000 |
| Subject: | cvs: phpdoc /en/reference/svn/functions svn-log.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-1834@lists.php.net to get a copy of this message | ||
vrana Fri Jul 4 12:35:28 2008 UTC
Modified files:
/phpdoc/en/reference/svn/functions svn-log.xml
Log:
Remove example unnecessary due to limit parameter
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/svn/functions/svn-log.xml?r1=1.3&r2=1.4&diff_format=u
Index: phpdoc/en/reference/svn/functions/svn-log.xml
diff -u phpdoc/en/reference/svn/functions/svn-log.xml:1.3
phpdoc/en/reference/svn/functions/svn-log.xml:1.4
--- phpdoc/en/reference/svn/functions/svn-log.xml:1.3 Fri Jul 4 05:57:29 2008
+++ phpdoc/en/reference/svn/functions/svn-log.xml Fri Jul 4 12:35:27 2008
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry xml:id="function.svn-log" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>svn_log</refname>
@@ -235,47 +235,6 @@
</screen>
</example>
</para>
- <para>
- <example>
- <title>Simulating <userinput>--limit</userinput> with
<userinput>svn</userinput> and <function>svn_log</function></title>
- <para>
- This sample function simulates the <userinput>--limit</userinput> switch
- by using the SVN executable to return a list of revisions, which
- are then losslessly accessed using <function>svn_log</function>.
- </para>
- <note>
- <para>
- This function will perform a total of <parameter>limit</parameter> + 1
- requests: the first request to pull the required revisions, and
- each one after to retrieve the log item for that request.
- </para>
- </note>
- <programlisting role="php">
-<![CDATA[
-<?php
-/**
- * Retrieves the last $limit log entries.
- * @param $repos_url Repository URL of item to get logs for
- * @param $limit Integer limit of items
- */
-function svn_log_limit($repos_url, $limit) {
- $limit = (int) $limit;
- if ($limit <= 0) return array();
- // -q flag used to prevent server from sending log messages
- $output = shell_exec("svn log -q --limit $limit $repos_url");
- preg_match_all('/^r(\d+) /m', $output, $matches);
- $ret = array();
- foreach ($matches[1] as $rev) {
- $log = svn_log($repos_url, (int) $rev);
- $ret[] = $log[0]; // log is only one item long
- }
- return $ret;
-}
-?>
-]]>
- </programlisting>
- </example>
- </para>
</refsect1>
<refsect1 role="seealso">