Skip to content

[log] Allow filtering by method in a PHP class/interface/trait #117

@aik099

Description

@aik099

Sometimes it's interesting to see commits, that changed contents of a particular method in a PHP class/interface/trait instead of just looking for any change in the file.

In most cases, then svn blame command with some manual input (e.g. #116) would do the trick, but in cases, when:

  • code was removed (therefore not shown when doing svn blame on HEAD revision)
  • you're not quite sure how code looked to use svn-buddy.phar search command
  • code to be searched is very common and used in other methods as well

How this can be implemented:

When collecting repository info from log command (aka revision log cache) for affected *.php files also:

  1. get classes defined
  2. do ReflectionClass to get methods
  3. for each method do getStartLine and getEndLine
  4. do the blame on a particular revision (or maybe svn cat or svn diff) to see if code between lines where method is declared was changed

Later accept --method option/parameter of log command, that will filter out only revisions where given method was changed.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions