Commits on Jan 6, 2010
  1. splitting to a remote server would cause "already busy" errors.

    	client.ClientError: already busy with command 'receive-objects'
    That's because recent changes removed the call to onclose() from
    PackWriter_Remote.  Now it's back, plus I added an extra unit test to reveal
    the problem.
    committed Jan 6, 2010
  2. client: enhance the PATH when searching for the 'bup' binary.

    Automatically adds the *local* $PWD to the *remote* $PATH before trying to
    run 'bup server'.  That way, if you build the source in exactly the same
    folder on two machines - or if those two machines are actually the same
    machine and you're just doing a test against localhost - it'll work.
    I hereby curse both "sh -c <command>" and "ssh hostname -- <command>" for
    not allowing a sensible way to just set argv[] without doing any stupid
    quoting.  Nasty.
    committed Jan 6, 2010
  3. Much more user-friendly error messages when bup can't exec the server.

    ...which happens unfortunately often, including in 'make test' when PATH
    doesn't include bup.  I'll fix that next.  But it makes sense to fix the
    error messages first :)
    committed Jan 6, 2010
  4. Add a 'make stupid' target that does 'make test' with a minimal PATH.

    Because I'm stupid and I keep forgetting to test what happens if you don't
    have 'bup' in your PATH.
    Thanks to Dave Coombs and Andy Chong for reporting the problem.  And in
    v0.01 too.
    committed Jan 6, 2010
  5. split: Prevent memory drain from excessively long shalists.

    This avoids huge RAM usage when you're splitting a really huge object, plus
    git probably doesn't work too well with single trees that contain millions
    of objects anyway.
    committed Jan 6, 2010
  6. Split packs around 100M objects or 1G bytes.

    This will make pruning much easier later, plus avoids any problems with
    packs >= 2GB (not that we've had any of those yet, but...), plus avoids
    wasting RAM with an overly full MultiPackIndex.also{} dictionary.
    committed Jan 6, 2010
  7. OOPS! Was writing one byte at a time to the server.

    _raw_write() expects a list, not a string, so it was iterating over it
    character by character.  Magically it worked anyway.  Which is sort of cool,
    and yet not.
    committed Jan 6, 2010
  8. Fix compatibility with git (Ubuntu Hardy).

    Thanks to Andy Chong for reporting the problem.
    Basically it comes down to two things that are missing in that version but
    exist in git 1.5.6:
      - git init --bare doesn't work, but git --bare init does.
      - git cat-file --batch doesn't exist in that version.
    Unfortunately, the latter problem is pretty serious; bup join is really slow
    without it.  I guess it might be time to implement an internal version of
    committed Jan 6, 2010
  9. Older git needs 'git --bare init' instead of 'git init --bare'

    Needed in at least 1.5.4 (Ubuntu Hardy), but not 1.5.6 (Debian Lenny).
    committed Jan 6, 2010
Commits on Jan 5, 2010
  1. test-sh: don't truncate stderr.

    Normally you wouldn't notice this problem, unless you tried to run:
    	make test >&test.out
    and found that it was full of NUL characters.  Oops.
    committed Jan 5, 2010
  2. Make now calls python2.5-config.

    David Wolever committed Jan 5, 2010
Commits on Jan 4, 2010
  1. Fix two bugs reported by dcoombs.

    test-sh was assuming 'bup' was on the PATH.  (It wasn't *supposed* to be
    assuming that, but the "alias bup=whatever" line wasn't working,
    randomgen.c triggered a warning in some versions of gcc about the return
    value of write() being ignored.  It really doesn't bother me if some of my
    random bytes don't get written, but whatever; I'll assert instead, which
    should shut it up.
    committed Jan 4, 2010
  2. Add a README for v0.01.

    committed Jan 4, 2010
  3. Force generated pack indexes to be version 2.

    We don't support parsing earlier versions, and the earlier versions are
    inferior anyway.
    committed Jan 4, 2010
  4. We can now update refs when we do a backup.

    Supported by both cmd-save and cmd-split, albeit with a disturbing amount of
    code duplication.
    Also updated bup-join to use a default BUP_DIR if none is specified.
    committed Jan 4, 2010
Commits on Jan 3, 2010
  1. Refactored client stuff into; now cmd-save and cmd-init use…

    … it too.
    Still not updating refs, however, so it remains a bit stupid.
    committed Jan 3, 2010
  2. Fix some problems running on older Debian.

    python 2.5 (pre-2.5.2) can't struct.unpack from a buffer(); coerce it to a
    string first.
    The default python is 2.4, so run /usr/bin/python2.5 explicitly.
    committed Jan 3, 2010
  3. Support incremental backups to a remote server.

    We now cache the server's packfile indexes locally, so we know which objects
    he does and doesn't have.  That way we can send him a packfile with only the
    ones he's missing.
    cmd-split supports this now, but cmd-save still doesn't support remote
    The -n option (set a ref correctly) doesn't work yet either.
    committed Jan 3, 2010
  4. Extremely basic 'bup server' support.

    It's enough to send a pack to the remote end with 'bup split', though 'bup
    save' doesn't support it yet, and we're not smart enough to do incremental
    backups, which means we generate the gigantic pack every single time.
    committed Jan 3, 2010
  5. bup save: handle symlinks correctly.

    ie. save symlinks as symlinks, don't blindly recurse into them.
    Also, directory names in trees need to be sorted as if they were "name/",
    not "name".  Otherwise git fsck complains.
    Improved 'make test' to check 'git fsck' output and to actually run bup
    committed Jan 3, 2010
  6. Add 'bup init' command.

    Basically an alias for git init, but uses BUP_DIR instead of GIT_DIR
    environment variable.
    committed Jan 3, 2010
  7. Moved some git.* globals into PackWriter; use BUP_DIR as repo path.

    If BUP_DIR isn't set, it defaults to ./.git, which is probably not so smart,
    but works for now (and was what we were using *until* now anyway).
    committed Jan 3, 2010
  8. Better behaviour with --verbose.

    Also added --verbose to cmd-save.
    committed Jan 3, 2010
  9. git.PackIndex: a class for quickly searching a git packfile index.

    This will allow us to generate incremental backups more efficiently, since
    we can avoid rewriting already-known objects into a new pack.
    committed Jan 3, 2010
Commits on Jan 2, 2010
  1. Write git pack files instead of loose object files.

    This causes much, much less disk grinding than creating zillions of files,
    plus it's even more disk space efficient.
    We could theoretically make it go even faster by generating the .idx file
    ourselves, but for now, we just call "git index-pack" to do it.  That
    helpfully also confirms that the data was written in a git-compatible way.
    committed Jan 2, 2010