Skip to content

Commit

Permalink
Item13133: keep calls to numRevisions to a minimum
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Dec 3, 2014
1 parent 28f5d1a commit 9f81bf9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions RCSStoreContrib/lib/Foswiki/Store/Rcs/RcsWrapHandler.pm
Expand Up @@ -325,14 +325,15 @@ sub getRevision {
sub getInfo {
my ( $this, $version ) = @_;

my $numRevs = $this->_numRevisions() || 0;
if ( ( $this->noCheckinPending() )
&& ( !$version || $version > $this->_numRevisions() ) )
&& ( !$version || $version > $numRevs ) )
{
$version = $this->_numRevisions();
$version = $numRevs;
}
else {
$version = $this->_numRevisions() + 1
unless ( $version && $version <= $this->_numRevisions() );
$version = $numRevs + 1
unless ( $version && $version <= $numRevs );
}
my ( $rcsOut, $exit ) = Foswiki::Sandbox->sysCommand(
$Foswiki::cfg{RCS}{infoCmd},
Expand Down

0 comments on commit 9f81bf9

Please sign in to comment.