People want us to export our bk repos to github. This requires a complete authors.txt attribution file, and, if I understand it correctly, while that file may acquire additions over time, it must not contain any changes to previously-used attributions.
We get the list of authors (user names) by running:
bk changes -and:USER: | sort -u
and then we manually fill in the full name and email address.
I think I can ‘diff -u’ the new list and the old list and scream if there are any lines that begin with an initial ‘-’, which would indicate that a previously-defined and possibly previously-used author has been changed.
While there might be unused authors in that file who could be deleted, I’m not yet sure how to detect this case.
We want to detect entries we need to add to authors.txt as soon as possible.
If the USER information is added to the ChangeSet(?) file during checkin, that means I could use a pre-commit or possibly a pre-apply trigger to make sure we don’t need to add any entries to authors.txt.
And that’s my question: when will ‘bk changes -and:USER:’ contain the USER name? After the checkin, which means I can use pre-commit or pre-apply?
Is the USER name visible in a way that I could check it in a pre-delta trigger?
I suspect pre-resolve is not ideal, and might not even work.
Where can I learn more about this? Of course, if somebody has the answer for me that would be swell, as it would save me a bunch of time