]> arthur.barton.de Git - bup.git/log
bup.git
9 years agoAdd lib/bup/t/foo to .gitignore file gitignore-fixes
Alexander Barton [Mon, 29 Dec 2014 22:37:45 +0000 (23:37 +0100)]
Add lib/bup/t/foo to .gitignore file

Signed-off-by: Alexander Barton <alex@barton.de>
9 years agoCall add_error() with one arg on readlink failure
Gabriel Filion [Thu, 20 Nov 2014 22:07:11 +0000 (17:07 -0500)]
Call add_error() with one arg on readlink failure

...instead of two.

This bug and its solution was found by Ben Kelly.

Signed-off-by: Gabriel Filion <gabster@lelutin.ca>
[rlb@defaultvalue.org: adjust commit message]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
9 years agoindex: Correct inconsitency in documentation of modes
Gabriel Filion [Wed, 19 Nov 2014 17:30:07 +0000 (12:30 -0500)]
index: Correct inconsitency in documentation of modes

In the optspec, --clear and --check are documented as being modes, but
in the man page they are simple options.

Also, even though --clear and --check are listed as modes in the
optspec, they don't appear in the synopsis line.

According to the code, --clear and --check do behave as modes so we
should be consistent in how we document them.

Signed-off-by: Gabriel Filion <gabster@lelutin.ca>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agoCorrect claim about number of packs per backup
Gabriel Filion [Mon, 17 Nov 2014 17:24:50 +0000 (12:24 -0500)]
Correct claim about number of packs per backup

The current sentence implies that there is only one pack file per backup
run, which is not necessarily correct.

Because of the "constants" max_pack_size and max_pack_objects that are
used as limits to pack sizes, we may end up with more than one pack per
backup if there is a lot of data that needs to be stored.

Signed-off-by: Gabriel Filion <gabster@lelutin.ca>
[rlb@defaultvalue.org: adjust commit summary]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
9 years agotag: remove docstring about unexistant feature
Gabriel Filion [Mon, 17 Nov 2014 17:24:49 +0000 (12:24 -0500)]
tag: remove docstring about unexistant feature

This was the intention for first creating the subcommand but since we
still don't have a means of removing old data, this docstring is talking
about a ghost.

I'll remember to push for that use case when we implement data removal.

Signed-off-by: Gabriel Filion <gabster@lelutin.ca>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
9 years agotag-cmd.py: fix -f placement in delete synopsis
Gabriel Filion [Sat, 15 Nov 2014 22:06:11 +0000 (17:06 -0500)]
tag-cmd.py: fix -f placement in delete synopsis

The -d option is the one that should take the <tag name> argument,
whereas the -f option has no argument.

With better ordering in the synopis, this is less misleading.

Signed-off-by: Gabriel Filion <gabster@lelutin.ca>
[rlb@defaultvalue.org: adjust commit summary]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
9 years agotag-cmd.py: rephrase -f summary in optspec
Gabriel Filion [Sat, 15 Nov 2014 22:06:10 +0000 (17:06 -0500)]
tag-cmd.py: rephrase -f summary in optspec

The current summary for the -f option is rather unclear: it says that it
will delete a tag that doesn't exist, but will happily delete the tag,
too, if it exists.

Signed-off-by: Gabriel Filion <gabster@lelutin.ca>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
9 years agotag-cmd.py: use git update-ref to delete tags
Gabriel Filion [Sat, 15 Nov 2014 22:06:08 +0000 (17:06 -0500)]
tag-cmd.py: use git update-ref to delete tags

Sometimes tags can be elsewhere than in the refs/tags/ directory. This
can happen if git pack-refs --all was used.

The current code chokes on such a situation. Since git update-ref
already knows about this subtlety, let it handle the deletion.

Signed-off-by: Gabriel Filion <gabster@lelutin.ca>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agomux: support wrapping arbitrary commands
Rob Browning [Tue, 11 Nov 2014 18:09:04 +0000 (12:09 -0600)]
mux: support wrapping arbitrary commands

Don't just support bup commands; allow arbitrary commands as arguments,
i.e. instead of

  bup mux BUP_SUBCOMMAND ...

support

  bup mux COMMAND ...

i.e.

  bup mux tar cvf ...

Reviewed-by: Gabriel Filion <gabster@lelutin.ca>
[rlb@defaultvalue.org: rebased to master; removed not yet applicable
 on--server-cmd.py changes]
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agotest-on.sh: exit only once on source failure
Rob Browning [Wed, 12 Nov 2014 18:34:50 +0000 (12:34 -0600)]
test-on.sh: exit only once on source failure

Thanks to Gabriel Filion for pointing out the oversight.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agoTest for load failures in t/test-*.sh
Rob Browning [Mon, 10 Nov 2014 03:50:02 +0000 (21:50 -0600)]
Test for load failures in t/test-*.sh

i.e.

  . foo || exit $?

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agogit.py: generalize update_ref() to support tags in addition to heads
Rob Browning [Sun, 23 Mar 2014 18:10:01 +0000 (13:10 -0500)]
git.py: generalize update_ref() to support tags in addition to heads

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agogit.py: allow the specification of a repo_dir to update_ref()
Rob Browning [Sun, 23 Mar 2014 18:07:25 +0000 (13:07 -0500)]
git.py: allow the specification of a repo_dir to update_ref()

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agoAllow the specification of a repo_dir to some VFS and git operations
Rob Browning [Wed, 22 Jan 2014 18:55:16 +0000 (12:55 -0600)]
Allow the specification of a repo_dir to some VFS and git operations

