1 patch for repository http://darcs.net/screened:
patch d6f6944fabc17a460527e5a6309b608fcc1ca65b
Author: Ben Franksen <ben.franksen@online.de>
Date: Mon Nov 8 17:08:39 CET 2021
* catch all takeLock exceptions in withLockCanFail
Note that withLockCanFail is used in commands that are otherwise read-only,
such as annotate and log (with a filename), in order to create a patch
index. These commands should not fail if taking the lock fails for whatever
reason (e.g. no write permission). This is important for instance when using
darcsweb.
Looks fine.
I wonder if we should pass the exception message upwards so that the
caller can choose to print out a warning? I guess it's debatable
whether read-only commands should print out warnings about the index.
A warning would indicate to the user that we cannot create a patch index
and why. Now, creating a patch index is quite expensive (we must read all
patches in the history), so it is mostly an investment to improve the
performance of /future/ commands of a similar nature. Explaining all of
this would be quite verbose and probably confusing to inexperienced users.