Fixed issue in the display of filename with spaces with Mercurial.
The Mercurial backend was not displaying correctly the filenames/folders having spaces in them. It was troncating at the space.
This commit is contained in:
parent
419601bb92
commit
7e7b5a4409
@ -149,13 +149,12 @@ class IDF_Scm_Mercurial
|
||||
list($hash, $perm, $exec, $file) = preg_split('/ |\t/', $line, 4);
|
||||
$file = trim($file);
|
||||
$dir = explode('/', $file, -1);
|
||||
preg_match_all('|([a-zA-Z0-9_-]+)/|', $file, $dir);
|
||||
$tmp = '';
|
||||
for ($i=0; $i < count($dir[1]); $i++) {
|
||||
for ($i=0; $i < count($dir); $i++) {
|
||||
if ($i > 0) {
|
||||
$tmp .= '/';
|
||||
}
|
||||
$tmp .= $dir[1][$i];
|
||||
$tmp .= $dir[$i];
|
||||
if (!in_array("empty\t000\t\t$tmp/", $out_hack))
|
||||
$out_hack[] = "empty\t000\t\t$tmp/";
|
||||
}
|
||||
@ -206,13 +205,12 @@ class IDF_Scm_Mercurial
|
||||
list($hash, $perm, $exec, $file) = preg_split('/ |\t/', $line, 4);
|
||||
$file = trim($file);
|
||||
$dir = explode('/', $file, -1);
|
||||
preg_match_all('|([a-zA-Z0-9_-]+)/|', $file, $dir);
|
||||
$tmp = '';
|
||||
for ($i=0; $i < count($dir[1]); $i++) {
|
||||
for ($i=0; $i < count($dir); $i++) {
|
||||
if ($i > 0) {
|
||||
$tmp .= '/';
|
||||
}
|
||||
$tmp .= $dir[1][$i];
|
||||
$tmp .= $dir[$i];
|
||||
if (!in_array("empty\t000\t\t$tmp/", $out_hack)) {
|
||||
$out_hack[] = "emtpy\t000\t\t$tmp/";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user