Skip to content

Conversation

t00sa
Copy link
Contributor

@t00sa t00sa commented Jul 11, 2025

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

  • I have performed a self-review of my own changes

t00sa added 2 commits June 26, 2025 21:21
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.
@t00sa t00sa requested a review from r-sharp July 11, 2025 10:29
@t00sa t00sa requested a review from a team as a code owner July 11, 2025 10:29
@t00sa t00sa requested review from ericaneininger and removed request for a team July 11, 2025 10:29
Copy link
Contributor

@ericaneininger ericaneininger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments inline.

Copy link
Contributor

@r-sharp r-sharp left a 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...

Copy link
Contributor Author

@t00sa t00sa left a 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 🤔

t00sa added 3 commits July 15, 2025 17:06
Add string comparisons to existing exception tests and add a couple of
exception handling tests for the git_run method to improve testing
coverage.
@t00sa t00sa requested review from r-sharp and ericaneininger July 16, 2025 12:41
t00sa added 3 commits July 16, 2025 16:15
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.
Copy link
Contributor

@r-sharp r-sharp left a 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....

Copy link
Contributor

@ericaneininger ericaneininger left a 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.

@ericaneininger ericaneininger merged commit 7a8809d into main Jul 23, 2025
8 checks passed
@ericaneininger ericaneininger deleted the git_bdiff branch July 23, 2025 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants