]> arthur.barton.de Git - bup.git/commit
save-cmd: don't fail an assertion when doing a backup from the root level.
authorAvery Pennarun <apenwarr@gmail.com>
Wed, 3 Mar 2010 22:36:06 +0000 (17:36 -0500)
committerAvery Pennarun <apenwarr@gmail.com>
Wed, 3 Mar 2010 22:38:56 +0000 (17:38 -0500)
commit9872d84c87fa4034fad0e63a90fdc5c782dae88b
tree83667f05615a688281d83ab7d6466be04015a08b
parent5bac5e5d943b3094aaaea65dfa5a50d8a16d0c6c
save-cmd: don't fail an assertion when doing a backup from the root level.

This wasn't caught by unit tests because "virtual" nodes added by
index.py:_golevel() weren't being marked as IX_EXISTS, which in the unit
tests included the root, so save-cmd was never actually trying to back up
that node.

That made the base directories incorrectly marked as status=D (deleted) if
you printed out the index during the tests.  So add a test for that to make
it fail if "/" is deleted (which obviously makes no sense), then add another
test for saving from the root level, then fix both bugs.
cmd/save-cmd.py
lib/bup/index.py
t/test.sh