Dotclear


Ignore:
Timestamp:
11/17/13 20:25:53 (12 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
2.6
Children:
2567:6c11245cbf04, 2568:61c67a7d17fa
Message:

Add some people in CREDITS, remove trailing spaces and tabs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • debian/mkdcl.php

    r0 r2566  
    55{ 
    66     public $f = 'debian/changelog'; 
    7       
     7 
    88     public function __construct() 
    99     { 
     
    1212          } 
    1313     } 
    14       
     14 
    1515     private function readLastRevision() 
    1616     { 
     
    1818          $res = array(); 
    1919          $done = false; 
    20            
     20 
    2121          foreach ($f as $v) 
    2222          { 
    2323               $v = rtrim($v,"\n"); 
    24                 
     24 
    2525               # First line of a change 
    2626               if (strpos($v,' ') !== 0 && trim($v) != '') 
     
    2929                         break; 
    3030                    } 
    31                      
     31 
    3232                    $done = true; 
    3333                    $res = $this->getPackageInfo($v,$res[$i]); 
     
    4444               } 
    4545          } 
    46            
     46 
    4747          return $res; 
    4848     } 
    49       
     49 
    5050     public function writeChangelog() 
    5151     { 
    5252          $ch = $this->readLastRevision(); 
    53            
     53 
    5454          # Get debian revision 
    5555          $rev = 1; 
     
    5959          } 
    6060          $rev++; 
    61            
     61 
    6262          # Get SVN revision 
    6363          $svnrev = isset($ch['keywords']['svnrev']) ? (integer) $ch['keywords']['svnrev'] : 1; 
    64            
     64 
    6565          # Get current SVN revision 
    6666          $currev = svnInfo::getCurrentRevision(); 
     
    6868               return; 
    6969          } 
    70            
     70 
    7171          $changelog = ''; 
    7272          $changes = svnInfo::getChangeLog($svnrev+1,$currev); 
     
    7777               ', on '.date('r',strtotime($v['date']))."\n". 
    7878               '    '.trim(preg_replace('/\n/ms',"\n    ",$v['msg']))."\n\n"; 
    79                 
    80           }  
    81            
     79 
     80          } 
     81 
    8282          $res = 
    8383          $ch['package'].' ('.$ch['version'].'-'.$rev.') '.$ch['dist'].'; urgency='.$ch['keywords']['urgency']. 
     
    8787          ' -- '.$ch['maintainer']['name'].' <'.$ch['maintainer']['email'].'>  '.date('r')."\n". 
    8888          "\n"; 
    89            
     89 
    9090          $old_changelog = file_get_contents($this->f); 
    9191          $fp = fopen($this->f,'wb'); 
     
    9393          fclose($fp); 
    9494     } 
    95       
     95 
    9696     private function getPackageInfo($l) 
    9797     { 
     
    104104               'maintainer' => array() 
    105105          ); 
    106            
     106 
    107107          $l = explode(';',$l); 
    108            
     108 
    109109          # Info 
    110110          $info = array_shift($l); 
     
    112112          $res['version'] = strtok('()'); 
    113113          $res['dist'] = trim(strtok(';')); 
    114            
     114 
    115115          # Keywords 
    116116          foreach ($l as $v) { 
     
    120120               } 
    121121          } 
    122            
     122 
    123123          return $res; 
    124124     } 
    125       
     125 
    126126     private function getMaintainerInfo($l) 
    127127     { 
     
    131131               'date' => '' 
    132132          ); 
    133            
     133 
    134134          if (preg_match('/^ -- (.+?) <(.+?)>  (.+?)$/',$l,$m)) { 
    135135               $res['name'] = $m[1]; 
     
    137137               $res['date'] = $m[3]; 
    138138          } 
    139            
     139 
    140140          return $res; 
    141141     } 
     
    147147     { 
    148148          $info = `LANG=C svn info --xml`; 
    149            
     149 
    150150          $x = @simplexml_load_string($info); 
    151151          if (!$x) { 
    152152               throw new Exception('Unable to get current SVN revision'); 
    153153          } 
    154            
     154 
    155155          $rev = $x->entry->commit['revision']; 
    156            
     156 
    157157          if (!$rev) { 
    158158               throw new Exception('Last revision number is invalid'); 
    159159          } 
    160            
     160 
    161161          return (integer) $rev; 
    162162     } 
    163       
     163 
    164164     public static function getChangeLog($fromrev,$torev) 
    165165     { 
    166166          $log = `LANG=C svn log --xml -r $fromrev:$torev`; 
    167            
     167 
    168168          $x = @simplexml_load_string($log); 
    169169          if (!$x) { 
    170170               throw new Exception('Unable to open SVN log'); 
    171171          } 
    172            
     172 
    173173          $res = array(); 
    174174          foreach ($x->logentry as $change) 
     
    180180               ); 
    181181          } 
    182            
     182 
    183183          return $res; 
    184184     } 
Note: See TracChangeset for help on using the changeset viewer.

Sites map