evolve: lock the working copy early in next and prev (issue5244)
Both next and prev depend on a consistent working copy, but were waiting to
take the lock until they were ready to alter the working copy.
Take the lock before reading the working copy state, and do not release it
until we're definitely not going to change the working copy.
syntax: re
/figures/[^/]+\.png$
^html/
\.pyc$
~$
\.swp$
\.orig$
\.rej$
\.err$
^tests/easy_run.sh$
^build/
^MANIFEST$
^docs/tutorials/.*\.rst$
\.ico$
tests/\.testtimes