Skip to content

Commit

Permalink
Perform auto-commit (when enabled) after merge, that because everythi…
Browse files Browse the repository at this point in the history
…ng is already merged
  • Loading branch information
aik099 committed Apr 11, 2024
1 parent b4583ba commit 735070f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- The `--bugs` and `--revisions` options of the `merge` and `log` commands now can be combined for better versatility.
- Improved `merge` command phrasing for the "upcoming merge status" term.
- Lazy load other commands to improve each individual command performance.
- Perform auto-commit (when enabled) after merge, that failed because everything is already merged.

### Fixed
- The `--aggregate` option of the `merge` and `commit` commands wasn't working (triggered an exception) when revision without a bug wasn't present in the list of revisions.
Expand Down
6 changes: 4 additions & 2 deletions src/SVNBuddy/Command/MergeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
if ( $revisions ) {
$revisions = array_intersect($revisions, $this->_usableRevisions);

if ( !$revisions ) {
if ( !$revisions && !$this->performCommit() ) {
throw new CommandException(\sprintf(
'Requested revisions are %s',
$this->isReverseMerge() ? 'not yet merged' : 'already merged'
Expand Down Expand Up @@ -834,7 +834,7 @@ protected function limitRevisions(array $revisions, $max_revision)
/**
* Performs commit unless user doesn't want it.
*
* @return void
* @return boolean
*/
protected function performCommit()
{
Expand All @@ -851,6 +851,8 @@ protected function performCommit()
$this->io->writeln(array('', 'Commencing automatic commit after merge ...'));
$this->runOtherCommand('commit');
}

return $auto_commit;
}

/**
Expand Down

0 comments on commit 735070f

Please sign in to comment.