Commits on Jul 12, 2010
  1. cmd/web: tiny fix to make redirects work with Firefox.

    Firefox honours Content-Length even for 301 redirects, so if the field isn't
    provided, it assumes there's an unlimited amount of data and just hangs.
    Also fixed a typo in the man page.
    lelutin committed with Jul 12, 2010
  2. Add new 'bup web' command.

    'bup web' starts a web server that allows one to browse the bup repository
    from a web browser.
    Also reorganized version-cmd to allow easy access to bup version from other
    Signed-off-by: Joe Beda <>
    jbeda committed with Jul 11, 2010
  3. differentiate unset and set-to-negative options.

    Unset options will still be None, but options explicitly set to a negative
    will now be 0. This doesn't change semantics for anything currently in bup,
    but it could be useful later when applying defaults.
    While we're here, clean up the option parsing code to make it
    very slightly more efficient.
    Signed-off-by: Brandon Low <>
    Brandon Low committed with Jul 10, 2010
  4. cmd/split: minor correction to an error message.

    Signed-off-by: Brandon Low <>
    Brandon Low committed with Jul 9, 2010
Commits on Jul 9, 2010
  1. cmd/ftp: only import readline if necessary.

    Apparently on some systems (Mandriva and Slackware at least), importing
    the readline library can print some escape sequences to stdout, which screws
    things up with the unit tests that run 'bup ftp "cat filename"' and expect
    it to be the right data.
    Thanks to Eduardo Kienetz for noticing and helping to track down the problem
    since I couldn't reproduce it.
    Signed-off-by: Avery Pennarun <>
    committed Jul 9, 2010
  2. vfs: needs to do a seek(0) on the cached FileReader.

    Otherwise if you open a file, read through it, and close it, then do it
    again, you'll get zero bytes the second time.
    To make this efficient, change seek() to not discard its _chunkiter every
    single time; instead, keep the _chunkiter around until trying to read() from
    a location that *isn't* the current offset.  Now seeking around in the file
    is cheap.
    Signed-off-by: Avery Pennarun <>
    committed Jul 9, 2010
Commits on Jul 7, 2010
  1. README: one less reason that we suck.

    bup fuse and bup ftp can rejoin large files nowadays, so remove that
    limitation from the README.
    Reported by koo5 @ github.
    Signed-off-by: Avery Pennarun <>
    committed Jul 7, 2010
  2. README improvement.

    Be more specific about how to update the remote PATH.
    koom committed with Jul 7, 2010
Commits on Jun 27, 2010
  1. Inline inside

    Since the cat() function in is used only inside the
    script, and since it is a discouraged use of CatPipe, inline the code
    inside the script.
    At the same time, make the CatPipe object persistent between calls to
    the "cat" command to remove unnecessary deletion/creation or resources.
    Signed-off-by: Gabriel Filion <>
    lelutin committed with Jun 25, 2010
  2. Remove trailing spaces from

    Signed-off-by: Gabriel Filion <>
    lelutin committed with Jun 25, 2010
Commits on Jun 26, 2010
  1. bup-fuse.1: mention how to unmount the filesystem when we're done.

    Based on a question from the mailing list.
    Signed-off-by: Avery Pennarun <>
    committed Jun 26, 2010
Commits on Jun 25, 2010
  1. vfs: correctly handle reading small files.

    After the recent change to let vfs seek around in files, we broke support
    for files that were only one chunk.  Fix it up, then add some unit tests to
    detect such mistakes in the future.
    Also, 'bup ftp' now returns nonzero if it catches any exceptions during
    execution, making it more suitable for use in scripts... such as the unit
    tests :)
    Signed-off-by: Avery Pennarun <>
    committed Jun 25, 2010
  2. cmd/random: support lengths that aren't a multiple of 1k.

    Signed-off-by: Avery Pennarun <>
    committed Jun 25, 2010
  3. Makefile: allow PYTHON variable to override python version.

    Currently, the Makefile assumes the python command that should be used
    is the default python version -- the "python" executable that is found
    in PATH. Compiling and testing with a different python version is not
    possible without either having a system with another default version, or
    by manually changing the link found in PATH.
    Correct this situation by using a variable for the python command name,
    that can be overridden on the command line like the following:
        make PYTHON=python2.6 test
    Signed-off-by: Gabriel Filion <>
    Gabriel Filion committed with Jun 25, 2010
