Esempio n. 1
0
 if ($history) {
     $logEntry = $history->curEntry;
     $vars['rev'] = $logEntry->rev;
     $vars['peg'] = $peg;
     $vars['date'] = $logEntry->date;
     $vars['author'] = $logEntry->author;
     $vars['log'] = xml_entities($logEntry->msg);
 } else {
     $vars['warning'] = 'Problem with comparison.';
 }
 $noinput = empty($path1) || empty($path2);
 // Generate the diff listing
 $relativePath1 = $path1;
 $relativePath2 = $path2;
 $svnpath1 = encodepath($svnrep->getSvnPath(str_replace(DIRECTORY_SEPARATOR, '/', $path1)));
 $svnpath2 = encodepath($svnrep->getSvnPath(str_replace(DIRECTORY_SEPARATOR, '/', $path2)));
 $debug = false;
 if (!$noinput) {
     $cmd = $config->getSvnCommand() . ' diff ' . ($ignoreWhitespace ? '-x -w ' : '') . $rep->svnParams() . quote($svnpath1 . '@' . $rev1) . ' ' . quote($svnpath2 . '@' . $rev2);
 }
 function clearVars()
 {
     global $listing, $index;
     $listing[$index]['newpath'] = null;
     $listing[$index]['endpath'] = null;
     $listing[$index]['info'] = null;
     $listing[$index]['diffclass'] = null;
     $listing[$index]['difflines'] = null;
     $listing[$index]['enddifflines'] = null;
     $listing[$index]['properties'] = null;
 }
Esempio n. 2
0
 function isFile($path, $rev = '')
 {
     global $config;
     $path = encodepath($this->getSvnPath($path));
     $pegrev = $rev ? '@' . $rev : '';
     $cmd = $config->getSvnCommand() . ' info --xml ' . $this->repConfig->svnParams() . quote($path . $pegrev);
     return strpos(implode(' ', runCommand($cmd, true)), 'kind="file"') !== false;
 }