Snapshot test both relative and absolute path based invocations

Also output comments
This commit is contained in:
Josh Hansen 2023-09-30 15:48:16 -07:00
parent 5b89b46145
commit 47b83ee57c
3 changed files with 610 additions and 256 deletions

View file

@ -17,10 +17,10 @@
-[ ] `get`: make output tabular as much as possible (get xattrs from all indices, put rest in 'other' column)
-[ ] `ls`: show default primary keys when not explicitly specified
-[ ] Issue warnings when xattrs inferred from path don't match explicit xattrs
-[ ] Ensure all commands accept relative paths
-[x] Ensure all commands accept relative paths
-[ ] Maybe store table index paths as relative paths? (Then we can operate on snapshots directly.)
-[ ] Change hidden prefix from : to .
-[ ] Cover absolute paths in example.sh
-[x] Cover absolute paths in example.sh
-[ ] Separate "porcelain" from "plumbing" and test plumbing more thoroughly
## Future

View file

@ -19,6 +19,8 @@ fi
cd example
EXAMPLE_PATH="$PWD"
set -x
main() {
@ -30,100 +32,121 @@ main() {
$GHEE set -s name=Sofia -s id=1 -s state=WA $1/people/Sofia
$GHEE set -s name=Wulfrum -s id=0 -s state=CA $1/people/Wulfrum
# Check how Ghee sees the files we just set up
Check how Ghee sees the files we just set up 2> /dev/null
$GHEE get $1/people
# Tell Ghee what key the data is indexed by
Tell Ghee what key the data is indexed by 2> /dev/null
$GHEE init -k name $1/people
# Index the dataset by ID
Index the dataset by ID 2> /dev/null
$GHEE idx -v -k id $1/people $1/people:id
# Index the dataset by state and ID, placing the index in the default path
# Index the dataset by state and ID, placing the index in the default path 2> /dev/null
$GHEE idx -v -k state -k id $1/people
# Add more people to the table and its indices
$GHEE ins -v $1/people < $prefix/../people.json
# Add more people to the table and its indices 2> /dev/null
$GHEE ins -v $1/people < $REPO_PATH/people.json
# Get all of ./people, seen as a table
$GHEE get -a $1/people
# # Get all of ./people without sorting in the walk of the folder hierarchy
# # Get all of ./people without sorting in the walk of the folder hierarchy 2> /dev/null
# ghee get -a --nosort $prefix/people
# Get the name of everybody from California; include all subpaths (don't ignore indices)
# Get the name of everybody from California; include all subpaths (don't ignore indices) 2> /dev/null
$GHEE get -a -w state=CA -f name $1/people
# Remove Sofia
$GHEE del -v $1/people -w name=Sofia
# Equivalently: ghee del -v ./people Sofia
# Equivalently: ghee del -v ./people Sofia 2> /dev/null
# Remove Lilly from the :id index and all related indices
# Remove Lilly from the :id index and all related indices 2> /dev/null
$GHEE del -v $1/people:id 3
# Equivalently: ghee del -v ./people -w id=3
# Equivalently: ghee del -v ./people Lilly
# Remove Wulfrum from the :state:id index and all related indices
# Remove Wulfrum from the :state:id index and all related indices 2> /dev/null
$GHEE del -v $1/people/:state:id CA 0
# Equivalently: ghee del -v ./people -w state=CA -w id=0
# Equivalently: ghee del -v ./people Wulfrum
# Get the name of everybody from California still remaining,
# taking advantage of the state index
# This will avoid traversing irrelevant portions of the index
# Get the name of everybody from California still remaining, 2> /dev/null
# taking advantage of the state index 2> /dev/null
# This will avoid traversing irrelevant portions of the index 2> /dev/null
$GHEE get -a -w state=CA -f name $1/people/:state:id
# Create a table directly
# Create a table directly 2> /dev/null
$GHEE create -v $1/direct -k blah
# Create people2 in one go using `create'
$GHEE create -v $1/people2 -k id < $prefix/../people.json
# Create people2 in one go using `create' 2> /dev/null
$GHEE create -v $1/people2 -k id < $REPO_PATH/people.json
$GHEE status $1/people2
mkdir $1/empty
$GHEE status $1/empty
$GHEE get $1/empty
$GHEE get -a $1/empty
}
btrfs() {
Sanity check status and log on an empty directory 2> /dev/null
$GHEE status $1
$GHEE log
Create a pizza table 2> /dev/null
$GHEE create -v -k toppings $1/pizza
Make sure the status is empty 2> /dev/null
$GHEE status $1/pizza
Create a record representing an olive pizza 2> /dev/null
$GHEE touch $1/pizza/olive
Check that the new record shows up the status 2> /dev/null
$GHEE status $1/pizza
Commit the change with a helpful comment 2> /dev/null
$GHEE commit -m "Add olive pizza" $1/pizza
Make sure the new commit shows up in the log 2> /dev/null
$GHEE log $1/pizza
Check that the status is empty again, since there are no pending changes 2> /dev/null
$GHEE status $1/pizza
Now create a pepperoni pizza 2> /dev/null
$GHEE touch $1/pizza/pepperoni
Set text in the file itself, rather than just xattrs 2> /dev/null
echo "Olives are good on pizza" > $1/pizza/olive
Also set its yumminess level to 5, as an extended attribute 2> /dev/null
$GHEE set -s yumminess=5 $1/pizza/olive
Make sure this all shows up in the status 2> /dev/null
FIXME The xattr changes arent reflected 2> /dev/null
$GHEE status $1/pizza
Commit the new changes 2> /dev/null
$GHEE commit -m "Add pepperoni; add details to olive" $1/pizza
Make sure status and log reflect this 2> /dev/null
$GHEE status $1/pizza
$GHEE log $1/pizza
Create a buffalo chicken pizza 2> /dev/null
$GHEE touch $1/pizza/buffalo-chicken
pwd
pushd $1/pizza
Check status, restore, and status again using the current directory form 2> /dev/null
$GHEE status
$GHEE restore .
@ -131,45 +154,63 @@ btrfs() {
$GHEE status
popd
pwd
}
declare -A PREFIXES
PREFIXES=([relative]=".")
PREFIXES=([relative]="." [absolute]="$EXAMPLE_PATH/FSNAME")
mkdir ./ext4
mkdir ./btrfs
## Initial file hierarchy to clone
mkdir ./empty
for i in "${!PREFIXES[@]}"
do
Make sure we are in the base path so the relative prefix resolves properly 2> /dev/null
cd $EXAMPLE_PATH
prefix="${PREFIXES[$i]}"
"======= $i prefix: $prefix =======" 2> /dev/null
# --- Ext4 ---
ext4img="$prefix/ghee-ext4-$i.img"
ext4img="ghee-ext4-$i.img"
dd if=/dev/zero of=$ext4img bs=1M count=400 1> /dev/null 2> /dev/null
mkfs.ext4 -L ext4-$i $ext4img 1> /dev/null 2> /dev/null
mkdir $prefix/ext4
sudo mount -o loop $ext4img $prefix/ext4
sudo chown $OWNER:$OWNER $prefix/ext4
sudo mount -o loop $ext4img ext4
sudo chown $OWNER:$OWNER ext4
main $prefix/ext4
fsprefix="${prefix/FSNAME/ext4}"
sudo umount $prefix/ext4
cd ext4
main $fsprefix
cd ..
sudo umount ext4
# --- BTRFS ---
## Initial file hierarchy to clone
mkdir $prefix/empty
btrfsimg="$prefix/ghee-btrfs-$i.img"
btrfsimg="ghee-btrfs-$i.img"
dd if=/dev/zero of=$btrfsimg bs=1M count=114 1> /dev/null 2> /dev/null
mkfs.btrfs -L btrfs-$i --rootdir $prefix/empty $btrfsimg 1> /dev/null 2> /dev/null
mkdir $prefix/btrfs
sudo mount -o loop $btrfsimg $prefix/btrfs
mkfs.btrfs -L btrfs-$i --rootdir empty $btrfsimg 1> /dev/null 2> /dev/null
sudo mount -o loop $btrfsimg btrfs
sudo chown $OWNER:$OWNER $prefix/btrfs
sudo chown $OWNER:$OWNER btrfs
main $prefix/btrfs
fsprefix="${prefix/FSNAME/btrfs}"
btrfs $prefix/btrfs
cd btrfs
main $fsprefix
sudo umount $prefix/btrfs
btrfs $fsprefix
cd ..
pwd
sudo umount btrfs
# --- /BTRFS ---
done

View file

@ -1,245 +1,558 @@
+ declare -A PREFIXES
+ PREFIXES=([relative]=".")
+ PREFIXES=([relative]="." [absolute]="$EXAMPLE_PATH/FSNAME")
+ mkdir ./ext4
+ mkdir ./btrfs
+ mkdir ./empty
+ for i in "${!PREFIXES[@]}"
+ Make sure we are in the base path so the relative prefix resolves properly
+ cd /home/josh/Projects/Ghee/example
+ prefix=.
+ '======= relative prefix: . ======='
+ ext4img=./ghee-ext4-relative.img
+ dd if=/dev/zero of=./ghee-ext4-relative.img bs=1M count=400
+ mkfs.ext4 -L ext4-relative ./ghee-ext4-relative.img
+ mkdir ./ext4
+ sudo mount -o loop ./ghee-ext4-relative.img ./ext4
+ sudo chown josh:josh ./ext4
+ main ./ext4
+ mkdir ./ext4/people
+ touch ./ext4/people/Sandeep ./ext4/people/Sofia ./ext4/people/Wulfrum
+ /home/josh/Projects/Ghee/target/debug/ghee set -s name=Sandeep -s id=2 -s state=CA ./ext4/people/Sandeep
+ /home/josh/Projects/Ghee/target/debug/ghee set -s name=Sofia -s id=1 -s state=WA ./ext4/people/Sofia
+ /home/josh/Projects/Ghee/target/debug/ghee set -s name=Wulfrum -s id=0 -s state=CA ./ext4/people/Wulfrum
+ /home/josh/Projects/Ghee/target/debug/ghee get ./ext4/people
./ext4/people/Sandeep user.id 2
./ext4/people/Sandeep user.name Sandeep
./ext4/people/Sandeep user.state CA
./ext4/people/Sofia user.id 1
./ext4/people/Sofia user.name Sofia
./ext4/people/Sofia user.state WA
./ext4/people/Wulfrum user.id 0
./ext4/people/Wulfrum user.name Wulfrum
./ext4/people/Wulfrum user.state CA
+ /home/josh/Projects/Ghee/target/debug/ghee init -k name ./ext4/people
+ /home/josh/Projects/Ghee/target/debug/ghee idx -v -k id ./ext4/people ./ext4/people:id
./ext4/people/Wulfrum -> ./ext4/people:id/0
./ext4/people/Sandeep -> ./ext4/people:id/2
./ext4/people/Sofia -> ./ext4/people:id/1
+ /home/josh/Projects/Ghee/target/debug/ghee idx -v -k state -k id ./ext4/people
./ext4/people/Wulfrum -> ./ext4/people/:state:id/CA/0
./ext4/people/Sandeep -> ./ext4/people/:state:id/CA/2
./ext4/people/Sofia -> ./ext4/people/:state:id/WA/1
+ /home/josh/Projects/Ghee/target/debug/ghee ins -v ./ext4/people
Initialized ./ext4/people/Janella
Linked ./ext4/people:id/3 -> ./ext4/people/Janella
Linked ./ext4/people/:state:id/FL/3 -> ./ext4/people/Janella
Initialized ./ext4/people/Lilly
Linked ./ext4/people:id/4 -> ./ext4/people/Lilly
Linked ./ext4/people/:state:id/NM/4 -> ./ext4/people/Lilly
Initialized ./ext4/people/Darrel
Linked ./ext4/people:id/5 -> ./ext4/people/Darrel
Linked ./ext4/people/:state:id/MI/5 -> ./ext4/people/Darrel
+ /home/josh/Projects/Ghee/target/debug/ghee get -a ./ext4/people
+ ext4img=ghee-ext4-relative.img
+ dd if=/dev/zero of=ghee-ext4-relative.img bs=1M count=400
+ mkfs.ext4 -L ext4-relative ghee-ext4-relative.img
+ sudo mount -o loop ghee-ext4-relative.img ext4
+ sudo chown josh:josh ext4
+ fsprefix=.
+ cd ext4
+ main .
+ mkdir ./people
+ touch ./people/Sandeep ./people/Sofia ./people/Wulfrum
+ /home/josh/Projects/Ghee/target/debug/ghee set -s name=Sandeep -s id=2 -s state=CA ./people/Sandeep
+ /home/josh/Projects/Ghee/target/debug/ghee set -s name=Sofia -s id=1 -s state=WA ./people/Sofia
+ /home/josh/Projects/Ghee/target/debug/ghee set -s name=Wulfrum -s id=0 -s state=CA ./people/Wulfrum
+ Check how Ghee sees the files we just set up
+ /home/josh/Projects/Ghee/target/debug/ghee get ./people
./people/Sandeep user.id 2
./people/Sandeep user.name Sandeep
./people/Sandeep user.state CA
./people/Sofia user.id 1
./people/Sofia user.name Sofia
./people/Sofia user.state WA
./people/Wulfrum user.id 0
./people/Wulfrum user.name Wulfrum
./people/Wulfrum user.state CA
+ Tell Ghee what key the data is indexed by
+ /home/josh/Projects/Ghee/target/debug/ghee init -k name ./people
+ Index the dataset by ID
+ /home/josh/Projects/Ghee/target/debug/ghee idx -v -k id ./people ./people:id
./people/Wulfrum -> ./people:id/0
./people/Sofia -> ./people:id/1
./people/Sandeep -> ./people:id/2
+ /home/josh/Projects/Ghee/target/debug/ghee idx -v -k state -k id ./people
./people/Wulfrum -> ./people/:state:id/CA/0
./people/Sofia -> ./people/:state:id/WA/1
./people/Sandeep -> ./people/:state:id/CA/2
+ /home/josh/Projects/Ghee/target/debug/ghee ins -v ./people
Initialized ./people/Janella
Linked ./people:id/3 -> ./people/Janella
Linked ./people/:state:id/FL/3 -> ./people/Janella
Initialized ./people/Lilly
Linked ./people:id/4 -> ./people/Lilly
Linked ./people/:state:id/NM/4 -> ./people/Lilly
Initialized ./people/Darrel
Linked ./people:id/5 -> ./people/Darrel
Linked ./people/:state:id/MI/5 -> ./people/Darrel
+ /home/josh/Projects/Ghee/target/debug/ghee get -a ./people
user.ghee.tableinfo {"key":"name","indices_abs":{"id":"/home/josh/Projects/Ghee/example/ext4/people:id","name":"/home/josh/Projects/Ghee/example/ext4/people","state,id":"/home/josh/Projects/Ghee/example/ext4/people/:state:id"}}
./ext4/people/Darrel user.id 5
./ext4/people/Darrel user.name Darrel
./ext4/people/Darrel user.state MI
./ext4/people/Janella user.id 3
./ext4/people/Janella user.name Janella
./ext4/people/Janella user.state FL
./ext4/people/Lilly user.id 4
./ext4/people/Lilly user.name Lilly
./ext4/people/Lilly user.state NM
./ext4/people/Sandeep user.id 2
./ext4/people/Sandeep user.name Sandeep
./ext4/people/Sandeep user.state CA
./ext4/people/Sofia user.id 1
./ext4/people/Sofia user.name Sofia
./ext4/people/Sofia user.state WA
./ext4/people/Wulfrum user.id 0
./ext4/people/Wulfrum user.name Wulfrum
./ext4/people/Wulfrum user.state CA
+ /home/josh/Projects/Ghee/target/debug/ghee get -a -w state=CA -f name ./ext4/people
./ext4/people/Wulfrum user.name Wulfrum
./ext4/people/Sandeep user.name Sandeep
+ /home/josh/Projects/Ghee/target/debug/ghee del -v ./ext4/people -w name=Sofia
Removed ./ext4/people:id/1
Removed ./ext4/people/Sofia
Removed ./ext4/people/:state:id/WA/1
+ /home/josh/Projects/Ghee/target/debug/ghee del -v ./ext4/people:id 3
Removed ./ext4/people:id/3
Removed ./ext4/people/Janella
Removed ./ext4/people/:state:id/FL/3
+ /home/josh/Projects/Ghee/target/debug/ghee del -v ./ext4/people/:state:id CA 0
Removed ./ext4/people:id/0
Removed ./ext4/people/Wulfrum
Removed ./ext4/people/:state:id/CA/0
+ /home/josh/Projects/Ghee/target/debug/ghee get -a -w state=CA -f name ./ext4/people/:state:id
./ext4/people/:state:id/CA/2 user.name Sandeep
+ /home/josh/Projects/Ghee/target/debug/ghee create -v ./ext4/direct -k blah
Initialized table ./ext4/direct with key: user.blah
+ /home/josh/Projects/Ghee/target/debug/ghee create -v ./ext4/people2 -k id
Initialized table ./ext4/people2 with key: user.id
Initialized ./ext4/people2/3
Initialized ./ext4/people2/4
Initialized ./ext4/people2/5
+ /home/josh/Projects/Ghee/target/debug/ghee status ./ext4/people2
+./ext4/people2
+./ext4/people2/3
+./ext4/people2/4
+./ext4/people2/5
+ mkdir ./ext4/empty
+ /home/josh/Projects/Ghee/target/debug/ghee status ./ext4/empty
No table found
+ /home/josh/Projects/Ghee/target/debug/ghee get ./ext4/empty
+ /home/josh/Projects/Ghee/target/debug/ghee get -a ./ext4/empty
+ sudo umount ./ext4
./people/Darrel user.id 5
./people/Darrel user.name Darrel
./people/Darrel user.state MI
./people/Janella user.id 3
./people/Janella user.name Janella
./people/Janella user.state FL
./people/Lilly user.id 4
./people/Lilly user.name Lilly
./people/Lilly user.state NM
./people/Sandeep user.id 2
./people/Sandeep user.name Sandeep
./people/Sandeep user.state CA
./people/Sofia user.id 1
./people/Sofia user.name Sofia
./people/Sofia user.state WA
./people/Wulfrum user.id 0
./people/Wulfrum user.name Wulfrum
./people/Wulfrum user.state CA
+ /home/josh/Projects/Ghee/target/debug/ghee get -a -w state=CA -f name ./people
./people/Wulfrum user.name Wulfrum
./people/Sandeep user.name Sandeep
+ /home/josh/Projects/Ghee/target/debug/ghee del -v ./people -w name=Sofia
Removed ./people:id/1
Removed ./people/Sofia
Removed ./people/:state:id/WA/1
+ /home/josh/Projects/Ghee/target/debug/ghee del -v ./people:id 3
Removed ./people:id/3
Removed ./people/Janella
Removed ./people/:state:id/FL/3
+ /home/josh/Projects/Ghee/target/debug/ghee del -v ./people/:state:id CA 0
Removed ./people:id/0
Removed ./people/Wulfrum
Removed ./people/:state:id/CA/0
+ /home/josh/Projects/Ghee/target/debug/ghee get -a -w state=CA -f name ./people/:state:id
./people/:state:id/CA/2 user.name Sandeep
+ /home/josh/Projects/Ghee/target/debug/ghee create -v ./direct -k blah
Initialized table ./direct with key: user.blah
+ /home/josh/Projects/Ghee/target/debug/ghee create -v ./people2 -k id
Initialized table ./people2 with key: user.id
Initialized ./people2/3
Initialized ./people2/4
Initialized ./people2/5
+ /home/josh/Projects/Ghee/target/debug/ghee status ./people2
+./people2
+./people2/3
+./people2/4
+./people2/5
+ mkdir ./empty
+ btrfsimg=./ghee-btrfs-relative.img
+ dd if=/dev/zero of=./ghee-btrfs-relative.img bs=1M count=114
+ mkfs.btrfs -L btrfs-relative --rootdir ./empty ./ghee-btrfs-relative.img
+ mkdir ./btrfs
+ sudo mount -o loop ./ghee-btrfs-relative.img ./btrfs
+ sudo chown josh:josh ./btrfs
+ main ./btrfs
+ mkdir ./btrfs/people
+ touch ./btrfs/people/Sandeep ./btrfs/people/Sofia ./btrfs/people/Wulfrum
+ /home/josh/Projects/Ghee/target/debug/ghee set -s name=Sandeep -s id=2 -s state=CA ./btrfs/people/Sandeep
+ /home/josh/Projects/Ghee/target/debug/ghee set -s name=Sofia -s id=1 -s state=WA ./btrfs/people/Sofia
+ /home/josh/Projects/Ghee/target/debug/ghee set -s name=Wulfrum -s id=0 -s state=CA ./btrfs/people/Wulfrum
+ /home/josh/Projects/Ghee/target/debug/ghee get ./btrfs/people
./btrfs/people/Sandeep user.id 2
./btrfs/people/Sandeep user.name Sandeep
./btrfs/people/Sandeep user.state CA
./btrfs/people/Sofia user.id 1
./btrfs/people/Sofia user.name Sofia
./btrfs/people/Sofia user.state WA
./btrfs/people/Wulfrum user.id 0
./btrfs/people/Wulfrum user.name Wulfrum
./btrfs/people/Wulfrum user.state CA
+ /home/josh/Projects/Ghee/target/debug/ghee init -k name ./btrfs/people
+ /home/josh/Projects/Ghee/target/debug/ghee idx -v -k id ./btrfs/people ./btrfs/people:id
./btrfs/people/Sandeep -> ./btrfs/people:id/2
./btrfs/people/Sofia -> ./btrfs/people:id/1
./btrfs/people/Wulfrum -> ./btrfs/people:id/0
+ /home/josh/Projects/Ghee/target/debug/ghee idx -v -k state -k id ./btrfs/people
./btrfs/people/Sandeep -> ./btrfs/people/:state:id/CA/2
./btrfs/people/Sofia -> ./btrfs/people/:state:id/WA/1
./btrfs/people/Wulfrum -> ./btrfs/people/:state:id/CA/0
+ /home/josh/Projects/Ghee/target/debug/ghee ins -v ./btrfs/people
Initialized ./btrfs/people/Janella
Linked ./btrfs/people:id/3 -> ./btrfs/people/Janella
Linked ./btrfs/people/:state:id/FL/3 -> ./btrfs/people/Janella
Initialized ./btrfs/people/Lilly
Linked ./btrfs/people:id/4 -> ./btrfs/people/Lilly
Linked ./btrfs/people/:state:id/NM/4 -> ./btrfs/people/Lilly
Initialized ./btrfs/people/Darrel
Linked ./btrfs/people:id/5 -> ./btrfs/people/Darrel
Linked ./btrfs/people/:state:id/MI/5 -> ./btrfs/people/Darrel
+ /home/josh/Projects/Ghee/target/debug/ghee get -a ./btrfs/people
user.ghee.tableinfo {"key":"name","indices_abs":{"id":"/home/josh/Projects/Ghee/example/btrfs/people:id","name":"/home/josh/Projects/Ghee/example/btrfs/people","state,id":"/home/josh/Projects/Ghee/example/btrfs/people/:state:id"}}
./btrfs/people/Darrel user.id 5
./btrfs/people/Darrel user.name Darrel
./btrfs/people/Darrel user.state MI
./btrfs/people/Janella user.id 3
./btrfs/people/Janella user.name Janella
./btrfs/people/Janella user.state FL
./btrfs/people/Lilly user.id 4
./btrfs/people/Lilly user.name Lilly
./btrfs/people/Lilly user.state NM
./btrfs/people/Sandeep user.id 2
./btrfs/people/Sandeep user.name Sandeep
./btrfs/people/Sandeep user.state CA
./btrfs/people/Sofia user.id 1
./btrfs/people/Sofia user.name Sofia
./btrfs/people/Sofia user.state WA
./btrfs/people/Wulfrum user.id 0
./btrfs/people/Wulfrum user.name Wulfrum
./btrfs/people/Wulfrum user.state CA
+ /home/josh/Projects/Ghee/target/debug/ghee get -a -w state=CA -f name ./btrfs/people
./btrfs/people/Wulfrum user.name Wulfrum
./btrfs/people/Sandeep user.name Sandeep
+ /home/josh/Projects/Ghee/target/debug/ghee del -v ./btrfs/people -w name=Sofia
Removed ./btrfs/people:id/1
Removed ./btrfs/people/Sofia
Removed ./btrfs/people/:state:id/WA/1
+ /home/josh/Projects/Ghee/target/debug/ghee del -v ./btrfs/people:id 3
Removed ./btrfs/people:id/3
Removed ./btrfs/people/Janella
Removed ./btrfs/people/:state:id/FL/3
+ /home/josh/Projects/Ghee/target/debug/ghee del -v ./btrfs/people/:state:id CA 0
Removed ./btrfs/people:id/0
Removed ./btrfs/people/Wulfrum
Removed ./btrfs/people/:state:id/CA/0
+ /home/josh/Projects/Ghee/target/debug/ghee get -a -w state=CA -f name ./btrfs/people/:state:id
./btrfs/people/:state:id/CA/2 user.name Sandeep
+ /home/josh/Projects/Ghee/target/debug/ghee create -v ./btrfs/direct -k blah
Initialized table ./btrfs/direct with key: user.blah
+ /home/josh/Projects/Ghee/target/debug/ghee create -v ./btrfs/people2 -k id
Initialized table ./btrfs/people2 with key: user.id
Initialized ./btrfs/people2/3
Initialized ./btrfs/people2/4
Initialized ./btrfs/people2/5
+ /home/josh/Projects/Ghee/target/debug/ghee status ./btrfs/people2
+./btrfs/people2
+./btrfs/people2/3
+./btrfs/people2/4
+./btrfs/people2/5
+ mkdir ./btrfs/empty
+ /home/josh/Projects/Ghee/target/debug/ghee status ./btrfs/empty
+ /home/josh/Projects/Ghee/target/debug/ghee status ./empty
No table found
+ /home/josh/Projects/Ghee/target/debug/ghee get ./btrfs/empty
+ /home/josh/Projects/Ghee/target/debug/ghee get -a ./btrfs/empty
+ btrfs ./btrfs
+ /home/josh/Projects/Ghee/target/debug/ghee status ./btrfs
+ /home/josh/Projects/Ghee/target/debug/ghee get ./empty
+ /home/josh/Projects/Ghee/target/debug/ghee get -a ./empty
+ cd ..
+ sudo umount ext4
+ btrfsimg=ghee-btrfs-relative.img
+ dd if=/dev/zero of=ghee-btrfs-relative.img bs=1M count=114
+ mkfs.btrfs -L btrfs-relative --rootdir empty ghee-btrfs-relative.img
+ sudo mount -o loop ghee-btrfs-relative.img btrfs
+ sudo chown josh:josh btrfs
+ fsprefix=.
+ cd btrfs
+ main .
+ mkdir ./people
+ touch ./people/Sandeep ./people/Sofia ./people/Wulfrum
+ /home/josh/Projects/Ghee/target/debug/ghee set -s name=Sandeep -s id=2 -s state=CA ./people/Sandeep
+ /home/josh/Projects/Ghee/target/debug/ghee set -s name=Sofia -s id=1 -s state=WA ./people/Sofia
+ /home/josh/Projects/Ghee/target/debug/ghee set -s name=Wulfrum -s id=0 -s state=CA ./people/Wulfrum
+ Check how Ghee sees the files we just set up
+ /home/josh/Projects/Ghee/target/debug/ghee get ./people
./people/Sandeep user.id 2
./people/Sandeep user.name Sandeep
./people/Sandeep user.state CA
./people/Sofia user.id 1
./people/Sofia user.name Sofia
./people/Sofia user.state WA
./people/Wulfrum user.id 0
./people/Wulfrum user.name Wulfrum
./people/Wulfrum user.state CA
+ Tell Ghee what key the data is indexed by
+ /home/josh/Projects/Ghee/target/debug/ghee init -k name ./people
+ Index the dataset by ID
+ /home/josh/Projects/Ghee/target/debug/ghee idx -v -k id ./people ./people:id
./people/Sandeep -> ./people:id/2
./people/Sofia -> ./people:id/1
./people/Wulfrum -> ./people:id/0
+ /home/josh/Projects/Ghee/target/debug/ghee idx -v -k state -k id ./people
./people/Sandeep -> ./people/:state:id/CA/2
./people/Sofia -> ./people/:state:id/WA/1
./people/Wulfrum -> ./people/:state:id/CA/0
+ /home/josh/Projects/Ghee/target/debug/ghee ins -v ./people
Initialized ./people/Janella
Linked ./people:id/3 -> ./people/Janella
Linked ./people/:state:id/FL/3 -> ./people/Janella
Initialized ./people/Lilly
Linked ./people:id/4 -> ./people/Lilly
Linked ./people/:state:id/NM/4 -> ./people/Lilly
Initialized ./people/Darrel
Linked ./people:id/5 -> ./people/Darrel
Linked ./people/:state:id/MI/5 -> ./people/Darrel
+ /home/josh/Projects/Ghee/target/debug/ghee get -a ./people
user.ghee.tableinfo {"key":"name","indices_abs":{"id":"/home/josh/Projects/Ghee/example/btrfs/people:id","name":"/home/josh/Projects/Ghee/example/btrfs/people","state,id":"/home/josh/Projects/Ghee/example/btrfs/people/:state:id"}}
./people/Darrel user.id 5
./people/Darrel user.name Darrel
./people/Darrel user.state MI
./people/Janella user.id 3
./people/Janella user.name Janella
./people/Janella user.state FL
./people/Lilly user.id 4
./people/Lilly user.name Lilly
./people/Lilly user.state NM
./people/Sandeep user.id 2
./people/Sandeep user.name Sandeep
./people/Sandeep user.state CA
./people/Sofia user.id 1
./people/Sofia user.name Sofia
./people/Sofia user.state WA
./people/Wulfrum user.id 0
./people/Wulfrum user.name Wulfrum
./people/Wulfrum user.state CA
+ /home/josh/Projects/Ghee/target/debug/ghee get -a -w state=CA -f name ./people
./people/Wulfrum user.name Wulfrum
./people/Sandeep user.name Sandeep
+ /home/josh/Projects/Ghee/target/debug/ghee del -v ./people -w name=Sofia
Removed ./people:id/1
Removed ./people/Sofia
Removed ./people/:state:id/WA/1
+ /home/josh/Projects/Ghee/target/debug/ghee del -v ./people:id 3
Removed ./people:id/3
Removed ./people/Janella
Removed ./people/:state:id/FL/3
+ /home/josh/Projects/Ghee/target/debug/ghee del -v ./people/:state:id CA 0
Removed ./people:id/0
Removed ./people/Wulfrum
Removed ./people/:state:id/CA/0
+ /home/josh/Projects/Ghee/target/debug/ghee get -a -w state=CA -f name ./people/:state:id
./people/:state:id/CA/2 user.name Sandeep
+ /home/josh/Projects/Ghee/target/debug/ghee create -v ./direct -k blah
Initialized table ./direct with key: user.blah
+ /home/josh/Projects/Ghee/target/debug/ghee create -v ./people2 -k id
Initialized table ./people2 with key: user.id
Initialized ./people2/3
Initialized ./people2/4
Initialized ./people2/5
+ /home/josh/Projects/Ghee/target/debug/ghee status ./people2
+./people2
+./people2/3
+./people2/4
+./people2/5
+ mkdir ./empty
+ /home/josh/Projects/Ghee/target/debug/ghee status ./empty
No table found
+ /home/josh/Projects/Ghee/target/debug/ghee get ./empty
+ /home/josh/Projects/Ghee/target/debug/ghee get -a ./empty
+ btrfs .
+ Sanity check status and log on an empty directory
+ /home/josh/Projects/Ghee/target/debug/ghee status .
No table found
+ /home/josh/Projects/Ghee/target/debug/ghee log
No table found; no log exists
+ /home/josh/Projects/Ghee/target/debug/ghee create -v -k toppings ./btrfs/pizza
Initialized table ./btrfs/pizza with key: user.toppings
+ /home/josh/Projects/Ghee/target/debug/ghee status ./btrfs/pizza
+./btrfs/pizza
+ /home/josh/Projects/Ghee/target/debug/ghee touch ./btrfs/pizza/olive
+ /home/josh/Projects/Ghee/target/debug/ghee status ./btrfs/pizza
+./btrfs/pizza
+./btrfs/pizza/olive
+ /home/josh/Projects/Ghee/target/debug/ghee commit -m 'Add olive pizza' ./btrfs/pizza
+ /home/josh/Projects/Ghee/target/debug/ghee log ./btrfs/pizza
commit 67278e12-93b9-714b-a44e-9add2b473c01
+ Create a pizza table
+ /home/josh/Projects/Ghee/target/debug/ghee create -v -k toppings ./pizza
Initialized table ./pizza with key: user.toppings
+ Make sure the status is empty
+ /home/josh/Projects/Ghee/target/debug/ghee status ./pizza
+./pizza
+ Create a record representing an olive pizza
+ /home/josh/Projects/Ghee/target/debug/ghee touch ./pizza/olive
+ Check that the new record shows up the status
+ /home/josh/Projects/Ghee/target/debug/ghee status ./pizza
+./pizza
+./pizza/olive
+ Commit the change with a helpful comment
+ /home/josh/Projects/Ghee/target/debug/ghee commit -m 'Add olive pizza' ./pizza
+ Make sure the new commit shows up in the log
+ /home/josh/Projects/Ghee/target/debug/ghee log ./pizza
commit 20c655bb-33da-4a44-9f75-91eb98af8e1a
Add olive pizza
+ /home/josh/Projects/Ghee/target/debug/ghee status ./btrfs/pizza
+ /home/josh/Projects/Ghee/target/debug/ghee touch ./btrfs/pizza/pepperoni
+ Check that the status is empty again, since there are no pending changes
+ /home/josh/Projects/Ghee/target/debug/ghee status ./pizza
+ Now create a pepperoni pizza
+ /home/josh/Projects/Ghee/target/debug/ghee touch ./pizza/pepperoni
+ Set text in the file itself, rather than just xattrs
+ echo 'Olives are good on pizza'
+ /home/josh/Projects/Ghee/target/debug/ghee set -s yumminess=5 ./btrfs/pizza/olive
+ /home/josh/Projects/Ghee/target/debug/ghee status ./btrfs/pizza
m./btrfs/pizza/olive
+./btrfs/pizza/pepperoni
+ /home/josh/Projects/Ghee/target/debug/ghee commit -m 'Add pepperoni; add details to olive' ./btrfs/pizza
+ /home/josh/Projects/Ghee/target/debug/ghee status ./btrfs/pizza
+ /home/josh/Projects/Ghee/target/debug/ghee log ./btrfs/pizza
commit 55bb1317-fdf8-214f-bd1d-35eafb3de4c9
+ Also set its yumminess level to 5, as an extended attribute
+ /home/josh/Projects/Ghee/target/debug/ghee set -s yumminess=5 ./pizza/olive
+ Make sure this all shows up in the status
+ FIXME The xattr changes arent reflected
+ /home/josh/Projects/Ghee/target/debug/ghee status ./pizza
m./pizza/olive
+./pizza/pepperoni
+ Commit the new changes
+ /home/josh/Projects/Ghee/target/debug/ghee commit -m 'Add pepperoni; add details to olive' ./pizza
+ Make sure status and log reflect this
+ /home/josh/Projects/Ghee/target/debug/ghee status ./pizza
+ /home/josh/Projects/Ghee/target/debug/ghee log ./pizza
commit 4fcf70ce-c2b3-8546-9c1f-87c29e639694
Add pepperoni; add details to olive
commit 67278e12-93b9-714b-a44e-9add2b473c01
commit 20c655bb-33da-4a44-9f75-91eb98af8e1a
Add olive pizza
+ /home/josh/Projects/Ghee/target/debug/ghee touch ./btrfs/pizza/buffalo-chicken
+ pushd ./btrfs/pizza
~/Projects/Ghee/example/btrfs/pizza ~/Projects/Ghee/example
+ Create a buffalo chicken pizza
+ /home/josh/Projects/Ghee/target/debug/ghee touch ./pizza/buffalo-chicken
+ pwd
/home/josh/Projects/Ghee/example/btrfs
+ pushd ./pizza
~/Projects/Ghee/example/btrfs/pizza ~/Projects/Ghee/example/btrfs
+ Check status, restore, and status again using the current directory form
+ /home/josh/Projects/Ghee/target/debug/ghee status
+./buffalo-chicken
+ /home/josh/Projects/Ghee/target/debug/ghee restore .
+ /home/josh/Projects/Ghee/target/debug/ghee status
+ popd
~/Projects/Ghee/example
+ sudo umount ./btrfs
~/Projects/Ghee/example/btrfs
+ pwd
/home/josh/Projects/Ghee/example/btrfs
+ cd ..
+ pwd
/home/josh/Projects/Ghee/example
+ sudo umount btrfs
+ for i in "${!PREFIXES[@]}"
+ Make sure we are in the base path so the relative prefix resolves properly
+ cd /home/josh/Projects/Ghee/example
+ prefix=/home/josh/Projects/Ghee/example/FSNAME
+ '======= absolute prefix: /home/josh/Projects/Ghee/example/FSNAME ======='
+ ext4img=ghee-ext4-absolute.img
+ dd if=/dev/zero of=ghee-ext4-absolute.img bs=1M count=400
+ mkfs.ext4 -L ext4-absolute ghee-ext4-absolute.img
+ sudo mount -o loop ghee-ext4-absolute.img ext4
+ sudo chown josh:josh ext4
+ fsprefix=/home/josh/Projects/Ghee/example/ext4
+ cd ext4
+ main /home/josh/Projects/Ghee/example/ext4
+ mkdir /home/josh/Projects/Ghee/example/ext4/people
+ touch /home/josh/Projects/Ghee/example/ext4/people/Sandeep /home/josh/Projects/Ghee/example/ext4/people/Sofia /home/josh/Projects/Ghee/example/ext4/people/Wulfrum
+ /home/josh/Projects/Ghee/target/debug/ghee set -s name=Sandeep -s id=2 -s state=CA /home/josh/Projects/Ghee/example/ext4/people/Sandeep
+ /home/josh/Projects/Ghee/target/debug/ghee set -s name=Sofia -s id=1 -s state=WA /home/josh/Projects/Ghee/example/ext4/people/Sofia
+ /home/josh/Projects/Ghee/target/debug/ghee set -s name=Wulfrum -s id=0 -s state=CA /home/josh/Projects/Ghee/example/ext4/people/Wulfrum
+ Check how Ghee sees the files we just set up
+ /home/josh/Projects/Ghee/target/debug/ghee get /home/josh/Projects/Ghee/example/ext4/people
./people/Sandeep user.id 2
./people/Sandeep user.name Sandeep
./people/Sandeep user.state CA
./people/Sofia user.id 1
./people/Sofia user.name Sofia
./people/Sofia user.state WA
./people/Wulfrum user.id 0
./people/Wulfrum user.name Wulfrum
./people/Wulfrum user.state CA
+ Tell Ghee what key the data is indexed by
+ /home/josh/Projects/Ghee/target/debug/ghee init -k name /home/josh/Projects/Ghee/example/ext4/people
+ Index the dataset by ID
+ /home/josh/Projects/Ghee/target/debug/ghee idx -v -k id /home/josh/Projects/Ghee/example/ext4/people /home/josh/Projects/Ghee/example/ext4/people:id
/home/josh/Projects/Ghee/example/ext4/people/Wulfrum -> /home/josh/Projects/Ghee/example/ext4/people:id/0
/home/josh/Projects/Ghee/example/ext4/people/Sandeep -> /home/josh/Projects/Ghee/example/ext4/people:id/2
/home/josh/Projects/Ghee/example/ext4/people/Sofia -> /home/josh/Projects/Ghee/example/ext4/people:id/1
+ /home/josh/Projects/Ghee/target/debug/ghee idx -v -k state -k id /home/josh/Projects/Ghee/example/ext4/people
/home/josh/Projects/Ghee/example/ext4/people/Wulfrum -> /home/josh/Projects/Ghee/example/ext4/people/:state:id/CA/0
/home/josh/Projects/Ghee/example/ext4/people/Sandeep -> /home/josh/Projects/Ghee/example/ext4/people/:state:id/CA/2
/home/josh/Projects/Ghee/example/ext4/people/Sofia -> /home/josh/Projects/Ghee/example/ext4/people/:state:id/WA/1
+ /home/josh/Projects/Ghee/target/debug/ghee ins -v /home/josh/Projects/Ghee/example/ext4/people
Initialized ./people/Janella
Linked ./people:id/3 -> ./people/Janella
Linked ./people/:state:id/FL/3 -> ./people/Janella
Initialized ./people/Lilly
Linked ./people:id/4 -> ./people/Lilly
Linked ./people/:state:id/NM/4 -> ./people/Lilly
Initialized ./people/Darrel
Linked ./people:id/5 -> ./people/Darrel
Linked ./people/:state:id/MI/5 -> ./people/Darrel
+ /home/josh/Projects/Ghee/target/debug/ghee get -a /home/josh/Projects/Ghee/example/ext4/people
user.ghee.tableinfo {"key":"name","indices_abs":{"id":"/home/josh/Projects/Ghee/example/ext4/people:id","name":"/home/josh/Projects/Ghee/example/ext4/people","state,id":"/home/josh/Projects/Ghee/example/ext4/people/:state:id"}}
./people/Darrel user.id 5
./people/Darrel user.name Darrel
./people/Darrel user.state MI
./people/Janella user.id 3
./people/Janella user.name Janella
./people/Janella user.state FL
./people/Lilly user.id 4
./people/Lilly user.name Lilly
./people/Lilly user.state NM
./people/Sandeep user.id 2
./people/Sandeep user.name Sandeep
./people/Sandeep user.state CA
./people/Sofia user.id 1
./people/Sofia user.name Sofia
./people/Sofia user.state WA
./people/Wulfrum user.id 0
./people/Wulfrum user.name Wulfrum
./people/Wulfrum user.state CA
+ /home/josh/Projects/Ghee/target/debug/ghee get -a -w state=CA -f name /home/josh/Projects/Ghee/example/ext4/people
./people/Wulfrum user.name Wulfrum
./people/Sandeep user.name Sandeep
+ /home/josh/Projects/Ghee/target/debug/ghee del -v /home/josh/Projects/Ghee/example/ext4/people -w name=Sofia
Removed ./people:id/1
Removed ./people/Sofia
Removed ./people/:state:id/WA/1
+ /home/josh/Projects/Ghee/target/debug/ghee del -v /home/josh/Projects/Ghee/example/ext4/people:id 3
Removed ./people:id/3
Removed ./people/Janella
Removed ./people/:state:id/FL/3
+ /home/josh/Projects/Ghee/target/debug/ghee del -v /home/josh/Projects/Ghee/example/ext4/people/:state:id CA 0
Removed ./people:id/0
Removed ./people/Wulfrum
Removed ./people/:state:id/CA/0
+ /home/josh/Projects/Ghee/target/debug/ghee get -a -w state=CA -f name /home/josh/Projects/Ghee/example/ext4/people/:state:id
./people/:state:id/CA/2 user.name Sandeep
+ /home/josh/Projects/Ghee/target/debug/ghee create -v /home/josh/Projects/Ghee/example/ext4/direct -k blah
Initialized table /home/josh/Projects/Ghee/example/ext4/direct with key: user.blah
+ /home/josh/Projects/Ghee/target/debug/ghee create -v /home/josh/Projects/Ghee/example/ext4/people2 -k id
Initialized table /home/josh/Projects/Ghee/example/ext4/people2 with key: user.id
Initialized ./people2/3
Initialized ./people2/4
Initialized ./people2/5
+ /home/josh/Projects/Ghee/target/debug/ghee status /home/josh/Projects/Ghee/example/ext4/people2
+./people2
+./people2/3
+./people2/4
+./people2/5
+ mkdir /home/josh/Projects/Ghee/example/ext4/empty
+ /home/josh/Projects/Ghee/target/debug/ghee status /home/josh/Projects/Ghee/example/ext4/empty
No table found
+ /home/josh/Projects/Ghee/target/debug/ghee get /home/josh/Projects/Ghee/example/ext4/empty
+ /home/josh/Projects/Ghee/target/debug/ghee get -a /home/josh/Projects/Ghee/example/ext4/empty
+ cd ..
+ sudo umount ext4
+ btrfsimg=ghee-btrfs-absolute.img
+ dd if=/dev/zero of=ghee-btrfs-absolute.img bs=1M count=114
+ mkfs.btrfs -L btrfs-absolute --rootdir empty ghee-btrfs-absolute.img
+ sudo mount -o loop ghee-btrfs-absolute.img btrfs
+ sudo chown josh:josh btrfs
+ fsprefix=/home/josh/Projects/Ghee/example/btrfs
+ cd btrfs
+ main /home/josh/Projects/Ghee/example/btrfs
+ mkdir /home/josh/Projects/Ghee/example/btrfs/people
+ touch /home/josh/Projects/Ghee/example/btrfs/people/Sandeep /home/josh/Projects/Ghee/example/btrfs/people/Sofia /home/josh/Projects/Ghee/example/btrfs/people/Wulfrum
+ /home/josh/Projects/Ghee/target/debug/ghee set -s name=Sandeep -s id=2 -s state=CA /home/josh/Projects/Ghee/example/btrfs/people/Sandeep
+ /home/josh/Projects/Ghee/target/debug/ghee set -s name=Sofia -s id=1 -s state=WA /home/josh/Projects/Ghee/example/btrfs/people/Sofia
+ /home/josh/Projects/Ghee/target/debug/ghee set -s name=Wulfrum -s id=0 -s state=CA /home/josh/Projects/Ghee/example/btrfs/people/Wulfrum
+ Check how Ghee sees the files we just set up
+ /home/josh/Projects/Ghee/target/debug/ghee get /home/josh/Projects/Ghee/example/btrfs/people
./people/Sandeep user.id 2
./people/Sandeep user.name Sandeep
./people/Sandeep user.state CA
./people/Sofia user.id 1
./people/Sofia user.name Sofia
./people/Sofia user.state WA
./people/Wulfrum user.id 0
./people/Wulfrum user.name Wulfrum
./people/Wulfrum user.state CA
+ Tell Ghee what key the data is indexed by
+ /home/josh/Projects/Ghee/target/debug/ghee init -k name /home/josh/Projects/Ghee/example/btrfs/people
+ Index the dataset by ID
+ /home/josh/Projects/Ghee/target/debug/ghee idx -v -k id /home/josh/Projects/Ghee/example/btrfs/people /home/josh/Projects/Ghee/example/btrfs/people:id
/home/josh/Projects/Ghee/example/btrfs/people/Sandeep -> /home/josh/Projects/Ghee/example/btrfs/people:id/2
/home/josh/Projects/Ghee/example/btrfs/people/Sofia -> /home/josh/Projects/Ghee/example/btrfs/people:id/1
/home/josh/Projects/Ghee/example/btrfs/people/Wulfrum -> /home/josh/Projects/Ghee/example/btrfs/people:id/0
+ /home/josh/Projects/Ghee/target/debug/ghee idx -v -k state -k id /home/josh/Projects/Ghee/example/btrfs/people
/home/josh/Projects/Ghee/example/btrfs/people/Sandeep -> /home/josh/Projects/Ghee/example/btrfs/people/:state:id/CA/2
/home/josh/Projects/Ghee/example/btrfs/people/Sofia -> /home/josh/Projects/Ghee/example/btrfs/people/:state:id/WA/1
/home/josh/Projects/Ghee/example/btrfs/people/Wulfrum -> /home/josh/Projects/Ghee/example/btrfs/people/:state:id/CA/0
+ /home/josh/Projects/Ghee/target/debug/ghee ins -v /home/josh/Projects/Ghee/example/btrfs/people
Initialized ./people/Janella
Linked ./people:id/3 -> ./people/Janella
Linked ./people/:state:id/FL/3 -> ./people/Janella
Initialized ./people/Lilly
Linked ./people:id/4 -> ./people/Lilly
Linked ./people/:state:id/NM/4 -> ./people/Lilly
Initialized ./people/Darrel
Linked ./people:id/5 -> ./people/Darrel
Linked ./people/:state:id/MI/5 -> ./people/Darrel
+ /home/josh/Projects/Ghee/target/debug/ghee get -a /home/josh/Projects/Ghee/example/btrfs/people
user.ghee.tableinfo {"key":"name","indices_abs":{"id":"/home/josh/Projects/Ghee/example/btrfs/people:id","name":"/home/josh/Projects/Ghee/example/btrfs/people","state,id":"/home/josh/Projects/Ghee/example/btrfs/people/:state:id"}}
./people/Darrel user.id 5
./people/Darrel user.name Darrel
./people/Darrel user.state MI
./people/Janella user.id 3
./people/Janella user.name Janella
./people/Janella user.state FL
./people/Lilly user.id 4
./people/Lilly user.name Lilly
./people/Lilly user.state NM
./people/Sandeep user.id 2
./people/Sandeep user.name Sandeep
./people/Sandeep user.state CA
./people/Sofia user.id 1
./people/Sofia user.name Sofia
./people/Sofia user.state WA
./people/Wulfrum user.id 0
./people/Wulfrum user.name Wulfrum
./people/Wulfrum user.state CA
+ /home/josh/Projects/Ghee/target/debug/ghee get -a -w state=CA -f name /home/josh/Projects/Ghee/example/btrfs/people
./people/Wulfrum user.name Wulfrum
./people/Sandeep user.name Sandeep
+ /home/josh/Projects/Ghee/target/debug/ghee del -v /home/josh/Projects/Ghee/example/btrfs/people -w name=Sofia
Removed ./people:id/1
Removed ./people/Sofia
Removed ./people/:state:id/WA/1
+ /home/josh/Projects/Ghee/target/debug/ghee del -v /home/josh/Projects/Ghee/example/btrfs/people:id 3
Removed ./people:id/3
Removed ./people/Janella
Removed ./people/:state:id/FL/3
+ /home/josh/Projects/Ghee/target/debug/ghee del -v /home/josh/Projects/Ghee/example/btrfs/people/:state:id CA 0
Removed ./people:id/0
Removed ./people/Wulfrum
Removed ./people/:state:id/CA/0
+ /home/josh/Projects/Ghee/target/debug/ghee get -a -w state=CA -f name /home/josh/Projects/Ghee/example/btrfs/people/:state:id
./people/:state:id/CA/2 user.name Sandeep
+ /home/josh/Projects/Ghee/target/debug/ghee create -v /home/josh/Projects/Ghee/example/btrfs/direct -k blah
Initialized table /home/josh/Projects/Ghee/example/btrfs/direct with key: user.blah
+ /home/josh/Projects/Ghee/target/debug/ghee create -v /home/josh/Projects/Ghee/example/btrfs/people2 -k id
Initialized table /home/josh/Projects/Ghee/example/btrfs/people2 with key: user.id
Initialized ./people2/3
Initialized ./people2/4
Initialized ./people2/5
+ /home/josh/Projects/Ghee/target/debug/ghee status /home/josh/Projects/Ghee/example/btrfs/people2
+./people2
+./people2/3
+./people2/4
+./people2/5
+ mkdir /home/josh/Projects/Ghee/example/btrfs/empty
+ /home/josh/Projects/Ghee/target/debug/ghee status /home/josh/Projects/Ghee/example/btrfs/empty
No table found
+ /home/josh/Projects/Ghee/target/debug/ghee get /home/josh/Projects/Ghee/example/btrfs/empty
+ /home/josh/Projects/Ghee/target/debug/ghee get -a /home/josh/Projects/Ghee/example/btrfs/empty
+ btrfs /home/josh/Projects/Ghee/example/btrfs
+ Sanity check status and log on an empty directory
+ /home/josh/Projects/Ghee/target/debug/ghee status /home/josh/Projects/Ghee/example/btrfs
No table found
+ /home/josh/Projects/Ghee/target/debug/ghee log
No table found; no log exists
+ Create a pizza table
+ /home/josh/Projects/Ghee/target/debug/ghee create -v -k toppings /home/josh/Projects/Ghee/example/btrfs/pizza
Initialized table /home/josh/Projects/Ghee/example/btrfs/pizza with key: user.toppings
+ Make sure the status is empty
+ /home/josh/Projects/Ghee/target/debug/ghee status /home/josh/Projects/Ghee/example/btrfs/pizza
+./pizza
+ Create a record representing an olive pizza
+ /home/josh/Projects/Ghee/target/debug/ghee touch /home/josh/Projects/Ghee/example/btrfs/pizza/olive
+ Check that the new record shows up the status
+ /home/josh/Projects/Ghee/target/debug/ghee status /home/josh/Projects/Ghee/example/btrfs/pizza
+./pizza
+./pizza/olive
+ Commit the change with a helpful comment
+ /home/josh/Projects/Ghee/target/debug/ghee commit -m 'Add olive pizza' /home/josh/Projects/Ghee/example/btrfs/pizza
+ Make sure the new commit shows up in the log
+ /home/josh/Projects/Ghee/target/debug/ghee log /home/josh/Projects/Ghee/example/btrfs/pizza
commit 05aee894-48f1-3944-b04d-516f026b58c4
Add olive pizza
+ Check that the status is empty again, since there are no pending changes
+ /home/josh/Projects/Ghee/target/debug/ghee status /home/josh/Projects/Ghee/example/btrfs/pizza
+ Now create a pepperoni pizza
+ /home/josh/Projects/Ghee/target/debug/ghee touch /home/josh/Projects/Ghee/example/btrfs/pizza/pepperoni
+ Set text in the file itself, rather than just xattrs
+ echo 'Olives are good on pizza'
+ Also set its yumminess level to 5, as an extended attribute
+ /home/josh/Projects/Ghee/target/debug/ghee set -s yumminess=5 /home/josh/Projects/Ghee/example/btrfs/pizza/olive
+ Make sure this all shows up in the status
+ FIXME The xattr changes arent reflected
+ /home/josh/Projects/Ghee/target/debug/ghee status /home/josh/Projects/Ghee/example/btrfs/pizza
m./pizza/olive
+./pizza/pepperoni
+ Commit the new changes
+ /home/josh/Projects/Ghee/target/debug/ghee commit -m 'Add pepperoni; add details to olive' /home/josh/Projects/Ghee/example/btrfs/pizza
+ Make sure status and log reflect this
+ /home/josh/Projects/Ghee/target/debug/ghee status /home/josh/Projects/Ghee/example/btrfs/pizza
+ /home/josh/Projects/Ghee/target/debug/ghee log /home/josh/Projects/Ghee/example/btrfs/pizza
commit 41afa3d4-0f15-3349-833d-efd4bccd6117
Add pepperoni; add details to olive
commit 05aee894-48f1-3944-b04d-516f026b58c4
Add olive pizza
+ Create a buffalo chicken pizza
+ /home/josh/Projects/Ghee/target/debug/ghee touch /home/josh/Projects/Ghee/example/btrfs/pizza/buffalo-chicken
+ pwd
/home/josh/Projects/Ghee/example/btrfs
+ pushd /home/josh/Projects/Ghee/example/btrfs/pizza
~/Projects/Ghee/example/btrfs/pizza ~/Projects/Ghee/example/btrfs
+ Check status, restore, and status again using the current directory form
+ /home/josh/Projects/Ghee/target/debug/ghee status
+./buffalo-chicken
+ /home/josh/Projects/Ghee/target/debug/ghee restore .
+ /home/josh/Projects/Ghee/target/debug/ghee status
+ popd
~/Projects/Ghee/example/btrfs
+ pwd
/home/josh/Projects/Ghee/example/btrfs
+ cd ..
+ pwd
/home/josh/Projects/Ghee/example
+ sudo umount btrfs
+ cd ..