Coding 2021-10-13
Okay, I filled in the prototype of the release streamlining. Here's what needs to happen:
- Set up bump2version, and configure it to update the __init__.py file, and to commit, but not to tag.
- Add a check for multiple heads on the current topic. This appears to be hg heads --rev topic(topic-of-interest) --template "{rev}\n".
Test a bunch of things on a separate repo, including:
- Test the above hg heads command.
- hg status always outputs to stdout if there's something there to talk about.
- hg topics --current fails if no topic is set, and returns the current topic otherwise.
- I've got a reasonable format for generated topic names; I'm currently trying alphanumerics separated by underscores. This mainly needs to be comprehensible in the context of revsets.
- Regardless of repository state, calling hg update --clean with a topic name will at least ensure that there are no changes to commit.
- I have the correct logic for reading the second component in a filename that is a period-separated string.
- hg topics target --rev topic(source) brings all commits in the source topic into the target topic. It is acceptable (but maybe not necessary, I don't know?) to assume that the newest commit in the target is the parent of the oldest commit in the target. I'm also not sure if this is a sensible way to accomplish this.
I'm probably missing more things, but hopefully I won't hit too many more edge cases, and when it does, hopefully it'll fail for a weird reason rather than "succeed" in a weird way.
Anyway, it's way too late right now.
Good night.