Skip to content
Commits on Feb 7, 2011
  1. Merge branch 'daemon_msg' of git://github.com/leto/bup

    committed Feb 7, 2011
    * 'daemon_msg' of git://github.com/leto/bup:
      Make 'bup daemon' print a message at startup regardless of debug level
Commits on Feb 6, 2011
  1. @lelutin

    options.py: update docstrings and detail optspec

    lelutin committed with Feb 5, 2011
    The docstring on the Options class currently refers to a man page which
    does not exist, and still talks about the now-removed 'exe' parameter.
    Update this to be more accurate.
    
    Add a docstring to OptDict.
    
    Finally, the options.py file brings a concept of option spec string. Its
    construction should be documented. Since we'd like the options.py file
    to be a one-file drop-in so that it can be easily used in other
    projects, let's document the option specs in the module's docstring.
    
    Signed-off-by: Gabriel Filion <lelutin@gmail.com>
Commits on Feb 5, 2011
  1. cmd/memtest: don't die if /proc/self/status is the wrong format.

    committed Feb 4, 2011
    Apparently Solaris has /proc/self/status, but it's binary and so our
    Linux-centric parser couldn't handle it.  The data we're getting from it is
    non-critical, so just ignore the parse error and let the high-level code in
    report() deal with it.
    
    Reported by henning mueller, diagnosed by Gabriel Filion.  Thanks guys!
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
  2. @leto