Commits on Jun 8, 2010
  1. Docstrings for the library

    Add docstrings to the module and the public classes and functions of the
    git library (eg. the ones that do not start with _ ).
    Also rename the AbortableIter class to _AbortableIter since it is used
    only inside the library and is not intended to be used elsewhere
    for now.
    Signed-off-by: Gabriel Filion <>
    lelutin committed with Jun 8, 2010
  2. make install: don't fail if documentation couldn't be built.

    Just silently refuse to install the documentation instead.  Reported by Karl
    Signed-off-by: Avery Pennarun <>
    committed Jun 8, 2010
  3. cmd/newliner: if input starts getting too long, print it out.

    This prevents output that doesn't have any newlines from being buffered
    forever (eg. the output of 'bup split -vv').
    Reported by Karl Kiniger.
    Signed-off-by: Avery Pennarun <>
    committed Jun 8, 2010
  4. cmd/{random,split}: call handle_ctrl_c() for cleaner keyboard interru…

    Signed-off-by: Avery Pennarun <>
    committed Jun 8, 2010
Commits on Jun 7, 2010
  1. cmd/{save,split}: add a --bwlimit option.

    This allows you to limit how much upstream bandwidth 'bup save' and 'bup
    split' will use.  Specify it as a number of bytes/second, or with the 'k' or
    'M' or (lucky you!) 'G' suffixes for larger values.
    Signed-off-by: Avery Pennarun <>
    committed Jun 7, 2010
