Snapshot test reset

This commit is contained in:
Josh Hansen 2023-10-01 23:49:24 -07:00
parent 9390ac92d2
commit fce82f2ea7
2 changed files with 42 additions and 20 deletions

View file

@ -109,7 +109,7 @@ btrfs() {
$GHEE status $1/pizza
Commit the change with a helpful comment 2> /dev/null
$GHEE commit -m "Add olive pizza" $1/pizza
commit1=$($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
@ -131,7 +131,7 @@ btrfs() {
$GHEE status $1/pizza
Commit the new changes 2> /dev/null
$GHEE commit -m "Add pepperoni; add details to olive" $1/pizza
commit2=$($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
@ -153,6 +153,12 @@ btrfs() {
$GHEE status
$GHEE ls
$GHEE reset $commit1
$GHEE ls
popd
pwd
}

View file

@ -36,12 +36,12 @@
+ /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/Wulfrum -> ./people:id/0
./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/Wulfrum -> ./people/:state:id/CA/0
./people/Sandeep -> ./people/:state:id/CA/2
+ /home/josh/Projects/Ghee/target/debug/ghee ins -v ./people
Initialized ./people/Janella
@ -227,11 +227,11 @@ Initialized table ./pizza with key: user.toppings
+./pizza
+./pizza/olive
+ Commit the change with a helpful comment
+ /home/josh/Projects/Ghee/target/debug/ghee commit -m 'Add olive pizza' ./pizza
0dc9de01-08d3-384d-ac5d-c8e7f7eede8d
++ /home/josh/Projects/Ghee/target/debug/ghee commit -m 'Add olive pizza' ./pizza
+ commit1=cb4b5763-902e-ca4d-a600-d69a6719b044
+ 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
commit cb4b5763-902e-ca4d-a600-d69a6719b044
Add olive pizza
@ -249,16 +249,16 @@ commit 20c655bb-33da-4a44-9f75-91eb98af8e1a
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
ae56b31b-c5e3-c94d-9dc9-4b714635c23e
++ /home/josh/Projects/Ghee/target/debug/ghee commit -m 'Add pepperoni; add details to olive' ./pizza
+ commit2=a58c5f48-8f17-ed4a-a10a-68ea074f39dc
+ 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
commit a58c5f48-8f17-ed4a-a10a-68ea074f39dc
Add pepperoni; add details to olive
commit 20c655bb-33da-4a44-9f75-91eb98af8e1a
commit cb4b5763-902e-ca4d-a600-d69a6719b044
Add olive pizza
@ -273,6 +273,14 @@ commit 20c655bb-33da-4a44-9f75-91eb98af8e1a
+./buffalo-chicken
+ /home/josh/Projects/Ghee/target/debug/ghee restore .
+ /home/josh/Projects/Ghee/target/debug/ghee status
+ /home/josh/Projects/Ghee/target/debug/ghee ls
:snapshots table
olive record
pepperoni record
+ /home/josh/Projects/Ghee/target/debug/ghee reset cb4b5763-902e-ca4d-a600-d69a6719b044
+ /home/josh/Projects/Ghee/target/debug/ghee ls
:snapshots table
olive record
+ popd
~/Projects/Ghee/snapshot/btrfs
+ pwd
@ -314,13 +322,13 @@ commit 20c655bb-33da-4a44-9f75-91eb98af8e1a
+ /home/josh/Projects/Ghee/target/debug/ghee init -k name /home/josh/Projects/Ghee/snapshot/ext4/people
+ Index the dataset by ID
+ /home/josh/Projects/Ghee/target/debug/ghee idx -v -k id /home/josh/Projects/Ghee/snapshot/ext4/people /home/josh/Projects/Ghee/snapshot/ext4/people:id
/home/josh/Projects/Ghee/snapshot/ext4/people/Sofia -> /home/josh/Projects/Ghee/snapshot/ext4/people:id/1
/home/josh/Projects/Ghee/snapshot/ext4/people/Sandeep -> /home/josh/Projects/Ghee/snapshot/ext4/people:id/2
/home/josh/Projects/Ghee/snapshot/ext4/people/Wulfrum -> /home/josh/Projects/Ghee/snapshot/ext4/people:id/0
/home/josh/Projects/Ghee/snapshot/ext4/people/Sofia -> /home/josh/Projects/Ghee/snapshot/ext4/people:id/1
+ /home/josh/Projects/Ghee/target/debug/ghee idx -v -k state -k id /home/josh/Projects/Ghee/snapshot/ext4/people
/home/josh/Projects/Ghee/snapshot/ext4/people/Sofia -> /home/josh/Projects/Ghee/snapshot/ext4/people/:state:id/WA/1
/home/josh/Projects/Ghee/snapshot/ext4/people/Sandeep -> /home/josh/Projects/Ghee/snapshot/ext4/people/:state:id/CA/2
/home/josh/Projects/Ghee/snapshot/ext4/people/Wulfrum -> /home/josh/Projects/Ghee/snapshot/ext4/people/:state:id/CA/0
/home/josh/Projects/Ghee/snapshot/ext4/people/Sofia -> /home/josh/Projects/Ghee/snapshot/ext4/people/:state:id/WA/1
+ /home/josh/Projects/Ghee/target/debug/ghee ins -v /home/josh/Projects/Ghee/snapshot/ext4/people
Initialized ./people/Janella
Linked ./people:id/3 -> ./people/Janella
@ -505,11 +513,11 @@ Initialized table /home/josh/Projects/Ghee/snapshot/btrfs/pizza with key: user.t
+./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/snapshot/btrfs/pizza
736136e1-43c0-cd44-81b7-a705e5f58ea0
++ /home/josh/Projects/Ghee/target/debug/ghee commit -m 'Add olive pizza' /home/josh/Projects/Ghee/snapshot/btrfs/pizza
+ commit1=26639c6a-e730-e94b-9438-099e8674068c
+ Make sure the new commit shows up in the log
+ /home/josh/Projects/Ghee/target/debug/ghee log /home/josh/Projects/Ghee/snapshot/btrfs/pizza
commit 05aee894-48f1-3944-b04d-516f026b58c4
commit 26639c6a-e730-e94b-9438-099e8674068c
Add olive pizza
@ -527,16 +535,16 @@ commit 05aee894-48f1-3944-b04d-516f026b58c4
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/snapshot/btrfs/pizza
90f70b63-0100-e046-b7fc-062029f1e4a7
++ /home/josh/Projects/Ghee/target/debug/ghee commit -m 'Add pepperoni; add details to olive' /home/josh/Projects/Ghee/snapshot/btrfs/pizza
+ commit2=dd1fdd4f-8731-3f4c-abca-aad2948645b8
+ Make sure status and log reflect this
+ /home/josh/Projects/Ghee/target/debug/ghee status /home/josh/Projects/Ghee/snapshot/btrfs/pizza
+ /home/josh/Projects/Ghee/target/debug/ghee log /home/josh/Projects/Ghee/snapshot/btrfs/pizza
commit 41afa3d4-0f15-3349-833d-efd4bccd6117
commit dd1fdd4f-8731-3f4c-abca-aad2948645b8
Add pepperoni; add details to olive
commit 05aee894-48f1-3944-b04d-516f026b58c4
commit 26639c6a-e730-e94b-9438-099e8674068c
Add olive pizza
@ -551,6 +559,14 @@ commit 05aee894-48f1-3944-b04d-516f026b58c4
+./buffalo-chicken
+ /home/josh/Projects/Ghee/target/debug/ghee restore .
+ /home/josh/Projects/Ghee/target/debug/ghee status
+ /home/josh/Projects/Ghee/target/debug/ghee ls
:snapshots table
olive record
pepperoni record
+ /home/josh/Projects/Ghee/target/debug/ghee reset 26639c6a-e730-e94b-9438-099e8674068c
+ /home/josh/Projects/Ghee/target/debug/ghee ls
:snapshots table
olive record
+ popd
~/Projects/Ghee/snapshot/btrfs
+ pwd