Previously, these VFS and git operations would only operate on the
default repository (git.repo()).

Have vfs.cp() handle more than one repository (via an internal cache).

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agoAllow per-instance specification of the repo_dir for CatPipe
Rob Browning [Tue, 21 Jan 2014 23:31:13 +0000 (17:31 -0600)]
Allow per-instance specification of the repo_dir for CatPipe

This allows the creation of CatPipes that refer to repositories other
than the default, which in turn allows copying between repositories,
etc.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agotest-meta.sh: add missing "$() || exit $?" tests
Rob Browning [Tue, 14 Oct 2014 20:40:06 +0000 (15:40 -0500)]
test-meta.sh: add missing "$() || exit $?" tests

Their omission was masking bugs fixed in several of the previous
commits.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agoChange incorrect unknown-owners references
Rob Browning [Tue, 14 Oct 2014 20:28:59 +0000 (15:28 -0500)]
Change incorrect unknown-owners references

The test program is actually called unknown-owner (t/unknown-owner).

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agotest-meta.sh: escape user/group expressions
Rob Browning [Tue, 14 Oct 2014 17:20:14 +0000 (12:20 -0500)]
test-meta.sh: escape user/group expressions

Escape external user/group strings before passing them to 'grep -E',
otherwise calls like this will fail when the string includes regular
expression metacharacters:

Thanks to Pierre-Emmanuel Novac <piernov@gmail.com> for reporting the
problem.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agotest-meta.sh: finish renaming variables
Rob Browning [Tue, 14 Oct 2014 17:22:51 +0000 (12:22 -0500)]
test-meta.sh: finish renaming variables

Apparently the changes started here weren't completely finished;
finish them:

  b836113e503ab3f8e3c30c3283eb59f936fb0023

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agotest-cat-file.sh: handle hashsplit bupm files
Rob Browning [Fri, 17 Oct 2014 15:44:24 +0000 (10:44 -0500)]
test-cat-file.sh: handle hashsplit bupm files

A bit back we started allowing .bupm files to be hashsplit:

  ee777400cf624b4f7a24b15614c2b6c745560dcb

So add t/git-cat-tree and use it in test-cat-file.sh to prevent the
test from crashing whenever the bupm is a tree.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agoAdd support for "restore --sparse"
Rob Browning [Thu, 16 Jan 2014 00:39:09 +0000 (18:39 -0600)]
Add support for "restore --sparse"

Thanks to Patrick Rouleau <prouleau72@gmail.com> for spotting a
serious potential short-write problem in an earlier revision of this
work, and suggesting other improvements.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agosave: catch and log SSH errors
Gabriel Filion [Thu, 4 Sep 2014 06:53:14 +0000 (02:53 -0400)]
save: catch and log SSH errors

Currently, if the ssh connection to the remote server fails, we get the
server errors, then an ugly traceback that ends up saying "look at the
errors above". It makes it look like the traceback is part of the errors
that we need to look at, when in reality it's just an exception that's
not handled correctly by bup-save.

Signed-off-by: Gabriel Filion <gabster@lelutin.ca>
[rlb@defaultvalue.org: adjust commit summary]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agoFix typo in atomically_replaced_file docstring
Rob Browning [Fri, 29 Aug 2014 20:32:21 +0000 (15:32 -0500)]
Fix typo in atomically_replaced_file docstring

Thanks to Gabriel Filion <gabster@lelutin.ca> for pointing out the
problem.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agoAssume FS_IOC_GETFLAGS may trash output on error
Mark J Hewitt [Mon, 11 Aug 2014 10:36:19 +0000 (11:36 +0100)]
Assume FS_IOC_GETFLAGS may trash output on error

Don't assert that the attr value is reasonable (<= UINT_MAX) when
FS_IOC_GETFLAGS returns an error, because it may change the the value
to something invalid in that situation.

This has been observed to occur when, for example, the underlying
filesystem does not support the operation,

Signed-off-by: Mark J Hewitt <m.hewitt@computer.org>
[rlb@defaultvalue.org: adjust commit message]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agoHandle kernel/FUSE disagreement over Linux attrs
Rob Browning [Tue, 29 Jul 2014 20:35:07 +0000 (15:35 -0500)]
Handle kernel/FUSE disagreement over Linux attrs

Use long for the Linux attr type, so that it should work on all
little-endian systems, across both normal and FUSE-backed filesystems.

Disable Linux attr support for now on big-endian systems where
sizeof(long) > sizeof(int).  See the changes to bup-index.md and
_helpers.c for more information.

Eventually, we may want to add an argument to allow re-enabling
support on affected systems, when the user can guarantee a homogeneous
filesystem type -- or better yet, the kernel and FUSE will finally
sort out their issues.

Thanks to Tilo Schwarz <mail@tilo-schwarz.de> and daryl5@arcor.de for
reporting and pursuing the problems that lead to this patch.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agoOnly silence ENOENT in helpers.unlink
Nathan Bird [Fri, 8 Aug 2014 16:59:20 +0000 (09:59 -0700)]
Only silence ENOENT in helpers.unlink

This is what it is documented as doing and what makes sense in this
case.

