tests/fake-editor.sh
author Kyle Lippincott <spectral@google.com>
Mon, 16 Sep 2019 12:44:38 -0700
changeset 4848 535ab2609e45
parent 1742 970a4c13ebc3
permissions -rwxr-xr-x
cmdstate: introduce a "saver" contextmanager and use it in place of save() Previously, the state was only saved in some paths out of these functions. This can be problematic, if the user ctrl-c's (or `kill -9`'s) the process, or we exit out of `relocate` for anything besides the "expected" reason, we won't record that we were in the middle of an evolve. One of our users has discovered that this leaves hg in a weird state; the user did something like this: ``` $ hg evolve <something goes wrong with the merge tool, hits ctrl-c> <deals with the merge conflicts> $ hg evolve --continue abort: no interrupted evolve to continue $ hg evolve abort: uncommitted changes # Note: commands.status.verbose=True is set. $ hg status M foo # The repository is in an unfinished *update* state. # No unresolved merge conflicts # To continue: hg update ``` The user did an `hg update`, but it didn't actually do anything besides take it out of the unfinished update state (the files were still dirty in the working directory).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1742
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents:
diff changeset
     1
#!/bin/sh
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents:
diff changeset
     2
sleep 5
970a4c13ebc3 evolve: lock the working copy early in next and prev (issue5244)
Simon Farnsworth <simonfar@fb.com>
parents:
diff changeset
     3
echo "new desc" >> $1