Switching over to the contextual revision number
authorRobert Sesek <rsesek@bluestatic.org>
Sun, 22 Jan 2006 23:03:18 +0000 (23:03 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Sun, 22 Jan 2006 23:03:18 +0000 (23:03 +0000)
blame.php
browse.php
view.php

index a190d493a7d58d81d6e0bc23a05d36ef97fb1568..bcb1b438d540d864561f9557b8297e1f3fd2f9e4 100644 (file)
--- a/blame.php
+++ b/blame.php
@@ -34,17 +34,17 @@ $latest = $controller->cachev->fetch_node();
 
 $link['log'] = $controller->href_compound('log.php');
 
-$show['head'] = ($latest['revision'] != $controller->revnum AND $controller->revnum != 'HEAD');
+$show['head'] = ($latest['revision'] != $controller->revctx);
 if ($show['head'])
 {
        $link['gohead'] = $controller->href_compound('blame.php', null, Paths::fetch_rev_str(false, 'HEAD'));
-       $link['diffhead'] = $controller->href_compound('diff.php', null, Paths::fetch_rev_str(true, 'HEAD', $contoller->revnum));
+       $link['diffhead'] = $controller->href_compound('diff.php', null, Paths::fetch_rev_str(true, 'HEAD', $contoller->revctx));
 }
 
-$show['prev'] = ($prev = $controller->cachev->fetch_prev_revision($controller->revnum));
+$show['prev'] = ($prev = $controller->cachev->fetch_prev_revision($controller->revctx));
 if ($show['prev'])
 {
-       $link['diffprev'] = $controller->href_compound('diff.php', null, Paths::fetch_rev_str(true, $controller->revnum, $prev));
+       $link['diffprev'] = $controller->href_compound('diff.php', null, Paths::fetch_rev_str(true, $controller->revctx, $prev));
 }
 
 // ###################################################################
index 7e3a24707d932ff80b599a6a3604102c874ac736..52b7a144fbb1adad4620313cd99e7d34fd0b3b46 100644 (file)
@@ -35,22 +35,22 @@ $latest = $controller->cachev->fetch_node();
 
 $link['log'] = $controller->href_compound('log.php');
 
-$show['head'] = ($latest['revision'] != $controller->revnum AND $controller->revnum != 'HEAD');
+$show['head'] = ($latest['revision'] != $controller->revctx);
 if ($show['head'])
 {
        $link['gohead'] = $controller->href_compound('browse.php', null, Paths::fetch_rev_str(false, 'HEAD'));
-       $link['diffhead'] = $controller->href_compound('diff.php', null, Paths::fetch_rev_str(true, 'HEAD', $controller->revnum));
+       $link['diffhead'] = $controller->href_compound('diff.php', null, Paths::fetch_rev_str(true, 'HEAD', $controller->revctx));
 }
 
-$show['prev'] = ($controller->cachev->fetch_prev_revision($controller->revnum) != -1);
+$show['prev'] = ($controller->cachev->fetch_prev_revision($controller->revctx) != -1);
 if ($show['prev'])
 {
-       $link['diffprev'] = $controller->href_compound('diff.php', null, Paths::fetch_rev_str(false, $controller->revnum));
+       $link['diffprev'] = $controller->href_compound('diff.php', null, Paths::fetch_rev_str(false, $controller->revctx));
 }
 
 // ###################################################################
 
-$revinfo = $controller->cachev->fetch_revision($latest['revision']);
+$revinfo = $controller->cachev->fetch_revision($controller->revctx);
 
 $revinfo['message_clean'] = SVNCommon::format_log_message($revinfo['message']);
 $revinfo['date'] = SVNCommon::format_date_string($revinfo['dateline']);
index 75ffd72ac5d7371725887cababe0623422013542..3838e1fc89e0db4b532bb5dc2f81f04967de71a9 100644 (file)
--- a/view.php
+++ b/view.php
@@ -33,7 +33,7 @@ $latest = $controller->cachev->fetch_node();
 
 $link['log'] = $controller->href_compound('log.php');
 
-$show['head'] = ($latest['revision'] != $controller->revnum AND $controller->revnum != 'HEAD');
+$show['head'] = ($latest['revision'] != $controller->revctx);
 if ($show['head'])
 {
        $link['gohead'] = $controller->href_compound('view.php', null, Paths::fetch_rev_str(false, 'HEAD'));