Commits on Feb 4, 2011
  1. client.py: replace a never-used GitError with a ClientError.

    committed Feb 4, 2011
    Nobody ever tried calling that function, so it's really just an assertion
    that never triggered.  Which is good, because it was trying to throw an
    exception that wasn't available in the current namespace.
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Commits on Feb 3, 2011
  1. DemuxConn.__init__: you can't assume the *last* 6 bytes are BUPMUX.

    committed Feb 3, 2011
    The actual muxed data might arrive immediately after it, and since we're not
    buffering that, we have to read one byte at a time.
    
    (Buffering would be more efficient if we expected this to happen frequently,
    but it shouldn't.)
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
  2. DemuxConn.__init__: abort the loop if read() returns EOF.

    committed Feb 3, 2011
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
  3. helpers.py: always use two blank lines between functions/classes.

    committed Feb 3, 2011
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
  4. client.py: avoid an exception when no new remote packs were generated.

    committed Feb 3, 2011
    This is probably pretty rare, but it can happen if you needed to download a
    remote index, and that index had *all* your objects, so we did end up
    writing some objects to the remote server, but it didn't end up generating
    any packs.  If that happened, we would try to return the contents of a
    nonexistent variable.
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
  5. Fix documentation for `bup daemon`

    Brandon Low committed with Feb 2, 2011
    Signed-off-by: Brandon Low <lostlogic@lostlogicx.com>
Commits on Feb 1, 2011
  1. runtests: Apparently $(wildcard) in make doesn't always sort its output.

    committed Feb 1, 2011
    This meant that on Solaris, tests would be run in a different order, so that
    BUP_MAIN_EXTRA (set in tclient.py) wouldn't be set the same as on Linux.
    
    In this case, we know the wildcard will always match something anyway, so we
    might as well just let the shell expand it out rather than asking make to do
    it.
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
  2. cmd/help: earlier path.exedir() change made it not find manpages corr…

    committed Feb 1, 2011
    …ectly.
    
    ...when the binary wasn't actually installed.  Previously, it would use
    sys.argv[0], which was the path to bup-help, but now it uses path.exedir(),
    which has the path to bup, which is one directory up.
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
  3. Merge branch 'mux'

    committed Feb 1, 2011
    * mux:
      If you specified the port number on the command line, convert it to an int.
      Add `bup daemon` command for simple socket server
      Add DemuxConn and `bup mux` for client-server
  4. If you specified the port number on the command line, convert it to a…

    committed Jan 31, 2011
    …n int.
    
    This gets rid of an exception.
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
  5. Add `bup daemon` command for simple socket server

    Brandon Low committed with Jan 26, 2011
    Nothing special here, just listens on a host:port combination and spawns
    `bup mux server` instances.
    
    Signed-off-by: Brandon Low <lostlogic@lostlogicx.com>
  6. Add DemuxConn and `bup mux` for client-server

    Brandon Low committed with Jan 26, 2011
    `bup mux` works with any bup command to multiplex its stdout and stderr
    streams over a single stdout stream.
    
    DemuxConn works on the client side to demultiplex stderr and data
    streams from a single stream, emulating a simple connection.
    
    For now, these are only used in the case of simple socket bup://
    client-server connections, because rsh and local connections don't need
    them.
    
    Signed-off-by: Brandon Low <lostlogic@lostlogicx.com>
  7. @lelutin

    t/test.sh: Fix a test for 'split' on solaris

    lelutin committed with Jan 28, 2011
    When looking at output from a test run on Solaris, one test in the
    'split' suite showed up as OK but was actually showing a diff
    invocation error.
    
    The -q argument (for quiet) does not exist on the version of diff that
    is installed on Solaris. Since wvtest intercepts output from tested
    commands, the -q argument is actually not needed. Remove the argument in
    order to make the test execute correctly under all operating systems
    that were tested thus far.
    
    Signed-off-by: Gabriel Filion <lelutin@gmail.com>
Commits on Jan 26, 2011
  1. Give main.py the a --profile option

    Brandon Low committed with Jan 25, 2011
    This is just a convenience for anyone who is interested in seeing where
    CPU seconds are going.
    
    Signed-off-by: Brandon Low <lostlogic@lostlogicx.com>
  2. options.py: generate usage string correctly for no-* options.

    committed Jan 25, 2011
    (copied from the sshuttle project)
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
  3. options.py: don't die if tty width is set to 0.

    committed Jan 22, 2011
    This sometimes happens if weird people, such as myself, open a pty without
    setting the width field correctly.
    
    (copied from the sshuttle project)
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
  4. Combine and speed up idx->midx and bupindex merge

    Brandon Low committed with Jan 23, 2011
    These two processes used almost identical algorithms, but were
    implemented separately.  The main difference was one was ascending and
    the other was descending.
    
    This patch reverses the cmp on index.Entry so that both can share an
    algorithm.
    
    It also cuts some overhead in the algorithm by using it.next() instead of
    the next() wrapper, yielding a ~6% speedup on midx generation and index merging.
    
    Signed-off-by: Brandon Low <lostlogic@lostlogicx.com>
  5. Minorly fix outbytes calculation in client

    Brandon Low committed with Jan 22, 2011
    Signed-off-by: Brandon Low <lostlogic@lostlogicx.com>
  6. Use os.path rather than '/' logic in wvtest

    Brandon Low committed with Jan 22, 2011
    Signed-off-by: Brandon Low <lostlogic@lostlogicx.com>
  7. Handle $BUP_MAIN_EXE more carefully.

    committed Jan 25, 2011
    In some cases, we might have been using sys.argv[0] *after* doing a chdir(),
    which doesn't work reliably since argv[0] might be a relative path.
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
  8. auto_midx(): report args when failing to call a subprocess.

    committed Jan 25, 2011
    The exception from subprocess.call() doesn't report the path it tried to use
    when it prints the "No such file or directory" error, which isn't helpful
    when trying to debug problems.
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
  9. Henning Mueller reports that bup works on Solaris now.

    committed Jan 25, 2011
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
  10. lib/bup/drecurse.py: work even if O_NOFOLLOW is missing.

    committed Jan 25, 2011
    It's non-critical and appears to be missing on Solaris.  Thanks to Henning
    Mueller for reporting the problem.
    
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Commits on Jan 18, 2011
  1. @lelutin

    options: remove unused 'exe' parameter

    lelutin committed with Jan 16, 2011
    The 'exe' parameter was added in the hope of using it for additional
    contextual information in the help text that Options generates. It was
    till then abandoned and was judged as superflous information.
    
    Remove the 'exe' parameter from Options' constructor.
    
    Signed-off-by: Gabriel Filion <lelutin@gmail.com>
  2. save: handle backup write errors properly

    Brandon Low committed with Jan 11, 2011
    bup-save was catching all IOErrors and treating them as data-read
    failures, but some of them could be backup-write errors.  Have git.py
    and client.py raise distinctive errors when pack write raises IOError.
    
    Signed-off-by: Brandon Low <lostlogic@lostlogicx.com>
  3. Fix test by forcing order

    Brandon Low committed with Jan 11, 2011
    Signed-off-by: Brandon Low <lostlogic@lostlogicx.com>
  4. Remove seemingly unnecessary abspath() call from the previous patch.

    committed Jan 18, 2011
    Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
  5. FreeBSD + os.mknod => broken, open().close()

    Brandon Low committed with Jan 11, 2011
    Signed-off-by: Brandon Low <lostlogic@lostlogicx.com>
  6. @lelutin

    cmd/init: don't spit out a traceback on init error

    lelutin committed with Jan 16, 2011
    When an error occurs during repository creation, 'bup init' currently
    lets GitError exceptions leak out, printing a backtrace to unsuspecting
    users in the process.
    
    Intercept GitError exceptions that come out of git.init_repo() and print
    out the message that it contains in a more friendly manner.
    
    Signed-off-by: Gabriel Filion <lelutin@gmail.com>
  7. @lelutin

    git.py: error when repo's parent dir absent

    lelutin committed with Jan 16, 2011
    Currently, when you try to initialize a bup repository inside an
    unexistant directory (e.g. BUP_DIR=some_dir/bup_repo, and some_dir does
    not exist), bup has to call "git init" to then obtain an error code
    which is not very significant to users.
    
    Add a check for the existence of the repository's parent directory and
    throw an exception with a more meaningful error message when that
    happens.
    
    Signed-off-by: Gabriel Filion <lelutin@gmail.com>
Commits on Jan 10, 2011
  1. @zoranzaric

    Fix typo in documentation for strip_base_path

    zoranzaric committed with Jan 8, 2011
    Signed-off-by: Zoran Zaric <zz@zoranzaric.de>
Something went wrong with that request. Please try again.