Permalink
Commits on Jul 26, 2010
  1. Add a mode argument to mkdirp.

    Signed-off-by: Rob Browning <rlb@defaultvalue.org>
    rlbdv committed with Jul 26, 2010
  2. Don't specify a user or group during "make install".

    This makes it possible to install bup as a normal user.
    
    Signed-off-by: Rob Browning <rlb@defaultvalue.org>
    rlbdv committed with Jul 26, 2010
  3. Remove Makefile lines that only contain a tab.

    Signed-off-by: Rob Browning <rlb@defaultvalue.org>
    rlbdv committed with Jul 26, 2010
  4. cmd/ftp: don't let people cd into a non-directory.

    This bug was relatively harmless (since you could also cd back out again)
    but kind of weird.
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
    committed Jul 26, 2010
  5. vfs: resolve absolute symlinks inside their particular backup set.

    Let's say you back up a file "/etc/motd" that's a symlink to
    "/var/run/motd".  The file inside the backup repo is actually
    /whatever/latest/etc/motd, so the symlink should *actually* point to
    /whatever/latest/var/run/motd.  Let's resolve it that way automatically in
    Symlink.dereference().
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
    committed Jul 26, 2010
  6. vfs: try_lresolve() was a bad idea. Create try_resolve() instead.

    Also add some comments to describe the actual differences between resolve()
    and lresolve(), and clean things up a bit so that they actually work as
    they're supposed to.
    
    Basically, all of lresolve(), resolve(), and try_resolve() depend on
    *intermediate* paths being resolvable; all of them will throw an exception
    if not.  They only differ in the very last node in the path, when that node
    is a symlink:
    
      resolve() will dereference it or throw an exception if it can't;
      try_resolve() will try to dereference it, but return self if it can't;
      lresolve() will not dereference it at all, like lstat() doesn't.
    
    With that in mind, we can fix up cmd/ftp and cmd/web to use the right calls,
    thus fixing an unexpected error in ftp's tab completion reported by Gabriel
    Filion, which would happen if you tried to tab complete inside a directory
    that contained a broken symlink.  We only care what the symlink points to so
    we can decide whether or not to append '/' to the tab completion, so we want
    it to fail silently if it's going to fail.
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
    committed Jul 26, 2010
  7. fix helpers.columnate bug when list is empty

    When the list given to the columnate function is empty, the function
    raises an exception when determining the max(len of all elements), since
    the list given to max is empty.
    
    One indirect example of when this bug is apparent is in the 'bup ftp'
    command when listing an empty directory:
    
        bup> ls backupname/latest/etc/keys
        error: max() arg is an empty sequence
    
    Add a special condition at the beginning of the columnate function that
    returns an empty string if the list of elements is empty.
    
    Signed-off-by: Gabriel Filion <lelutin@gmail.com>
    lelutin committed with Jul 25, 2010
Commits on Jul 23, 2010
  1. Ignore vim's .sw? files.

    Vim names its temp files .filename.sw?.  Let's ignore them.
    
    Signed-off-by: Peter McCurdy <petermccurdy@alumni.uwaterloo.ca>
    pmccurdy committed with Jul 23, 2010
  2. cmd/web: don't die if lresolve() fails.

    Some symlinks end up pointing to nonexistent names, which is maybe not
    "normal", but certainly is allowed.
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
    committed Jul 23, 2010
  3. Convert 'bup web' directory listing to use tornado templates.

    This includes creating a new idea of a "resource path" that currently sits
    under the lib dir. Getting resources is supported with a new helper
    (resource_path).
    
    Signed-off-by: Joe Beda <joe@bedafamily.com>
    jbeda committed with Jul 23, 2010
Commits on Jul 22, 2010
  1. Default 'bup web' to serving on localhost only.

    Also make command output match man page.
    
    Signed-off-by: Joe Beda <joe@bedafamily.com>
    jbeda committed with Jul 22, 2010
  2. Install our copy of tornado into /usr/lib/bup/tornado.

    Signed-off-by: Joe Beda <joe@bedafamily.com>
    jbeda committed with Jul 22, 2010
Commits on Jul 21, 2010
  1. web: Make output follow html4 standard

    Add a doctype to specify which HTML version to use, in our case use the
    HTML4.01 transitional doctype.
    
    Close the second <th> tag so that it doesn't appear as 3 columns.
    
    Add a charset definition in the head of the document.
    
    Signed-off-by: Gabriel Filion <lelutin@gmail.com>
    lelutin committed with Jul 21, 2010
  2. web: Lowercase tags in output

    For stylistic preference, lowercase all tags in the output sent from bup
    web.
    
    Signed-off-by: Gabriel Filion <lelutin@gmail.com>
    lelutin committed with Jul 21, 2010