Commits on Jun 3, 2010
  1. Work around extra space added by some readline versions.

    Apparently some versions of readline (6.0, for me) in some versions of
    Python (Ubuntu's python2.6.4-0ubuntu1, for me) have an irritating bug
    where they add an extra space to the end of all completions.  This is
    particularly annoying for directory completions, as you can't
    tab-complete your way into the contents of the directory.  See
    This patch, borrowed mostly from Trac, goes in and twiddles the
    appropriate variable inside the readline library to make it stop doing
    that.  See for the discussion.
    Signed-off-by: Peter McCurdy <>
    Peter McCurdy committed with Apr 16, 2010
Commits on May 11, 2010
  1. bup ftp: work even if the 'readline' module isn't available.

    Suggested by Joe Beda.
    committed May 11, 2010
  2. Stop using '%s' formatter in strftime.

    This isn't supported on all platforms (OpenSolaris specifically).
    Signed-off-by: Joe Beda <>
    jbeda committed with May 11, 2010
Commits on Apr 30, 2010
  1. code clarity: one-letter var carried for too long

    In, the "w" variable is first seen on line 55 and is kept
    around until line 96. Variables that are sparsely used in a medium
    distance in the code should have a name that carries more sense when
    read on its own.
    Change "w" into "pack_writer" to better identify the purpose of the
    Signed-off-by: Gabriel Filion <>
    lelutin committed with Apr 30, 2010
  2. Avoid len as a variable name

    As discussed earlier on the mailing list, the "len" builtin is used very
    often, and using "len" as a variable name can get confusing.
    Change all occurrences of "len" as a variable to "sz" to keep it short
    and meaningful.
    Signed-off-by: Gabriel Filion <>
    lelutin committed with Apr 30, 2010
Commits on Apr 28, 2010
  1. adjust .md files to make lexgrog happy

    the whatis(1) tool cannot parse the bup manpages, because there
    are two words before the '-' separator. This patch joins the words
    using another '-', in the same fashion as git, to overcome this
    $ whatis bup fuse
    bup (1)              - Backup program using rolling checksums and git file fo...
    fuse: nothing appropriate.
    $ whatis bup-fuse
    bup-fuse: nothing appropriate.
    $ whatis bup-fuse
    bup-fuse (1)         - mount a bup repository as a filesystem
    Signed-off-by: Jon Dowland <>
    jmtd committed with Apr 28, 2010
  2. Documentation: some placeholders are lost

    Some pieces of text in the documentation files use the <...> syntax to
    mark named placeholders. However, the conversion done by pandoc from
    Markdown to makefile makes some of these placeholders disappear.
    The affected elements are those that contain only characters that could
    be valid for an e-mail address or a URL, but are not supposed to be one
    of both. Also, elements inside `...`-style code blocks are unaffected.
    Fix this situation by escaping the < and > characters where the tags
    Signed-off-by: Gabriel Filion <>
    lelutin committed with Apr 28, 2010
  3. add -o/--allow-other to bup-fuse

    Setting the fuse option allow_other will fail if user_allow_other
    is not set in fuse.conf.  Add toggle -o/--allow-other to bup-fuse
    (disabled by default).
    Signed-off-by: Jon Dowland <>
    jmtd committed with Apr 28, 2010
  4. replace test files with ones made up of bup code

    This is needed to avoid possible questions about licensing in the source
    data file.
    jmtd committed with Apr 28, 2010
Commits on Apr 27, 2010
  1. git log --format= isn't in older git, but git log --pretty=format: is.

    Signed-off-by: Avery Pennarun <>
    committed Apr 27, 2010
Commits on Apr 24, 2010
  1. bup-fuse: friendliness when python-fuse not found

    When used with the Python "fuse" module not installed on the system, the
    bup-fuse command exits with an error.
    To avoid confusing (or frustrating?) users, print a friendlier error
    message that better describes what happens.
    Signed-off-by: Gabriel Filion <>
    lelutin committed with Apr 24, 2010
  2. cmd/version, etc: fix version number detection stuff.

    Gabriel Filion pointed out that bup's version number (which we added to the
    man pages automatically) was not detected when you used a bup tarball
    generated from 'git archive' (or more likely, you let GitHub call 'git
    archive' for you).  That makes sense, since our version detection was based
    on having a .git directory around, which the tarball doesn't.
    Instead, let's create a .gitattributes file and have it auto-substitute some
    version information during 'git archive'.  Of course, if we actually *do*
    have a .git directory, continue to use that.
    While we're here, add a new 'bup version' command and alias "bup --version"
    and "bup -V" to call it, since those options are pretty standard.
    committed Apr 24, 2010
Commits on Apr 23, 2010
  1. vfs: take advantage of bup chunking to make file seeking faster.

    If you have a huge file, you can now seek around inside it (eg. in 'bup
    fuse') without having to read its entire contents.  Calculating the file
    size is also really fast now.
    This makes a bup fuse-mounted filesystem much more useful for real-time
    access.  For example, I was able to connect to an sqlite3 database and have
    it work at a reasonable speed.  (Obviously, since 'bup fuse' is written in
    python and doesn't currently support threading, the speed could still be
    improved, but at least it's no longer godawful.)
    committed Apr 23, 2010
  2. git.CatPipe: more resilience against weird errors.

    Notably, MemoryErrors thrown because the file we're trying to load into
    memory is too big to load all at once.  Now the MemoryError gets thrown, but
    the main program is potentially able to recover from it because CatPipe at
    least doesn't get into an inconsistent state.
    Also we can recover nicely if some lamer kills our git-cat-file subprocess.
    The AutoFlushIter we were using for this purpose turns out to not have been
    good enough, and it's never been used anywhere but in CatPipe, so I've
    revised it further and renamed it to git.AbortableIter.
    committed Apr 23, 2010
  3. cmd/ftp: 'ls' command should print filenames in columns.

    We use the columnate() function from for this, now moved into
    committed Apr 23, 2010