Commit graph

7 commits

Author SHA1 Message Date
Martin von Zweigbergk
37e30a4b68 tests: use snapshot testing for operation log
The operation IDs are now predictable in tests.
2022-11-24 16:00:20 -10:00
Martin von Zweigbergk
94501131ac cli: when merging concurrent operations, snapshot afterwards
It seems simpler to do the snapshotting after merging any concurrent
operations instead of snapshotting on top of one of the operations,
especially since the attempt to snapshot may end up noticing that the
working copy is stale.

More importantly, snapshotting before resolving operations resulted in
a crash if the working copy was modified. That happened because we
held a lock on the operation heads (`locked_op_heads`) while we tried
to record the operation committing the working copy. I noticed this
only after adding the test.
2022-10-12 06:22:38 -07:00
Martin von Zweigbergk
0865b1ccff cli: show placeholder text for empty commit message
It can be confusing that some commits (typically the working copy)
don't have a description. Let's show a placeholder text in such cases.

I chose the format to match the "(no email configured)" message we
already have.
2022-05-18 09:16:04 -07:00
Martin von Zweigbergk
f71047c823 cli: add hard-coded support for specifying previous operation
It's useful for testing to be able to specify some operation that's
not the latest one.

I didn't update the changelog because this feature is mostly for
testing.
2022-04-26 10:42:29 -07:00
Martin von Zweigbergk
710d51c45b tests: move testutils from src/ to tests/ 2022-04-02 14:22:58 -07:00
Martin von Zweigbergk
12bce70bed cli: display how many commits were rebased when merging operations (#111)
This involved copying `UnresolvedHeadRepo::resolve()` into the CLI
crate (and modifying it a bit to print number of rebased commit),
which is unfortunate.
2022-03-26 22:31:49 -07:00
Martin von Zweigbergk
749ea62c08 cli: let the user know if there's been a concurrent modification (#111) 2022-03-26 22:31:49 -07:00