Commits on Jul 20, 2010
  1. Update tornado to revision ad104ffb41

    The file lib/tornado/escape.py was forcing users to install a json
    library even though "bup web" doesn't use any json functionality.
    
    An issue was opened upstream:
    
    http://github.com/facebook/tornado/issues/closed#issue/114
    
    and the day after it was opened, a fix was committed for it.
    
    Update to the latest revision of tornado so that we can remove a
    dependency on json/simplejson.
    
    Signed-off-by: Gabriel Filion <lelutin@gmail.com>
    lelutin committed with Jul 20, 2010
Commits on Jul 17, 2010
  1. Convert web-cmd to use Tornado.

    Pleasantly, this mostly just involved deleting code, with a few tweaks.
    
    Signed-off-by: Peter McCurdy <petermccurdy@alumni.uwaterloo.ca>
    pmccurdy committed with Jul 17, 2010
  2. Add Tornado framework from git, commit 7a30f9f6

    I just took the tornado/tornado directory, along with the README.
    
    I'm using tornado's git commit 7a30f9f6eac9aa0cf295b078695156776fd050ce,
    since recent versions of Tornado have support for specifying which
    address you want to listen to.
    
    Signed-off-by: Peter McCurdy <petermccurdy@alumni.uwaterloo.ca>
    pmccurdy committed with Jul 17, 2010
Commits on Jul 16, 2010
  1. Added breadcrumb navigation to bup-web.

    Signed-off-by: Zoran Zaric <zz@zoranzaric.de>
    zoranzaric committed with Jul 16, 2010
Commits on Jul 15, 2010
  1. git.py: use close_fds=True when starting git cat-file.

    Otherwise git could inherit some other file descriptors we're using.  This
    is particularly relevant in cmd/web, and particularly when applying
    pmccurdy's patches to use Tornado.
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
    committed Jul 15, 2010
  2. Add docstrings to lib/bup/helpers.py

    Since the split_path function was only used in one place, also move the
    function inside this file (lib/bup/index.py).
    
    Signed-off-by: Gabriel Filion <lelutin@gmail.com>
    lelutin committed with Jul 15, 2010
Commits on Jul 14, 2010
  1. All HTML attribute values should be enclosed by doublequotes.

    Signed-off-by: Zoran Zaric <zz@zoranzaric.de>
    zoranzaric committed with Jul 14, 2010
  2. Closing a UL-tag doesn't make sense here, the TABLE-tag has to be clo…

    …sed.
    
    Signed-off-by: Zoran Zaric <zz@zoranzaric.de>
    zoranzaric committed with Jul 14, 2010
  3. Move t/*.py to lib/bup/t/*.py.

    Since the tests in that directory are all tests of lib/bup/*.py anyway,
    this is a more consistent location for them.
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
    committed Jul 14, 2010
  4. client.py: raising a particular rare exception caused a syntax error.

    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
    committed Jul 14, 2010
  5. Update to latest wvtest.py, wvtest.sh, and wvtestrun from wvtest proj…

    …ect.
    
    Imported from wvtest commit a975b39ddcca5c894e2e2b656b8e28c11af36f47.
    
    Because of changes to wvtest.py's chdir() handling, had to make some slight
    changes to filenames used by the bup tests themselves - all changes for the
    better.
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
    committed Jul 14, 2010
Commits on Jul 13, 2010
  1. cmd/web: print a nicer message if we can't bind the socket.

    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
    committed Jul 13, 2010
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
    places.
    
    Signed-off-by: Joe Beda <joe@bedafamily.com>
    jbeda committed with Jul 11, 2010
  3. options.py: 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 <lostlogic@lostlogicx.com>
    Brandon Low committed with Jul 10, 2010
  4. cmd/split: minor correction to an error message.

    Signed-off-by: Brandon Low <lostlogic@lostlogicx.com>
    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 <apenwarr@gmail.com>
    committed Jul 9, 2010
  2. vfs: File.open() 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 <apenwarr@gmail.com>
    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 <apenwarr@gmail.com>
    committed Jul 7, 2010
  2. README improvement.

    Be more specific about how to update the remote PATH.
    koom committed with Jul 7, 2010