Add cyclic dependence detection.

If a depends on b which depends on a, redo would just freeze.  Now it
aborts with a somewhat helpful error message.

[Updated by apenwarr for coding style and to add a test.]
This commit is contained in:
Robert L. Bocchino Jr 2016-11-27 23:35:28 -08:00 committed by Avery Pennarun
commit 7dd63efb37
8 changed files with 32 additions and 1 deletions

View file

@ -34,3 +34,5 @@ def init(targets):
import state
state.init()
os.environ['REDO_LOCKS'] = os.environ.get('REDO_LOCKS', '')