WVPASS touch -t 200910032348 src
WVPASS touch -t 200910032348 .
WVPASS bup index src
+# Include two saves to test multiple results per ref from rev_list.
+WVPASS bup save -n src -d 242312159 --strip src
WVPASS bup save -n src -d 242312160 --strip src
WVPASS bup tag some-tag src
uid="$(WVPASS id -u)" || exit $?
-gid="$(WVPASS bup-python -c 'import os; print os.stat("src").st_gid')" || exit $?
+gid="$(WVPASS bup-python -c 'import os; print(os.stat("src").st_gid)')" || exit $?
user="$(WVPASS id -un)" || exit $?
group="$(WVPASS bup-python -c 'import grp, os;
-print grp.getgrgid(os.stat("src").st_gid)[0]')" || exit $?
+print(grp.getgrgid(os.stat("src").st_gid)[0])')" || exit $?
src_commit_hash=$(git log --format=%H -n1 src)
src_tree_hash=$(git log --format=%T -n1 src)
WVPASSEQ "$(WVPASS bup-ls /.tag)" "some-tag"
WVPASSEQ "$(WVPASS bup-ls /src)" \
-"1977-09-05-125600
+"1977-09-05-125559
+1977-09-05-125600
latest"
WVPASSEQ "$(WVPASS bup-ls src/latest)" "bad-symlink
if test "$(uname -s)" != NetBSD; then
bad_symlink_size="$(WVPASS bup-python -c "import os
-print os.lstat('src/bad-symlink').st_size")" || exit $?
+print(os.lstat('src/bad-symlink').st_size)")" || exit $?
else
# NetBSD appears to return varying sizes, so for now, just ignore it.
bad_symlink_size="$(WVPASS echo "$bad_symlink_bup_info" \
if test "$(uname -s)" != NetBSD; then
symlink_size="$(WVPASS bup-python -c "import os
-print os.lstat('src/symlink').st_size")" || exit $?
+print(os.lstat('src/symlink').st_size)")" || exit $?
else
# NetBSD appears to return varying sizes, so for now, just ignore it.
symlink_size="$(WVPASS echo "$symlink_bup_info" \
$symlink_mode $uid/$gid $symlink_size $symlink_date symlink -> file"
WVPASSEQ "$(bup-ls -ld "src/latest" | tr -s ' ' ' ')" \
-"drwx------ $user/$group 0 2009-10-03 23:48 src/latest"
+"lrwxr-xr-x 0/0 17 1970-01-01 00:00 src/latest -> 1977-09-05-125600"
WVSTART "$ls_cmd_desc (backup set - long)"
WVPASSEQ "$(bup-ls -l --numeric-ids src | cut -d' ' -f 1-2)" \
"drwx------ $uid/$gid
-drwx------ $uid/$gid"
+drwx------ $uid/$gid
+lrwxr-xr-x 0/0"
-WVPASSEQ "$(bup-ls -ds "src/latest" | tr -s ' ' ' ')" \
-"$src_tree_hash src/latest"
+WVPASSEQ "$(bup-ls -ds "src/1977-09-05-125600" | tr -s ' ' ' ')" \
+"$src_tree_hash src/1977-09-05-125600"
-WVPASSEQ "$(bup-ls -ds --commit-hash "src/latest" | tr -s ' ' ' ')" \
-"$src_commit_hash src/latest"
+WVPASSEQ "$(bup-ls -ds --commit-hash "src/1977-09-05-125600" | tr -s ' ' ' ')" \
+"$src_commit_hash src/1977-09-05-125600"
WVSTART "$ls_cmd_desc (dates TZ != UTC)"