diff --git a/SourceWebSVN/SourceWebSVN.php b/SourceWebSVN/SourceWebSVN.php index 48b0bdc..9dd170f 100644 --- a/SourceWebSVN/SourceWebSVN.php +++ b/SourceWebSVN/SourceWebSVN.php @@ -131,13 +131,16 @@ } public function url_file( $p_repo, $p_changeset, $p_file ) { - if ( $p_file->action == 'rm' ) { - return ''; - } + + # if the file has been removed, it doesn't exists in current revision + # so we generate a link to (current revision - 1) + $t_revision = ($p_file->action == 'rm') + ? $p_changeset->revision - 1 + : $p_changeset->revision; $t_opts = array(); - $t_opts['rev'] = $p_changeset->revision; - $t_opts['peg'] = $p_changeset->revision; + $t_opts['rev'] = $t_revision; + $t_opts['peg'] = $t_revision; return $this->url_base( $p_repo, 'filedetails', $p_file->filename, $t_opts ); }