Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
aik099 opened this issue Feb 7, 2018 · 0 comments
Open

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

aik099 opened this issue Feb 7, 2018 · 0 comments

Comments

@aik099
Copy link
Member

aik099 commented Feb 7, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant