Commit graph

9 commits

Author SHA1 Message Date
Avery Pennarun
a62bd50d44 Switch state.py to use sqlite3 instead of filesystem-based stamps.
It passes all tests when run serialized, but still gives weird errors
(OperationalError: database is locked) when run with -j5.  sqlite3 shouldn't
be barfing just because the database is locked, since the default timeout is
5 seconds, and it's dying *way* faster than that.
2010-12-10 00:50:52 -08:00
Avery Pennarun
dd937d6102 redo-if{change,create}: print a useful message if REDO isn't set.
Again, I forgot to make vars.py not crash if the variables aren't set, so we
can print a useful error message.  But this time I have the right solution:
vars.py will do the checking for itself, and abort with a nice message.
2010-11-22 02:45:00 -08:00
Avery Pennarun
132ff02840 Only mkdirp() the .redo directory in one place right at the beginning.
This doesn't really seem to change anything, but it's more correct and
should reveal weirdness (especially an incorrect .redo directory in a
sub-redo) sooner.
2010-11-19 03:16:39 -08:00
Avery Pennarun
dc3efb69cc Extract .redo dir state management stuff into its own file.
In preparation for changing the on-disk format eventually, as well as making
the main code more readable.
2010-11-19 03:16:29 -08:00
Avery Pennarun
3de384497d Handle KeyboardInterrupt with less annoying spew to stderr. 2010-11-13 02:09:42 -08:00
Avery Pennarun
7505048093 redo-if*.py: import fewer things from helpers.
Just to keep track of how many helper functions we actually are using.  In
case I get brave and try to convert to C sometime.
2010-11-13 01:40:01 -08:00
Avery Pennarun
5417d0165a redo-ifcreate: barf if the file already exists.
I'm pretty sure this must be the intended behaviour.  It's kind of
meaningless to use this to declare a dependency on a file that might start
to exist later, if the file already exists.
2010-11-13 01:22:11 -08:00
Avery Pennarun
0bd6d07155 Prettier printing of errors. 2010-11-13 01:21:59 -08:00
Avery Pennarun
91cc82ff4a Add redo-ifcreate to match djb's design.
I'm not quite sure why this needs to be a separate program, however, so I'm
probably not testing it correctly.
2010-11-13 01:10:43 -08:00