]> arthur.barton.de Git - bup.git/commitdiff
Always name the top-level split file "data", instead of the branch basename.
authorRob Browning <rlb@defaultvalue.org>
Sun, 6 Apr 2014 19:59:44 +0000 (14:59 -0500)
committerRob Browning <rlb@defaultvalue.org>
Thu, 10 Apr 2014 21:03:32 +0000 (16:03 -0500)
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Documentation/bup-split.md
cmd/split-cmd.py
t/test.sh

index 1844da80519a6d4bdf30842c4fd4220627d11bc8..22d63cbc12a6571aa2ac09a11ddaf54fefb40b9e 100644 (file)
@@ -60,7 +60,9 @@ being the most likely choice.
     will be considered a descendant of the old *name*.
     (Thus, you can continually create new datasets with
     the same name, and later view the history of that
-    dataset to see how it has changed over time.)
+    dataset to see how it has changed over time.)  The original data
+    will also be available as a top-level file named "data" in the VFS,
+    accessible via `bup fuse`, `bup ftp`, etc.
 
 -t, \--tree
 :   output the git tree id of the resulting dataset.
index 2ab4d2b2b76b3f83edc22054aa93e3b0322c081e..5ae3c0d991ab8bc322752c8d8a4dc757ba2e1d50 100755 (executable)
@@ -144,9 +144,8 @@ elif pack_writer:  # tree or commit or name
                                             files,
                                             keep_boundaries=opt.keep_boundaries,
                                             progress=prog)
-        dummy_name = git.mangle_name(os.path.basename(opt.name),
-                                     hashsplit.GIT_MODE_FILE, mode)
-        shalist = [(mode, dummy_name, sha)]
+        splitfile_name = git.mangle_name('data', hashsplit.GIT_MODE_FILE, mode)
+        shalist = [(mode, splitfile_name, sha)]
     else:
         shalist = hashsplit.split_to_shalist(
                       pack_writer.new_blob, pack_writer.new_tree, files,
index 2483222da8ea9a23e9b3cccce7987134b176fd8c..b48b1b681c41f312b0440324fafcd1d88fb9bba1 100755 (executable)
--- a/t/test.sh
+++ b/t/test.sh
@@ -235,9 +235,9 @@ WVPASS force-delete buprestore.tmp
 WVPASS bup restore -C buprestore.tmp "/master/latest/$tmpdir/$D/"
 WVPASS touch $D/non-existent-file buprestore.tmp/non-existent-file # else diff fails
 WVPASS diff -ur $D/ buprestore.tmp/
-rm -f split_empty_string.tmp
-WVPASS bup restore split_empty_string.tmp/latest/split_empty_string.tmp
-WVPASSEQ "$(cat split_empty_string.tmp)" ""
+WVPASS force-delete buprestore.tmp
+WVPASS bup restore -C buprestore.tmp split_empty_string.tmp/latest/
+WVPASSEQ "$(cat buprestore.tmp/data)" ""
 
 (
     tmp=testrestore.tmp