Use hg share to provide the working directory
The "fetch" strategy is the default in GitLab 12, and Heptapod Runner 0.2 honours that. But the consequence is that remnants of previous runs can still be in there.
This can lead to build inconsistency or create problems with jobs that create files or directories and aren't expecting them to exist already.
This is exactly why the "clone" strategy exists: to guarantee a pristine checkout. But we could do better with the ubiquity of hg share
.
Since some users may actually want to reuse some stuff preinstalled by former builds (always quite dangerous, it's hard to avoid side effects and maintain indempotency), we could even make this a new, separate, setting. Let's call it share
for the time being. share
would be the default for Mercurial projects, while fetch
would be the current behaviour.