Changeset View
Changeset View
Standalone View
Standalone View
src/parser/ArcanistBundle.php
Context not available. | |||||
'tar tfO %s', | 'tar tfO %s', | ||||
$path); | $path); | ||||
list($stdout, $file_list) = $future->resolvex(); | list($stdout, $file_list) = $future->resolvex(); | ||||
$file_list = explode("\n", trim($file_list)); | $file_list = @explode("\n", trim($file_list)); | ||||
if (in_array('meta.json', $file_list)) { | if (in_array('meta.json', $file_list)) { | ||||
$future = new ExecFuture( | $future = new ExecFuture( | ||||
Context not available. | |||||
// TODO: This is only relevant when patching old Differential diffs | // TODO: This is only relevant when patching old Differential diffs | ||||
// which were created prior to arc pruning TYPE_COPY_AWAY for files | // which were created prior to arc pruning TYPE_COPY_AWAY for files | ||||
// with no modifications. | // with no modifications. | ||||
if (!strlen($change_body) && ($old_mode == $new_mode)) { | if (!@strlen($change_body) && ($old_mode == $new_mode)) { | ||||
continue; | continue; | ||||
} | } | ||||
} | } | ||||
Context not available. | |||||
// | // | ||||
// Everyone is at fault here and there are no winners. | // Everyone is at fault here and there are no winners. | ||||
if (strpos($path, ' ') !== false) { | if (@strpos($path, ' ') !== false) { | ||||
$path = $path."\t"; | $path = $path."\t"; | ||||
} | } | ||||
Context not available. | |||||
$old_path = $change->getOldPath(); | $old_path = $change->getOldPath(); | ||||
$type = $change->getType(); | $type = $change->getType(); | ||||
if (!strlen($old_path) || | if (!@strlen($old_path) || | ||||
$type == ArcanistDiffChangeType::TYPE_ADD) { | $type == ArcanistDiffChangeType::TYPE_ADD) { | ||||
$old_path = null; | $old_path = null; | ||||
} | } | ||||
Context not available. | |||||
$cur_path = $change->getCurrentPath(); | $cur_path = $change->getCurrentPath(); | ||||
$type = $change->getType(); | $type = $change->getType(); | ||||
if (!strlen($cur_path) || | if (!@strlen($cur_path) || | ||||
$type == ArcanistDiffChangeType::TYPE_DELETE || | $type == ArcanistDiffChangeType::TYPE_DELETE || | ||||
$type == ArcanistDiffChangeType::TYPE_MULTICOPY) { | $type == ArcanistDiffChangeType::TYPE_MULTICOPY) { | ||||
$cur_path = null; | $cur_path = null; | ||||
Context not available. | |||||
$n_len = $small_hunk->getNewLength(); | $n_len = $small_hunk->getNewLength(); | ||||
$corpus = $small_hunk->getCorpus(); | $corpus = $small_hunk->getCorpus(); | ||||
$this->reserveBytes(strlen($corpus)); | $this->reserveBytes(@strlen($corpus)); | ||||
// NOTE: If the length is 1 it can be omitted. Since git does this, | // NOTE: If the length is 1 it can be omitted. Since git does this, | ||||
// we also do it so that "arc export --git" diffs are as similar to | // we also do it so that "arc export --git" diffs are as similar to | ||||
Context not available. | |||||
$result[] = "@@ -{$o_head} +{$n_head} @@".$eol; | $result[] = "@@ -{$o_head} +{$n_head} @@".$eol; | ||||
$result[] = $corpus; | $result[] = $corpus; | ||||
$last = substr($corpus, -1); | $last = @substr($corpus, -1); | ||||
if ($last !== false && $last != "\r" && $last != "\n") { | if ($last !== false && $last != "\r" && $last != "\n") { | ||||
$result[] = $eol; | $result[] = $eol; | ||||
} | } | ||||
Context not available. | |||||
$old_data = $this->getBlob($old_phid, $name); | $old_data = $this->getBlob($old_phid, $name); | ||||
} | } | ||||
$old_length = strlen($old_data); | $old_length = @strlen($old_data); | ||||
// Here, and below, the binary will be emitted with base85 encoding. This | // Here, and below, the binary will be emitted with base85 encoding. This | ||||
// encoding encodes each 4 bytes of input in 5 bytes of output, so we may | // encoding encodes each 4 bytes of input in 5 bytes of output, so we may | ||||
Context not available. | |||||
$new_data = $this->getBlob($new_phid, $name); | $new_data = $this->getBlob($new_phid, $name); | ||||
} | } | ||||
$new_length = strlen($new_data); | $new_length = @strlen($new_data); | ||||
$this->reserveBytes($new_length * 5 / 4); | $this->reserveBytes($new_length * 5 / 4); | ||||
if ($new_data === null) { | if ($new_data === null) { | ||||
Context not available. | |||||
foreach ($lines as $idx => $line) { | foreach ($lines as $idx => $line) { | ||||
if ($idx === $final) { | if ($idx === $final) { | ||||
$len = strlen($line); | $len = @strlen($line); | ||||
} else { | } else { | ||||
$len = 52; | $len = 52; | ||||
} | } | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0