Skip to content

Commit

Permalink
Display non-executed (results were pulled from the cache) SVN command…
Browse files Browse the repository at this point in the history
… in the verbose mode
  • Loading branch information
aik099 committed Jul 15, 2024
1 parent 7cfee1b commit 18dfb53
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- The `commit` command now highlights the line with a commited revision number.
- Added `reparse` command for reparsing data of a given revision (e.g. when it's log message was changed in repository).
- The SVN command cache effectiveness (how often particular cache key is being used) is now displayed in the verbose output mode.
- Display non-executed SVN command (results pulled from the cache) in the verbose mode.

### Changed
...
Expand Down
10 changes: 8 additions & 2 deletions src/SVNBuddy/Repository/Connector/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,14 @@ public function run($callback = null)
$output = $this->_cacheManager->getCache($cache_key, $this->_cacheInvalidator, $this->_cacheDuration);
}

if ( isset($output) && is_callable($callback) ) {
call_user_func($callback, Process::OUT, $output);
if ( isset($output) ) {
if ( $this->_io->isVerbose() ) {
$this->_io->writeln('<debug>[svn, cached]: ' . $this . '</debug>');
}

if ( is_callable($callback) ) {
call_user_func($callback, Process::OUT, $output);
}
}
}

Expand Down

0 comments on commit 18dfb53

Please sign in to comment.