-
Notifications
You must be signed in to change notification settings - Fork 4
Initial version of a git_bdiff module #100
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
Conversation
A simple module that wraps around git diff and generates a complete list of files changed on a branch since it diverged from the parent. This is intended to replace the functionality of fcm_bdiff.
Allow the constructor to specify the path to a repository and update the run_git method to change to the directory before running each git command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments inline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whilst i can see this rather replicates the behaviours of the "fcm_bdiff.py" script used to get info out of the fcm/svn based repos, and thus should work as an almost 'drop in' replacement for the fcm_bdiff.py utility....
There are 'other' utility scripts/routines which do similar things for other fcm commands...
What I would have realy liked to see was something that created a 'class' containing all the info gathered about a branch (so perhaps making each 'get' return a value or if that value has not been generated yet, then generate it - singleton style)
I appreciate that's a big - change to ask for at this stage, so I'm not asking for it. What I am asking for is a possible re-name of the file so that when it hopefully 'morphs' into something which can gather and store all the info we like to know about a branch, it doesn't feel misnamed...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, plenty of good things to think about and polish up 🤔
Add string comparisons to existing exception tests and add a couple of exception handling tests for the git_run method to improve testing coverage.
Reviewer has recommended changing the pattern match to require a full 40 character hex string.
This improves the pattern used to match the branch to make it closer to the official git definition. The pattern does not need to include all the defined by git check-ref-format because the branch name must already be compliant with these in order to be created in the first place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks to be an improvement on the fcm version, and it's got unit tests....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy with the additional mods. Approved.
Description
Summary
A simple module that wraps around git diff and generates a complete list of files changed on a branch since it diverged from the parent. This is intended to replace the functionality of fcm_bdiff when we move the repositories to git.
Changes
New python module plus some tests
Dependency
None
Impact
None
Issues addressed
#86
Coordinated merge
None
Checklist