Signed-off-by: Nathan Bird <ecthellion@gmail.com>
[rlb@defaultvalue.org: adjust commit message]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agoatomically_replaced_file: ensure error leaves original
Rob Browning [Wed, 6 Aug 2014 02:01:08 +0000 (21:01 -0500)]
atomically_replaced_file: ensure error leaves original

Make sure an exception inside the body leaves the original file
content.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agoMerge work on atomic writes
Rob Browning [Tue, 5 Aug 2014 17:41:49 +0000 (12:41 -0500)]
Merge work on atomic writes

9 years agothelpers.py: use t/tmp as the tmpdir parent
Rob Browning [Tue, 5 Aug 2014 17:33:43 +0000 (12:33 -0500)]
thelpers.py: use t/tmp as the tmpdir parent

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agoAdjust atomically_replaced_file documentation.
Rob Browning [Tue, 5 Aug 2014 17:29:31 +0000 (12:29 -0500)]
Adjust atomically_replaced_file documentation.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agoAdd atomically_replaced_file for safer output
Nathan Bird [Thu, 17 Jul 2014 22:27:40 +0000 (18:27 -0400)]
Add atomically_replaced_file for safer output

Use `tempfile.mkstemp` to write files safely and then rename them
atomically to the target filename at the end. This guarantees that two
concurrent processes trying to write the same target file will result
in one process "winning" with a consistent version.

Use this to protect:
 * midx writing
 * .idx cache writing

Previously both of these processes `open(destination + '.tmp', 'w')`
which would lead to concurrent processes writing the same tmp file at
the same time.

See also https://groups.google.com/d/msg/bup-list/qdPUaXGO1cI/g8K2aFaaXz0J

Signed-off-by: Nathan Bird <ecthellion@gmail.com>
[rlb@defaultvalue.org: adjust commit message]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agotest-fuse.sh: make ls output locale independent
Tim Riemenschneider [Wed, 30 Jul 2014 18:39:47 +0000 (20:39 +0200)]
test-fuse.sh: make ls output locale independent

Call "ls" with LC_ALL set to "C".

(Otherwise it reports "total" for English, "insgesamt" for German;
other locales would be similar.)

Signed-off-by: Tim Riemenschneider <git@tim-riemenschneider.de>
[rlb@defaultvalue.org: adjust commit message]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agoOmit htonll when already #defined
R. Andrew Ohana [Tue, 29 Jul 2014 20:38:49 +0000 (13:38 -0700)]
Omit htonll when already #defined

OS X 10.10 Yosemite defines it as a macro.

Signed-off-by: R. Andrew Ohana <andrew.ohana@gmail.com>
[rlb@defaultvalue.org: adjust comments; adjust commit message]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agoCorrect author for 497505901824dd7382d1d80e152f6b6d810a2844
Nick Alcock [Sun, 20 Jul 2014 22:52:05 +0000 (17:52 -0500)]
Correct author for 497505901824dd7382d1d80e152f6b6d810a2844

The author for 497505901824dd7382d1d80e152f6b6d810a2844 was incorrect.
It should have been "Nick Alcock <nick.alcock@oracle.com>", matching
the Signed-off-by.

[rlb@defaultvalue.org: add correction on behalf of author]

9 years agoJust log when skipping a large file during save
Nix [Sat, 19 Jul 2014 22:01:58 +0000 (23:01 +0100)]
Just log when skipping a large file during save

If bup-save --smaller= is specified, the user *expects* large files
to be skipped.  Having bup report errors and return exitcode 1 in this
case hides real errors.  Instead, log it when running verbosely, but
not otherwise.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
[rlb@defaultvalue.org: adjust commit summary; simplify opt.verbose >= 1
 to opt.verbose]
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agoFix HEAD request handling in bup-web
Will Rouesnel [Thu, 12 Jun 2014 17:58:49 +0000 (03:58 +1000)]
Fix HEAD request handling in bup-web

HEAD requests to files did not set self.finished(). This causes problems
with user-agents that expect some type of request since it never closes
(OpenOffice/LibreOffice will notably stall opening files from a URL).

This patch stands alone from WebDAV but also fixes the problem there.

The problem can be demonstrated like this:

    bup web
    curl -I 'http://127.0.0.1:8080/some/file'

Signed-off-by: Will Rouesnel <w.rouesnel@gmail.com>
[rlb@defaultvalue.org: adjust commit message]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agotest-fuse.sh: use invariant test data
Rob Browning [Tue, 15 Jul 2014 15:44:18 +0000 (10:44 -0500)]
test-fuse.sh: use invariant test data

Thanks to Tim Riemenschneider <t.riemenschneider@detco.de> for
reporting the problem.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agoHACKING: update to reflect 0.26 release 0.26
Rob Browning [Tue, 8 Jul 2014 19:25:40 +0000 (14:25 -0500)]
HACKING: update to reflect 0.26 release

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agotest-fuse.sh: set TZ=UTC for ls dates
Rob Browning [Sun, 6 Jul 2014 18:26:45 +0000 (13:26 -0500)]
test-fuse.sh: set TZ=UTC for ls dates

Thanks to Mark J Hewitt <mjh@idnet.com> and Scott Sugar
<scottsugar@outlook.com> for reporting the problem, and Patrick
Rouleau <prouleau72@gmail.com> for helping test the solution.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agoAvoid uid/gid 0 metadata tests when ids don't exist 0.26-rc2
Patrick Rouleau [Thu, 3 Jul 2014 00:58:39 +0000 (20:58 -0400)]
Avoid uid/gid 0 metadata tests when ids don't exist

