-
Notifications
You must be signed in to change notification settings - Fork 29
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
return branch heads in repo log method #125
Conversation
Codecov Report
@@ Coverage Diff @@
## master #125 +/- ##
=========================================
+ Coverage 92.03% 92.1% +0.06%
=========================================
Files 60 60
Lines 10005 10087 +82
Branches 997 999 +2
=========================================
+ Hits 9208 9290 +82
Misses 582 582
Partials 215 215
|
@hhsecond, does this work for your purposes? I chose to go with a mapping between
rather than a reverse mapping of branch names to (possibly duplicate) commits in order to keep in line with the other layout of results ( ie. 'ancestors': {
'0ff3f2ec156ab8e1026b5271630ccae4556cc260': [''],
'3c9530ac0da1106c0acbe1201900c51548bbcdd9'': ['fed88489ab6e59913aee935169b15fe68755d82c'],
'fed88489ab6e59913aee935169b15fe68755d82c': ['0ff3f2ec156ab8e1026b5271630ccae4556cc260']
}
'specs': {'0ff3f2ec156ab8e1026b5271630ccae4556cc260': {
'commit_message': 'first commit adding training images and labels',
'commit_time': 1562203787.257128, 'commit_user': 'Foo User', 'commit_email': 'foo@bar.com'},
'3c9530ac0da1106c0acbe1201900c51548bbcdd9': {
'commit_message': 'added testing labels only',
'commit_time': 1562203787.388417, 'commit_user': 'Foo User', 'commit_email': 'foo@bar.com'},
'fed88489ab6e59913aee935169b15fe68755d82c': {
'commit_message': 'added testing images only',
'commit_time': 1562203787.372292, 'commit_user': 'Foo User', 'commit_email': 'foo@bar.com'}}
} so that the result now includes something which looks like: 'branch_heads': {
'3c9530ac0da1106c0acbe1201900c51548bbcdd9': ['add-test'],
'e5ea58dd9c7ffacd45fb128ddc00aced08d13889': ['add-validation'],
'074f81d6b9fa5fa856175d47c7cc95cc4a839965': ['master', 'dev-branch'],
} I could make a case for both mapping directions, so let me know if you have an opinion to add. I'm OK either way. |
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.
Looks good for my use case
Great! Merging now! |
Motivation and Context
Why is this change required? What problem does it solve?:
Add more useful branch info to log output
If it fixes an open issue, please link to the issue here:
Description
Describe your changes in detail:
branch_heads
key now returned along side the rest of the info.Types of changes
What types of changes does your code introduce? Put an
x
in all the boxes that apply:Is this PR ready for review, or a work in progress?
How Has This Been Tested?
Put an
x
in the boxes that apply:Checklist: