Commits on Feb 9, 2012
  1. minimal/do: some shells return error in "read x <file" for empty files.

    apenwarr committed Feb 9, 2012
    ...or files that contain bytes but not a trailing newline.  It's okay if we
    don't get any data, but we definitely have to *not* let "set -e" abort us.
    Now that we fixed set -e in the previous patch, it revealed this problem.
  2. minimal/do: fix a really scary bugs in "set -e" behaviour.

    apenwarr committed Feb 9, 2012
    If you run something like
      blah_function || return 1
    then everything even *inside* blah_function is *not* subject to the "set -e"
    that would otherwise be in effect.  That's true even for ". subfile" inside
    blah_function - which is exactly how minimal/do runs .do files.
    Instead, rewrite it as
      [ "$?" = "0" ] || return 1
    And add a bit to the unit tests to ensure that "set -e" behaviour is enabled
    in .do files as we expect, and crash loudly otherwise.
    (This weird behaviour may only happen in some shells and not others.)
    Also, we had a "helpful" alias of redo() defined at the bottom of the file.
    Combined with the way we use '.' to source the .do files, this would make it
    not start a new shell just to run a recursive 'redo' command.  It almost
    works, but this stupid "set -e" bug could cause a nested .do file to not
    honour "set -e" if someone ran "redo foo || exit 1" from inside a .do
    script.  The performance optimization is clearly not worth it here, so
    rename it to _redo(); that causes it to actually re-exec the redo program
    (which is a symlink to minimal/do).
  3. Add a test for

    apenwarr committed Feb 9, 2012
  4. Rename 111-compile to 111-compile2.

    apenwarr committed Feb 9, 2012
    Not a great name, but make it obvious that this is a slightly different test
    from 110-compile.
  5. t/201-fail: add a simple test for non-existent source files.

    apenwarr committed Feb 9, 2012
    (This actually went uncaught in my redo rewrite.  Oops.)