Cygwin may not have a 0 uid/gid, so skip the relevant tests whenever
it doesn't.

We have to explicitly exclude the gid 0 from other_group, because
/etc/group may define a group named root with the same id as
Administrators. We cannot use "root" instead of 0, because root may
not be defined.

Cygwin users: If you want to define the root group, add this line
at the begining of /etc/group:
  root:S-1-5-32-544:0:

Signed-off-by: Patrick Rouleau <prouleau72@gmail.com>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agotest-meta.sh: use user's uid/gid, not 0
Patrick Rouleau [Thu, 3 Jul 2014 00:58:38 +0000 (20:58 -0400)]
test-meta.sh: use user's uid/gid, not 0

Cygwin does not fully support uid and gid of 0. Instead, use the
current user's ids to avoid portability problems. Since this test is
not run for ordinary users, the result is the same.

Signed-off-by: Patrick Rouleau <prouleau72@gmail.com>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agoformat-subst.pl: check for subcommand failure
Rob Browning [Mon, 30 Jun 2014 19:11:10 +0000 (14:11 -0500)]
format-subst.pl: check for subcommand failure

Thanks to karl.richter722@gmail.com for reporting the problem.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agoparse_excludes: drop empty --exclude-from paths
Rob Browning [Mon, 30 Jun 2014 18:33:05 +0000 (13:33 -0500)]
parse_excludes: drop empty --exclude-from paths

Empty paths shouldn't match during drecurse, but there's no point in
including them.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agoIgnore empty lines in --exclude-rx-from files
Rob Browning [Mon, 30 Jun 2014 18:15:58 +0000 (13:15 -0500)]
Ignore empty lines in --exclude-rx-from files

Thanks to Daniel Hahler Daniel Hahler <git@thequod.de> for suggesting
the change.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agosave-cmd.py: don't test for meta index via access()
Rob Browning [Sat, 28 Jun 2014 18:59:19 +0000 (13:59 -0500)]
save-cmd.py: don't test for meta index via access()

