Login | Register
My pages Projects Community openCollabNet

Discussions > commits > [WebSVN commit] svn commit: r1253 - trunk

websvn
Discussion topic

Back to topic list

[WebSVN commit] svn commit: r1253 - trunk

Reply

Author dirkthomas
Full name Dirk Thomas
Date 2011-03-06 02:21:18 PST
Message Author: dirkthomas
Date: 2011-03-06 02:21:18-0800
New Revision: 1253

Modified:
   trunk/filedetails.php
   trunk/log.php

Log:
fixed handling of forward revisions in which the specific path has not been modified

Modified: trunk/filedetails.php
Url: http://websvn.tigris​.org/source/browse/w​ebsvn/trunk/filedeta​ils.php?view=diff​&pathrev=1253&r​1=1252&r2=1253
====================​====================​====================​==================
--- trunk/filedetails.php (original)
+++ trunk/filedetails.php 2011-03-06 02:21:18-0800
@@ -44,13 +44,15 @@
     if (!$history) {
         unset($vars['error']);
         $history = $svnrep->getLog($path, '', '', false, 2, ($path == '/') ? '' : $peg);
+ if (!$history) {
+ unset($vars['error']);
+ $vars['error'] = 'Revision '.$peg.' of this resource does not exist.';
+ }
     }
     $youngest = ($history && isset($history->entries[0])) ? $history->entries[0]->rev : false;
 
     if (empty($rev)) {
         $rev = $youngest;
- } else if ($rev > $youngest) {
- $vars['warning'] = 'Revision '.$rev.' of this resource does not exist.';
     }
 
     $extn = strtolower(strrchr($path, '.'));

Modified: trunk/log.php
Url: http://websvn.tigris​.org/source/browse/w​ebsvn/trunk/log.php?​view=diff&pathre​v=1253&r1=1252​&r2=1253
====================​====================​====================​==================
--- trunk/log.php (original)
+++ trunk/log.php 2011-03-06 02:21:18-0800
@@ -89,6 +89,10 @@
     if (!$history) {
         unset($vars['error']);
         $history = $svnrep->getLog($path, '', '', false, 1, ($path == '/') ? '' : $peg);
+ if (!$history) {
+ unset($vars['error']);
+ $vars['error'] = 'Revision '.$peg.' of this resource does not exist.';
+ }
     }
 
     $youngest = ($history && isset($history->entries[0])) ? $history->entries[0]->rev : 0;
@@ -107,8 +111,6 @@
 
     if (empty($rev)) {
         $rev = $youngest;
- } else if ($rev > $youngest) {
- $vars['warning'] = 'Revision '.$rev.' of this resource does not exist.';
     }
 
     if (empty($startrev)) {
@@ -126,7 +128,7 @@
     $vars['peg'] = $peg;
     $vars['path'] = escape($ppath);
 
- if (isset($history-​>entries[0])) {
+ if ($history && isset($history->entries[0])) {
         $vars['log'] = xml_entities($histo​ry->entries[0]-​>msg);
         $vars['date'] = $history->entrie​s[0]->date;
         $vars['age'] = datetimeFormatDuration(time() - strtotime($history-​>entries[0]->d​ate));
@@ -198,10 +200,14 @@
     $vars['pagelinks'] = '';
     $vars['showalllink'] = '';
 
- $history = $svnrep->getLog($path, $startrev, $endrev, true, $max, $peg);
- if (empty($history)) {
- $vars['warning'] = 'Revision '.$rev.' of this resource does not exist.';
- } else {
+ if ($history) {
+ $history = $svnrep->getLog($path, $startrev, $endrev, true, $max, $peg);
+ if (empty($history)) {
+ unset($vars['error']);
+ $vars['warning'] = 'Revision '.$startrev.' of this resource does not exist.';
+ }
+ }
+ if (!empty($history)) {
         // Get the number of separate revisions
         $revisions = count($history->entries);

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

[WebSVN commit] svn commit: r1253 - trunk dirkthomas Dirk Thomas 2011-03-06 02:21:18 PST
Messages per page: