From 0ff5c43296b10789bd5dc3ecc0c34c30bc554086 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 28 Aug 2005 22:51:29 +0000 Subject: [PATCH] Adding some helpful links, more still to come --- browse.php | 8 +++++++- dev/todo.txt | 4 +--- diff.php | 25 +++++++++++++++++++++++-- view.php | 19 +++++++++++++++++++ 4 files changed, 50 insertions(+), 6 deletions(-) diff --git a/browse.php b/browse.php index c24c4ac..a03cbb8 100644 --- a/browse.php +++ b/browse.php @@ -22,7 +22,8 @@ echo '
'; $prev = $viewsvn->svn->common->fetch_prev_rev($path, @$viewsvn->in['rev']); echo ($viewsvn->svn->common->fetch_head_rev($path) != @$viewsvn->in['rev'] ? 'Diff to HEAD' : '') . -($prev != -1 ? ' - Diff to PREV' : ''); +($prev != -1 ? ' - Diff to PREV' : '') . +' - View Log'; echo '
' . print_r($viewsvn->svn->common->fetch_log($path, @$viewsvn->in['rev']), true) . '
'; @@ -41,7 +42,12 @@ foreach ($listing AS $item) else { echo ''. $item . ''; + echo ' - Blame'; } + + echo ' - View Log'; + echo ' - Diff to PREV'; + echo ''; echo "\n"; } diff --git a/dev/todo.txt b/dev/todo.txt index 5f99d28..f8129b8 100644 --- a/dev/todo.txt +++ b/dev/todo.txt @@ -5,6 +5,4 @@ TODO LIST: $Id$ - arbitrary diffs - arbitrary logs - repository switcher -- view and blame on browse.php -- sorting of columns -- highlighting \ No newline at end of file +- sorting of columns \ No newline at end of file diff --git a/diff.php b/diff.php index 452198b..b5a18e4 100644 --- a/diff.php +++ b/diff.php @@ -18,7 +18,26 @@ $relpath = $viewsvn->paths->fetch_path($path); echo $viewsvn->paths->construct_breadcrumb($path, false); -$diff = new SVNDiff($repos, $relpath, @$viewsvn->in['low'], @$viewsvn->in['high']); +if (empty($viewsvn->in['high'])) +{ + $viewsvn->in['high'] = $viewsvn->svn->common->fetch_head_rev($path); +} + +if (empty($viewsvn->in['low'])) +{ + $viewsvn->in['low'] = $viewsvn->svn->common->fetch_prev_rev($path, $viewsvn->in['high']); +} + +$diff = new SVNDiff($repos, $relpath, $viewsvn->in['low'], $viewsvn->in['high']); + +if ($viewsvn->svn->common->isdir($path)) +{ + $viewpg = 'browse'; +} +else +{ + $viewpg = 'view'; +} echo << @@ -57,7 +76,9 @@ foreach ($diff->fetch() AS $filename => $file) { echo ' -   + r' . $viewsvn->in['low'] . ' + r' . $viewsvn->in['high'] . ' +   '; continue; } diff --git a/view.php b/view.php index 0b2e47c..f70d61a 100644 --- a/view.php +++ b/view.php @@ -18,6 +18,25 @@ $relpath = $viewsvn->paths->fetch_path($path); echo $viewsvn->paths->construct_breadcrumb($path, false); +echo '
'; + +echo 'View Log'; +if ($viewsvn->svn->common->fetch_head_rev($path) != @$viewsvn->in['rev'] AND @$viewsvn->in['rev'] != 'HEAD') +{ + echo ' - Go to HEAD'; + echo ' - Diff to HEAD'; +} + +$prev = $viewsvn->svn->common->fetch_prev_rev($path, @$viewsvn->in['rev']); +if ($prev != -1) +{ + echo ' - Diff to PREV'; +} + +$logmsg = $viewsvn->svn->common->fetch_log($path, @$viewsvn->in['rev']); +unset($logmsg['files']); +echo '
' . print_r($logmsg, true) . '
'; + echo '
'; -- 2.43.5