Instead just try to open the metadata index and catch any EACCES.
There may be an issue with access on Cygwin
(http://bugs.python.org/issue2528), and even if not, this approach
removes a potential race between access() and open().

Thanks to Mark J Hewitt <mjh@idnet.com> for reporting the problem and
helping track down the cause.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agoInitialize _file in MetaStoreReader before open
Rob Browning [Sat, 28 Jun 2014 18:58:01 +0000 (13:58 -0500)]
Initialize _file in MetaStoreReader before open

So that __del__() will work properly if open fails.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
9 years agoAvoid using incomplete utimensat implementations.
Greg Troxel [Tue, 3 Jun 2014 14:59:56 +0000 (10:59 -0400)]
Avoid using incomplete utimensat implementations.

At least NetBSD 6 has partial support for utimensat, implementing the
function but not providing needed definitions via sys/stat.h as POSIX
requires.  Check for needed defines, and if missing, undefine
HAVE_UTIMENSAT.

Signed-Off-By: Greg Troxel <gdt@ir.bbn.com>
Tested-By: Greg Troxel <gdt@ir.bbn.com>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
9 years agoweb-cmd.py: open browser from ioloop callback
Rob Browning [Fri, 6 Jun 2014 01:59:24 +0000 (20:59 -0500)]
web-cmd.py: open browser from ioloop callback

Assuming the callback won't be called until tornado is ready to
receive requests.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agoweb-cmd.py: add --browser option to open the site
Holger Dell [Thu, 5 Jun 2014 23:04:10 +0000 (18:04 -0500)]
web-cmd.py: add --browser option to open the site

Signed-off-by: Holger Dell <github@holgerdell.com>
[rlb@defaultvalue.org: adjust commit message]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
9 years agofuse-cmd.py: given --meta, report original metadata
Rob Browning [Fri, 30 May 2014 02:54:49 +0000 (21:54 -0500)]
fuse-cmd.py: given --meta, report original metadata

Add a new --meta option to "bup fuse", and when specified, report the
original mode, uid, gid, atime, mtime, and ctime for the mounted
paths.

Since negative timestamps cause access errors, and cause "ls -l" to
report question marks for the stat values, set a floor of 0 for all
timestamps reported to python-fuse.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agoMakefile: add missing t/test-save-creates-no-unrefs.sh
Holger Dell [Wed, 4 Jun 2014 05:16:43 +0000 (00:16 -0500)]
Makefile: add missing t/test-save-creates-no-unrefs.sh

Signed-off-by: Holger Dell <github@holgerdell.com>
[rlb@defaultvalue.org: adjust commit summary]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
9 years agomangle_path: verify chunked name refers to git dir
Holger Dell [Wed, 4 Jun 2014 05:16:47 +0000 (00:16 -0500)]
mangle_path: verify chunked name refers to git dir

Before returning the mangled name.bup for a chunked item, ensure that
the name really does refer to a dir in the git tree via asssert.

Signed-off-by: Holger Dell <github@holgerdell.com>
[rlb@defaultvalue.org: adjust commit message]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
9 years agogit.py: fix minor typos in comments
Holger Dell [Wed, 4 Jun 2014 05:16:46 +0000 (00:16 -0500)]
git.py: fix minor typos in comments

Signed-off-by: Holger Dell <github@holgerdell.com>
[rlb@defaultvalue.org: adjust commit summary]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
9 years agoimport-rdiff-backup-cmd: invoke mktemp more portably
Rob Browning [Mon, 2 Jun 2014 16:36:27 +0000 (11:36 -0500)]
import-rdiff-backup-cmd: invoke mktemp more portably

This should fix a problem on NetBSD 6, reported by Greg Troxel
<gdt@lexort.com>.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Greg Troxel <gdt@lexort.com>
Tested-by: Greg Troxel <gdt@lexort.com>
9 years agoUS/Central is not a common timezone, use America/Chicago
Brandon Smith [Fri, 30 May 2014 21:34:56 +0000 (14:34 -0700)]
US/Central is not a common timezone, use America/Chicago

Signed-off-by: Brandon Smith <freedom@reardencode.com>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
9 years agot/force-delete: bash is not always at /bin/bash
Brandon Smith [Fri, 30 May 2014 21:34:55 +0000 (14:34 -0700)]
t/force-delete: bash is not always at /bin/bash

Signed-off-by: Brandon Smith <freedom@reardencode.com>
[rlb@defaultvalue.org: adjust commit message]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
9 years agoMerge fixes for orphaned midx files on Cygwin
Rob Browning [Wed, 28 May 2014 16:55:37 +0000 (11:55 -0500)]
Merge fixes for orphaned midx files on Cygwin

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agoKeep PackMidx pointers until finished with mmap
Rob Browning [Thu, 22 May 2014 19:12:54 +0000 (14:12 -0500)]
Keep PackMidx pointers until finished with mmap

Now that PackMidx objects close their mmap, don't drop the pointers to
them in midx-cmd.py until finished with the mmaps.

The isinstance() call may need revisiting later.  i.e. should all
indexes support close()?

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agomidx: close the mmap before erasing an midx file
Patrick Rouleau [Thu, 22 May 2014 03:36:27 +0000 (23:36 -0400)]
midx: close the mmap before erasing an midx file

Linux allows erasing a file even if it is still memory mapped, but
Windows does not. However, Cygwin tries to emulate Linux and, under
certain conditions, it silently moves the file to $RECYCLED.BIN/, but
not in a way where Windows takes care of it when we use the "empty the
recycled bin" command. The erased midx ends up comsuming more and more
disk space.

To solve this, we have to close the midx's mmap before erasing
the midx.

Cygwin users: you can use this command to clean up your
$RECYCLE.BIN/ directories:
find /cygdrive/?/\$RECYCLE.BIN/ -name "\.???[[:xdigit:]]*" -print -delete

Signed-off-by: Patrick Rouleau <prouleau72@gmail.com>
[rlb@defaultvalue.org: adjust commit message]

9 years agoDon't call _mksubs() in VFS Node nlink()
Rob Browning [Fri, 23 May 2014 22:02:11 +0000 (17:02 -0500)]
Don't call _mksubs() in VFS Node nlink()

The VFS Node nlink() code calls _mksubs(), but then just returns 1.
It looks like that may be unnecessary work, so stop doing it.

Thanks to William Stein <wstein@gmail.com> for pointing it out.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agoUse CatPipe, not show, in git_commit_dates()
Rob Browning [Sun, 18 May 2014 05:51:34 +0000 (00:51 -0500)]
Use CatPipe, not show, in git_commit_dates()

Import the commit parser from the experimental bup-get branch and use
it along with CatPipe to produce the git commit dates in
git_commit_dates().

This appears to resolve the performance problem with real archives
that was introduced by the use of "git show -s --pretty=format:%ct
..." (cf. 00ba9fb811e71bb6182b9379461bc6b493e3b7a4), and is still much
faster than 0.25 for at least a 1000 branch synthetic repository here.

Thanks to Gabriel Filion <gabster@lelutin.ca> for reporting the
problem, and to him and Patrick Rouleau <prouleau72@gmail.com> for
helping test the solution.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agoMove VFS cp() to git.py; handle repodir changes
Rob Browning [Wed, 21 May 2014 02:40:51 +0000 (21:40 -0500)]
Move VFS cp() to git.py; handle repodir changes

Move the VFS's cp() to git.py and reset the cp() CatPipe whenever the
global repodir changes.

Previously, if two different lib/bup/t/ tests (for example) needed to
use two different repositories, and both happened to indirectly call
cp(), the second test would end up with a CatPipe() connected to the
wrong repository.

In the longer run, we may want to consider further cleanup here, but
this should fix the immediate problem without too much risk.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agoFix git_commit_dates() to handle (obvious) duplicates
Rob Browning [Sat, 17 May 2014 20:34:32 +0000 (15:34 -0500)]
Fix git_commit_dates() to handle (obvious) duplicates

Since git show will suppress duplicate results, change
git_commit_dates() to detect that situation and repair the damage.

Though currently, it can only handle cases where the duplicates are
obvious, i.e. have the same exact string in the argument list.  It
won't be able to handle cases where two arguments differ, but resolve
to the same underlying hash.  For our current purposes, that should be
fine since we only pass in hashes.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agoInitialize MetaStoreWriter self._file to None
Rob Browning [Wed, 14 May 2014 17:01:10 +0000 (12:01 -0500)]
Initialize MetaStoreWriter self._file to None

Without this, if something goes wrong in the constructor self._file
may not be initialized, which causes close(), invoked via __del__(),
to crash.

Thanks to Fabian Bakkum <fabianbakkum@hotmail.com> for reporting the
problem.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agoRe-allow backup set names containing "/"
Rob Browning [Wed, 14 May 2014 15:24:00 +0000 (10:24 -0500)]
Re-allow backup set names containing "/"

Revert the prohibition because all releases up to now have allowed
"/", and so that's nothing new.  Disabling "/" in 0.26 would be a
regression, and one we're not ready to commit to -- in fact, we may
eventually do the opposite, and add comprehensive support for "/".

This reverts commit 52a98179490c6ccb990e221bbdeb511f1de59de4.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agoMove unshared version code from helpers to version-cmd.py 0.26-rc1
Gabriel Filion [Sat, 10 May 2014 22:45:37 +0000 (18:45 -0400)]
Move unshared version code from helpers to version-cmd.py

While this is relatively "harmless", the import * directive brings in a
whole lot of unused code into the version subcommand.

At the same time, the three version_* functions are only used in the
version subcommand, so their place inside helpers.py is unjustified. The
same goes for the _version module.

Signed-off-by: Gabriel Filion <gabster@lelutin.ca>
[rlb@defaultvalue.org: adjust commit message]
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agoReturn integers, not strings from get_commit_dates()
Rob Browning [Wed, 30 Apr 2014 01:16:54 +0000 (20:16 -0500)]
Return integers, not strings from get_commit_dates()

Returning strings broke bup fuse (surprising that it worked
elsewhere), and since we have no fuse tests, it wasn't immediately
apparent.

So fix the bug and add some initial (trivial) fuse tests so that at
least this particular problem doesn't happen again.

To cleanup after the fuse tests, detect fuse mounts in
t/cleanup-mounts-under, and try to unmount them.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agoAlways line-buffer bup restore stdout
Simon Persson [Sun, 11 May 2014 09:06:34 +0000 (17:06 +0800)]
Always line-buffer bup restore stdout

Flush stdout after every line, even when stdio is not a tty, to
provide more regular progress information.  Useful for progress
monitoring by a parent process or when watching a logfile with "tail".

Signed-off-by: Simon Persson <simonpersson1@gmail.com>
[rlb@defaultvalue.org: adjust commit message]
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agoFind SC_ARG_MAX via C sysconf().
Rob Browning [Sat, 10 May 2014 23:02:52 +0000 (18:02 -0500)]
Find SC_ARG_MAX via C sysconf().

Apparently os.sysconf('SC_ARG_MAX') returns -1, even in some common
cases.

Thanks to Alexander Barton <alex@barton.de> for reporting that at
least when run under make 3.81, os.sysconf('SC_ARG_MAX') was just
returning -1.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agoRead ARG_MAX directly via os.sysconf('SC_ARG_MAX').
Rob Browning [Sat, 10 May 2014 20:51:38 +0000 (15:51 -0500)]
Read ARG_MAX directly via os.sysconf('SC_ARG_MAX').

For now, this code also adds an optional arg_max parameter to
batchpipe(), exclusively for testing.

There appears to be an issue with wvtest at the moment that causes
assignments to something like helpers.arg_max to have no effect from
the importers perspective.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agoRevert "Write the system ARG_MAX to an autogenerated config.py..."
Rob Browning [Sat, 10 May 2014 18:23:00 +0000 (13:23 -0500)]
Revert "Write the system ARG_MAX to an autogenerated config.py..."

Prepare to try a more direct approach.

This reverts commit b72365ad597edbc528da5b93528fc3a67a18d58e.

9 years agoRetrieve the dates for all branches with one bulk git call in the VFS.
Rob Browning [Thu, 8 May 2014 19:01:57 +0000 (14:01 -0500)]
Retrieve the dates for all branches with one bulk git call in the VFS.

Instead of calling "git rev-list" once per branch to get the branch
tip dates for the VFS branch list, make a single call to "git show"
using a suitable pretty format, and pass all the branch refs as
arguments.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agoAdd a batchpipe() command to helpers that behaves somewhat like xargs(1).
Rob Browning [Thu, 8 May 2014 18:52:25 +0000 (13:52 -0500)]
Add a batchpipe() command to helpers that behaves somewhat like xargs(1).

Add batchpipe(), which will yield the output produced by calling a
given external command with a given list of arguments.

The resulting output may be provided in chunks, from multiple
invocations of the command, if the limits imposed by ARG_MAX make that
necessary.

See http://www.in-ulm.de/~mascheck/various/argmax/ for details, but
note that batchpipe() takes the additional precaution of adding room
for the argv pointers in addition to the envp pointers.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agoWrite the system ARG_MAX to an autogenerated config.py at configure time.
Rob Browning [Thu, 8 May 2014 18:44:11 +0000 (13:44 -0500)]
Write the system ARG_MAX to an autogenerated config.py at configure time.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agoMerge work to make helpers.next() match the newer Python next().
Rob Browning [Thu, 8 May 2014 17:47:57 +0000 (12:47 -0500)]
Merge work to make helpers.next() match the newer Python next().

9 years agoOnly define helpers.next() if Python's isn't new enough.
Rob Browning [Thu, 8 May 2014 16:50:29 +0000 (11:50 -0500)]
Only define helpers.next() if Python's isn't new enough.

Since helpers.next() now matches the Python built-in's semantics
(since Python 2.6), just rely on the built-in when it's new enough.
Otherwise, set up a matching replacement.

Borrow the fallback next documentation string from Python.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agoDrop helpers.next() and just use Python's built-in.
Aidan Hobson Sayers [Thu, 12 Dec 2013 20:29:22 +0000 (20:29 +0000)]
Drop helpers.next() and just use Python's built-in.

The python built-in 'next' function has an optional second parameter
that specifies what to return instead of excepting with StopIteration.
There is therefore no need for the function in helpers.py.

Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
[rlb@defaultvalue.org: adjust commit message.]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
9 years agohelpers.py: use returncode to get the subprocess exit code in readpipe().
Rob Browning [Fri, 2 May 2014 17:32:07 +0000 (12:32 -0500)]
helpers.py: use returncode to get the subprocess exit code in readpipe().

Hello?  It's returncode, not retcode -- and how about a test?

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agoUse the author date, not committer date for the bup save date.
Rob Browning [Mon, 10 Feb 2014 19:03:09 +0000 (13:03 -0600)]
Use the author date, not committer date for the bup save date.

Since it's the author date that indicates when the save was made, use
that instead of the committer date to represent saves.

Doing so means that any operations on branches (like rebase,
cherry-pick, etc.) won't change the "save date" as far as bup is
concerned.

This should have no effect with respect to backward compatibility
because until now, bup always used the same date for the author and
committer.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agohelpers.py: check subprocess exit status in readpipe().
Rob Browning [Sun, 23 Mar 2014 22:52:59 +0000 (17:52 -0500)]
helpers.py: check subprocess exit status in readpipe().

Checking the exit status seems like a good idea.  Note that we can't
just use check_output() because it wasn't added until Python 2.7.

Thanks to Alexander Barton <alex@barton.de> for reporting the version
incompatibility with respect to an earlier version of this patch.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
9 years agotest-ls.sh: handle Cygwin's coupling of timestamp/permission modifications.
Patryck Rouleau [Sun, 30 Mar 2014 15:04:49 +0000 (11:04 -0400)]
test-ls.sh: handle Cygwin's coupling of timestamp/permission modifications.

In Cygwin, the file's modification date is updated when its
permissions are modified. To make the tests compatible with Cygwin,
create the files first, set their permissions, then set the date.

Signed-off-by: Patrick Rouleau <prouleau72@gmail.com>
[rlb@defaultvalue.org: adjust commit message.]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
9 years agoAdd VFS Node release() and release nodes during restore, after traversal.
Rob Browning [Sat, 12 Apr 2014 19:17:48 +0000 (14:17 -0500)]
Add VFS Node release() and release nodes during restore, after traversal.

Add a release() method to Node that will drop resources that can (and
will) be automatically restored when required -- though restoring the
resources may have a non-trivial cost.  For now, drop the node's
metadata and its children.

Call node.release() in restore-cmd.py after restoring a node.  This
substantially decreases the memory required by a restore because the
whole tree is no longer retained in RAM.

Thanks to Patrick Rouleau <prouleau72@gmail.com> for helping track
down the problem, and proposing a slightly different initial patch to
fix it.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Patrick Rouleau <prouleau72@gmail.com>
10 years agosave-cmd.py: hashsplit .bupm metadata files.
Rob Browning [Fri, 4 Apr 2014 19:29:24 +0000 (14:29 -0500)]
save-cmd.py: hashsplit .bupm metadata files.

Previously the metdata for each directory's content was being written
as a single blob, with no deduplication -- probably not what we want.
Fix it.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
10 years agoMerge work to have "bup split" produce a top-level VFS file.
Rob Browning [Thu, 10 Apr 2014 21:06:17 +0000 (16:06 -0500)]
Merge work to have "bup split" produce a top-level VFS file.

10 years agoAlways name the top-level split file "data", instead of the branch basename.
Rob Browning [Sun, 6 Apr 2014 19:59:44 +0000 (14:59 -0500)]
Always name the top-level split file "data", instead of the branch basename.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
10 years agoMake bup-split commits appear as files to the vfs layer.
Yung-Chin Oei [Mon, 8 Oct 2012 14:08:34 +0000 (15:08 +0100)]
Make bup-split commits appear as files to the vfs layer.

When viewing branches that were generated by bup-split through bup-fuse
(or any other frontend relying on vfs.py), these are presented as trees
of the hashsplitted blobs. This means that bup-split output is only
usefully accessible through bup-join.

This change makes bup-split store named commits such that they appear as
files, named with the last component of their branch name(*). That is,
from the vfs layer, they now appear like so:
    branch_name/latest/branch_basename

(*) While bup doesn't currently handle slashes in branch names, patches
    to this end are on the mailing list, so this patch should handle
    them, in anticipation of their general support in bup.

To address potential concerns: the storage format is changed in subtle
ways, in that the top level tree now contains a "normally" named object,
rather than byte-offset names.  However, bup-join doesn't care about
this, and as bup-join was previously the only way to use these commits,
the user experience is not affected.

We also add a test for the new functionality. (The test uses an empty
string as input data, because this is the second way in which this patch
changes the behaviour of bup-split: previously, passing empty strings to
bup-split would make it generate an empty git tree, whereas now it
relies on hashsplit.split_to_blob_or_tree() to make a blob for the empty
string. This is meaningful because vfs.py chokes on empty git trees.)

Signed-off-by: Yung-Chin Oei <yungchin@yungchin.nl>
[rlb@defaultvalue.org: rebase to current master; adjust code indentation.]

10 years agovfs.py: don't redundantly _populate_metadata for Dir()s.
Rob Browning [Fri, 4 Apr 2014 20:55:37 +0000 (15:55 -0500)]
vfs.py: don't redundantly _populate_metadata for Dir()s.

This fix should significantly improve performance.  Without it, every
call to node.metadata() caused the VFS to read the entire .bupm file
in order to (re)initialize the metadata for every entry in the
directory.  Don't do that.

I thought I'd already implemented this, but apparently only in my
head.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
10 years agoAdd initial support for ls(1) style "-d" argument to "bup ls".
Rob Browning [Sat, 22 Mar 2014 05:20:20 +0000 (00:20 -0500)]
Add initial support for ls(1) style "-d" argument to "bup ls".

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
10 years agoindex.py: fix typo in Writer._add.
Rob Browning [Thu, 3 Apr 2014 18:20:45 +0000 (13:20 -0500)]
index.py: fix typo in Writer._add.

Thanks to bk <b.karran@gmail.com> for reporting the problem.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
10 years agoindex-cmd: prevent a division by zero while computing paths_per_second.
Patryck Rouleau [Mon, 31 Mar 2014 01:21:31 +0000 (21:21 -0400)]
index-cmd: prevent a division by zero while computing paths_per_second.

Signed-off-by: Patryck Rouleau <prouleau72@gmail.com>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
10 years agot/tmetadata.py: accommodate changes to xattr.set error message.
Mark J Hewitt [Fri, 28 Mar 2014 14:46:18 +0000 (14:46 +0000)]
t/tmetadata.py: accommodate changes to xattr.set error message.

Correct the expected error string for xattr.set (changed in
21eab6b52fcf65827e21ca33fd3349157993053c).

Signed-off-by: Mark J Hewitt <m.hewitt@computer.org>
[rlb@defaultvalue.org: adjust commit message, and include a leading
 single quote in what we're looking for, to match
 c8c1f0341c82f4abf4d3f8eed1fe4ddfa4a48493.]
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
10 years agot/test-meta.sh: fix xattr.set test broken by path output on error.
Rob Browning [Wed, 26 Mar 2014 23:47:59 +0000 (18:47 -0500)]
t/test-meta.sh: fix xattr.set test broken by path output on error.

This was broken by 21eab6b52fcf65827e21ca33fd3349157993053c, and I
(obviously) didn't test as root before pushing.

Thanks to Mark J Hewitt <mjh@idnet.com> for the report.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
10 years agoPass any VFS Dir() constructor keywords on to Node().
Rob Browning [Sat, 22 Mar 2014 18:44:55 +0000 (13:44 -0500)]
Pass any VFS Dir() constructor keywords on to Node().

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
10 years agowvtest.sh: add WVDIE().
Rob Browning [Sat, 22 Mar 2014 19:32:17 +0000 (14:32 -0500)]
wvtest.sh: add WVDIE().

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
10 years agometadata.py: xattr exception strings don't have path information; add it.
Rob Browning [Sun, 23 Mar 2014 16:19:31 +0000 (11:19 -0500)]
metadata.py: xattr exception strings don't have path information; add it.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
10 years agotest-ls.sh: don't check the symlink file size on NetBSD for now.
Rob Browning [Sun, 23 Mar 2014 15:39:25 +0000 (10:39 -0500)]
test-ls.sh: don't check the symlink file size on NetBSD for now.

NetBSD appears to be returning varying file sizes for symlinks at the
moment, so just ignore the size there for now.

Thanks to Thomas Klausner <tk@giga.or.at> for reporting the problem
and to him and Greg Troxel <gdt@ir.bbn.com> for help with the
workaround.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
10 years agotest-ls.sh: get the group and gid from the filesystem.
Rob Browning [Sat, 22 Mar 2014 15:25:32 +0000 (10:25 -0500)]
test-ls.sh: get the group and gid from the filesystem.

Get the expected gid from the filesystem, not "id", because on some
platforms (BSDs, etc.) a new path's gid is taken from the parent
directory, not the effective gid.

Thanks to Thomas Klausner <tk@giga.or.at> for reporting the problem
and to him and Greg Troxel <gdt@ir.bbn.com> for helping craft the
solution.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
10 years ago_helpers.c: use "unsigned long long" in ASSIGN_PYLONG_TO_INTEGRAL().
Rob Browning [Fri, 21 Mar 2014 20:13:27 +0000 (15:13 -0500)]
_helpers.c: use "unsigned long long" in ASSIGN_PYLONG_TO_INTEGRAL().

The result of PyLong_AsUnsignedLongLong() was being assigned to an
"unsigned long".  Don't do that.

Thanks to Alexander Barton <alex@barton.de> for reporting the problem.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
10 years agowvtest.sh: print a backtrace on failure when running under bash.
Rob Browning [Thu, 20 Mar 2014 18:52:06 +0000 (13:52 -0500)]
wvtest.sh: print a backtrace on failure when running under bash.

Very handy when there are nested WV* calls, i.e.

  foo() { ... WVPASS bar; ... }
  ...
  WVPASS foo

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
10 years agowvtest.sh: declare non-global variables to be local.
Rob Browning [Thu, 20 Mar 2014 15:29:43 +0000 (10:29 -0500)]
wvtest.sh: declare non-global variables to be local.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>