Skip to content

Commit

Permalink
demos: update demos as little as possible to regenerate them
Browse files Browse the repository at this point in the history
This updates demos to the point where they can run without
warnings. Some of them become less clear, this is addressed
(where I noticed it) in follow-up commits.

Fixes jj-vcs#3209
  • Loading branch information
ilyagr committed Sep 5, 2024
1 parent d3fdf53 commit 203874c
Show file tree
Hide file tree
Showing 9 changed files with 426 additions and 398 deletions.
6 changes: 3 additions & 3 deletions demos/demo_juggle_conflicts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ new_tmp_dir
echo "third" > file
jj branch create third
jj commit -m 'third'
) >/dev/null
) >/dev/null 2>&1

comment "We are in a repo with three commits, all
editing the same line:"
Expand All @@ -33,13 +33,13 @@ interesting is that the top commit has no conflict! That's because it
has the changes from all three commits applied to it.
Let's verify that by looking at its contents:"
run_command "jj co second"
run_command "jj new second"
run_command "cat file"

comment "Let's now instead make \"second\" and \"third\"
sibling and merge them:"
run_command "jj rebase -s second -d first"
run_command "jj merge second third -m merged"
run_command "jj new second third -m merged"
run_command "jj log"
comment "Again, because the merge commit has the
changes from all three commits, it has no
Expand Down
7 changes: 4 additions & 3 deletions demos/demo_operation_log.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ new_tmp_dir
{
jj git clone https://github.com/octocat/Hello-World
cd Hello-World
jj abandon octocat-patch-1
jj abandon --ignore-immutable octocat-patch-1@origin
jj branch forget octocat-patch-1
} > /dev/null
jj branch track test@origin
} > /dev/null 2>&1

comment "We are in the octocat/Hello-World repo.
The \"operation log\" shows the operations
Expand All @@ -24,7 +25,7 @@ run_command "jj rebase -d test"

comment "We are now going to make another change off of
master:"
run_command "jj co master"
run_command "jj new master"
run_command "jj describe -m \"other stuff\""

comment "The repo now looks like this:"
Expand Down
4 changes: 2 additions & 2 deletions demos/demo_resolve_conflicts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ new_tmp_dir
{
jj git clone https://github.com/octocat/Hello-World
cd Hello-World
jj abandon test
jj abandon --ignore-immutable test@origin
jj branch forget test
} > /dev/null
} > /dev/null 2>&1

comment "We are on the master branch of the
octocat/Hello-World repo:"
Expand Down
8 changes: 4 additions & 4 deletions demos/demo_working_copy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ new_tmp_dir
{
jj git clone https://github.com/octocat/Hello-World
cd Hello-World
jj abandon test
jj abandon --ignore-immutable test@origin
jj branch forget test
jj abandon octocat-patch-1
jj abandon --ignore-immutable octocat-patch-1@origin
jj branch forget octocat-patch-1
}> /dev/null
}> /dev/null 2>&1

comment "We are in the octocat/Hello-World repo.
We have an empty working copy on top of master:"
Expand All @@ -31,7 +31,7 @@ run_command "jj branch create goodbye"
run_command "jj log"

comment "Start working on a new change off of master:"
run_command "jj co master"
run_command "jj new master"
comment "Note that we were told the working copy is now empty (AKA clean). The
\"goodbye\" change stayed in its own commit:"

Expand Down
94 changes: 49 additions & 45 deletions demos/git_compat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
146 changes: 77 additions & 69 deletions demos/juggle_conflicts.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
250 changes: 127 additions & 123 deletions demos/operation_log.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
163 changes: 85 additions & 78 deletions demos/resolve_conflicts.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
146 changes: 75 additions & 71 deletions demos/working_copy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 203874c

Please sign in to comment.