Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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

    authored
    ...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.

    authored
    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
    
      blah_function
      [ "$?" = "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 install.do.

    authored
  4. Rename 111-compile to 111-compile2.

    authored
    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.

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

    authored
    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.

    authored
    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.

    authored
    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.
    
    apenwarr-style default.o.do:
       $1      foo
       $2      .o
       $3      whatever.tmp
    
    djb-style default.o.do:
       $1      foo.o
       $2      foo
       $3      whatever.tmp
    
    apenwarr-style foo.o.do:
       $1      foo.o
       $2      ""
       $3      whatever.tmp
    
    djb-style foo.o.do:
       $1      foo.o
       $2      foo.o  (I think?)
       $3      whatever.tmp
  2. md-to-man.do: suggest how to install markdown/BeautifulSoup

    authored
    ...since they aren't included by default on MacOS X, but easy_install can
    easily get them for you.
  3. t/pytest.do: don't run in minimal/do.

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

    authored
    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.

    authored
    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…

    authored
    …ting.
    
    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/shelltest.do, 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.

    authored
    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.

    authored
    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.

    authored
    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. redo-sh.do: prettier log messages.

    authored
    Make it easier to see which shells fail/warn about what.
Commits on Mar 31, 2011
  1. User-overridden targets stay overridden even if the last build failed.

    authored
    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*
    work.
    
    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.

    authored
    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.

    authored
    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.

    authored
    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.

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

    authored
    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.

    authored
    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

    authored
    ...and remove the "disable-if-minimal-do" from the test that would have
    caught this bug.
    
    Reported by Ulrik Sverdrup.
Something went wrong with that request. Please try again.