/[drupal]/contributions/tricks/cvs-release-notes/cvs-release-notes.php
ViewVC logotype

Diff of /contributions/tricks/cvs-release-notes/cvs-release-notes.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.7, Wed Feb 13 22:15:33 2008 UTC revision 1.8, Tue Jul 1 00:47:47 2008 UTC
# Line 1  Line 1 
1  #!/usr/bin/php  #!/usr/bin/php
2  <?php  <?php
3    
4  // $Id: cvs-release-notes.php,v 1.6 2007/03/06 09:37:48 dww Exp $  // $Id: cvs-release-notes.php,v 1.7 2008/02/13 22:15:33 weitzman Exp $
5    
6  /**  /**
7   * @file   * @file
# Line 77  function get_changes($prev, $cur) { Line 77  function get_changes($prev, $cur) {
77    $in_log = false;    $in_log = false;
78    while (($line = next($logs)) !== false) {    while (($line = next($logs)) !== false) {
79      if (preg_match('/^cvs log:.*$/', $line)) {      if (preg_match('/^cvs log:.*$/', $line)) {
80        next;        // This line was a warning generated by cvs log, skip it.
81          // @todo An alternative to this would be redirecting STDERR to /dev/null... Why aren't we doing that?
82          continue;
83      }      }
84      if (trim($line) == $msg_sep || $in_log) {      if (trim($line) == $msg_sep || $in_log) {
85        if (!$in_log) {        if (!$in_log) {
# Line 97  function get_changes($prev, $cur) { Line 99  function get_changes($prev, $cur) {
99        $temp = next($logs);        $temp = next($logs);
100        $comment = substr($temp, 0, 9) != 'branches:' ? $temp : '';        $comment = substr($temp, 0, 9) != 'branches:' ? $temp : '';
101        $cur_log = true;        $cur_log = true;
102        while ($cur_log && ($line = next($logs))) {        while ($cur_log && ($line = next($logs)) !== FALSE) {
103          if (trim($line) == $msg_sep) {          if (trim($line) == $msg_sep) {
104            prev($logs);  // Need to rewind so our outer loop isn't confused.            prev($logs);  // Need to rewind so our outer loop isn't confused.
105            $cur_log = false;            $cur_log = false;

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.2