svn: /pear/pear-core/trunk/PEAR/Command/ Package.php
[email protected] (Helgi Þormar Þorbjörnsson) Mon, 13 Sep 2010 19:08:36 +0000
| Newsgroups | php.pear.cvs,php.pear.core |
|---|---|
| Message-ID | <[email protected]> |
dufuz Mon, 13 Sep 2010 19:08:36 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=303329
Log:
I went a bit overboard with the DIR SEPs and put them on URLs as well.
Changed paths:
U pear/pear-core/trunk/PEAR/Command/Package.php
Modified: pear/pear-core/trunk/PEAR/Command/Package.php
===================================================================
--- pear/pear-core/trunk/PEAR/Command/Package.php 2010-09-13 16:36:34 UTC (rev 303328)
+++ pear/pear-core/trunk/PEAR/Command/Package.php 2010-09-13 19:08:36 UTC (rev 303329)
@@ -421,7 +421,7 @@
$packageFile = realpath($params[0]);
$dir = dirname($packageFile);
- $dir = substr($dir, strrpos($dir, '/') + 1);
+ $dir = substr($dir, strrpos($dir, DIRECTORY_SEPARATOR) + 1);
$obj = &$this->getPackageFile($this->config, $this->_debug);
$info = $obj->fromAnyFile($packageFile, PEAR_VALIDATE_NORMAL);
if (PEAR::isError($info)) {
@@ -482,7 +482,7 @@
// Check if tag already exists
$releaseTag = $path['local']['base'] . 'tags' . DIRECTORY_SEPARATOR . $svntag;
- $existsCommand = 'svn ls ' . $path['base'] . 'tags' . DIRECTORY_SEPARATOR;
+ $existsCommand = 'svn ls ' . $path['base'] . 'tags/';
$fp = popen($existsCommand, "r");
$out = '';
@@ -580,8 +580,8 @@
$url = substr($xml, $url_tag + 5, strpos($xml, '</url>', $url_tag + 5) - ($url_tag + 5));
$path = array();
- $path['from'] = substr($url, 0, strrpos($url, DIRECTORY_SEPARATOR));
- $path['base'] = substr($path['from'], 0, strrpos($path['from'], DIRECTORY_SEPARATOR) + 1);
+ $path['from'] = substr($url, 0, strrpos($url, '/'));
+ $path['base'] = substr($path['from'], 0, strrpos($path['from'], '/') + 1);
// Figure out the local paths - see http://pear.php.net/bugs/17463
$pos = strpos($file, DIRECTORY_SEPARATOR . 'trunk' . DIRECTORY_SEPARATOR);
@@ -605,7 +605,7 @@
$command .= ' -m "Removing tag for the ' . $version . ' release."';
$path = $this->_svnFindPath($packageFile);
- $command .= ' ' . $path['base'] . 'tags' . DIRECTORY_SEPARATOR . $tag;
+ $command .= ' ' . $path['base'] . 'tags/' . $tag;
if ($this->config->get('verbose') > 1) {