Commits on Feb 8, 2012
  1. t/*: rearrange tests into numbered directories.

    apenwarr committed Feb 8, 2012
    It was getting way too ad-hoc in there.  Let's reorganize the tests so that
    there's a good, obvious, suggested sequence to run them in.
  2. t/*: update some tests from my rewrite branch.

    apenwarr committed Feb 8, 2012
    Just some minor test fixes so that tests pass on both current redo and the
    upcoming rewritten one.
Commits on Dec 31, 2011
  1. Change definitions of $1,$2,$3 to match djb's redo.

    apenwarr committed Dec 31, 2011
    If you use "redo --old-args", it will switch back to the old
    (apenwarr-style) arguments for now, to give you time to update your .do
    scripts.  This option will go away eventually.
    Note: minimal/do doesn't understand the --old-args option.  If you're using
    minimal/do in your project, keep using the old one until you update your use
    of $1/$2, and then update to the new one.
       $1      foo
       $2      .o
       $3      whatever.tmp
       $1      foo.o
       $2      foo
       $3      whatever.tmp
       $1      foo.o
       $2      ""
       $3      whatever.tmp
       $1      foo.o
       $2      foo.o  (I think?)
       $3      whatever.tmp
  2. suggest how to install markdown/BeautifulSoup

    apenwarr committed Dec 31, 2011
    ...since they aren't included by default on MacOS X, but easy_install can
    easily get them for you.
  3. t/ don't run in minimal/do.

    apenwarr committed Dec 31, 2011
    And add a reminder to to run 'minimal/do test'.
Commits on May 8, 2011
  1. Docs: recommend adding redo-ifchange with a lot of targets at a time.

    apenwarr committed May 8, 2011
    Some people don't know to do this, and their scripts are unnecessarily slow
    because of it.
  2. redo-sh: reverse a case that caused 'set -e' to abort on zsh.

    apenwarr committed May 8, 2011
    Correctly, I might add.  It's too bad none of my other shells did it.  Sigh.
  3. t/shelltest.od: quiet some error messages that get printed during tes…

    apenwarr committed May 8, 2011
    If the error message only triggered a shelltest warning instead of a
    failure, then they're harmless, so we might as well silence them when
    running 'redo test' (which runs t/, which enables
    SHELLTEST_QUIET).  We still want to print them when actually testing out
    shelltest.od, though, to help with debugging the script.
  4. Don't use "insert ... default values" in sqlite3.

    apenwarr committed May 8, 2011
    It isn't supported in older sqlite3 versions.  Let's just do something
    equivalent instead.
Commits on Apr 18, 2011
  1. shelltest: use a more magical magic number for success.

    apenwarr committed Apr 18, 2011
    There may be some odd situation where a shell returns 0 despite not executing
    the script correctly; now 0 is an error condition.
Commits on Apr 2, 2011
  1. t/shelltest.od: another test for ${x#y} behaviour.

    apenwarr committed Apr 2, 2011
    If y contains a * character, it's a case-esac style wildcard unless it's in
    "" or '', which tells it to match a literal *.  But in dash/busybox, the ''
    quoting doesn't actually work, only "" does.
    Since there's a workaround - just always use "" quoting - it's not that
    fatal.  If the "" quoting doesn't work, then we'll make it fail.
  2. prettier log messages.

    apenwarr committed Mar 23, 2011
    Make it easier to see which shells fail/warn about what.
Commits on Mar 31, 2011
  1. Test for previous override fix.

    apenwarr committed Mar 31, 2011
  2. User-overridden targets stay overridden even if the last build failed.

    apenwarr committed Mar 31, 2011
    Previously, if 'redo-ifchange foo' failed last time, then creating foo
    manually wouldn't help; 'redo-ifchange foo' would still try to rebuild it.
    But if the first run *did* create it, then manually overriding it *did*
    That inconsistency is pointless.  If the user creates it by hand, it doesn't
    matter if it failed to build last time or not; the user wants it overridden.
    So this way, something that can't build can at least be manually created as
    a hack.
Commits on Mar 27, 2011
  1. state.relpath: correct broken paths ending with /, etc.

    apenwarr committed Mar 27, 2011
    Bug reported by Elliott Hird.  Based on a patch by Tim Allen, but I didn't
    do it the same way.
Commits on Mar 23, 2011
  1. Don't crash on targets in directories that don't exist yet.

    apenwarr committed Mar 23, 2011
    The reason we'd crash is that we tried to pre-create a file called
    $target.redo.tmp, which wouldn't work because the directory containing
    $target didn't exist.
    We now try to generate a smarter filename by using the innermost directory
    of target that *does* exist.  It's a little messy, but the idea is to make
    sure we won't have to rename() across a filesystem boundary if, for example,
    there's a mounted filesystem in the middle of the hierarchy somewhere.
Commits on Mar 11, 2011
  1. redo: only default to 'all' in the toplevel instance of redo.

    apenwarr committed Mar 11, 2011
    We already did this in minimal/do, and redo-ifchange already did this, but
    plain redo didn't.  This made constructs like:
    	for d in *.x; do
    		echo "${d%.x}"
    	done | xargs redo
    dangerous, because if there were no matching files, we'd try to 'redo all'.
  2. md2man: fix compatibility problem with python-markdown 1.6.

    apenwarr committed Mar 11, 2011
    Symptom: the following error message when building redo.1:
    	ValueError: non-man-compatible html tag u'br'
Commits on Mar 10, 2011
  1. detect overrides by only ctime, not all of struct stat.

    apenwarr committed Mar 10, 2011
    We were accidentally including things like the atime in the comparison,
    which is obviously silly; someone reading the file shouldn't mark it as a
    manual override.
  2. t/curse/Makefile: delete.

    apenwarr committed Mar 10, 2011
    I don't remember why it was there, but we clearly don't use it anymore.
Commits on Mar 7, 2011
  1. minimal/do: fix a typo: DO_BUILD -> DO_BUILT

    apenwarr committed Mar 7, 2011
    ...and remove the "disable-if-minimal-do" from the test that would have
    caught this bug.
    Reported by Ulrik Sverdrup.