header('Location: ' . Chora::url('cvs', $where)); exit; } if (@is_dir($fullname)) { Chora::fatal('No patchsets for directories yet.'); } elseif ($VC->isFile($fullname)) { $ps = $VC->getPatchsetObject($where); $title = sprintf(_("Patchsets for %s"), Text::htmlallspaces($where)); $upwhere = preg_replace('|[^/]+$|', '', $where); $extraLink = Chora::getFileViews(); require CHORA_TEMPLATES . '/common-header.inc'; Chora::menu(); require CHORA_TEMPLATES . '/headerbar.inc'; foreach ($ps->_patchsets as $id => $patchset) { $commitDate = strftime('%c', $patchset['date']); $readableDate = VC_File::readableTime($patchset['date'], true); $author = Chora::showAuthorName($patchset['author'], true); if (is_a($VC, 'VC_svn')) { // The diff should be from the top of the source tree so // as to get all files. $topDir = substr($where, 0, strpos($where, '/', 1)); // Subversion supports patchset diffs natively. $allDiffsLink = Horde::link(Chora::url('diff', $topDir, array('r1' => $id - 1, 'r2' => $id, 'ty' => 'u')), _("Diff All Files")) . _("Diff All Files") . '</a>'; } else { // Not supported in any other VC systems yet. $allDiffsLink = ''; } $files = array(); $dir = dirname($where); foreach ($patchset['members'] as $member) { $file = array();
if (substr_count($rev, '.') <= substr_count($baseRev, '.')) { /* If we are at the same level, and the revision is * less, then let the revision through, since it was * committed before the branch actually took place */ if (VC_Revision::cmp($rev, $baseRev) > 0) { continue; } } else { continue; } } } $textURL = Chora::url('co', $where, array('r' => $rev)); $commitDate = strftime('%c', $lg->date); $readableDate = VC_File::readableTime($lg->date, true); $aid = $lg->queryAuthor(); $author = Chora::showAuthorName($aid, true); if (!empty($lg->tags)) { $commitTags = implode(', ', $lg->tags); } else { $commitTags = ''; } $branchPointsArr = array(); foreach ($lg->querySymbolicBranches() as $symb => $bra) { $branchPointsArr[] = '<a href="' . Chora::url('cvs', $where, array('onb' => $bra)) . '">' . $symb . '</a>'; } /* Calculate the current branch name and revision. */ $branchPoints = implode(' , ', $branchPointsArr); $branchRev = VC_Revision::strip($rev, 1); if (@isset($fl->branches[$branchRev])) {