Skip to content

Commit

Permalink
Don't use deleted folders during "BugRegExp" detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Obuhovich committed Jan 2, 2018
1 parent cfa6808 commit cb93354
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Attempt to use "svn-buddy" inside sub-folder of a working copy ended up in exception for Subversion 1.7+ client.
- It was possible to search for an empty keyword using "search" command.
- The externals were shown in auto-generated commit message for `commit` command.
- Deleted branches/tags of a project were introspected for a "bugtraq:logregexp" property resulting in `Path ... not found in ... revision.` error.

## [0.3.0] - 2016-09-08
### Added
Expand Down
8 changes: 7 additions & 1 deletion src/SVNBuddy/Repository/RevisionLog/Plugin/BugsPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,15 @@ protected function getLastChangedRefPath($project_path)
{
$own_nesting_level = substr_count($project_path, '/') - 1;

$where_clause = array(
'Path LIKE :parent_path',
'PathNestingLevel BETWEEN :from_level AND :to_level',
'RevisionDeleted IS NULL',
);

$sql = 'SELECT Path, RevisionLastSeen
FROM Paths
WHERE Path LIKE :parent_path AND PathNestingLevel BETWEEN :from_level AND :to_level';
WHERE (' . implode(') AND (', $where_clause) . ')';
$paths = $this->database->fetchPairs($sql, array(
'parent_path' => $project_path . '%',
'from_level' => $own_nesting_level + 1,
Expand Down

0 comments on commit cb93354

Please sign in to comment.