demos: make comment lines shorter, to better fit on mobile

This commit is contained in:
Martin von Zweigbergk 2021-10-27 15:07:46 -07:00
parent 6687f98d8a
commit 04e54b093d
3 changed files with 41 additions and 21 deletions

View File

@ -9,21 +9,26 @@ cd Hello-World
run_demo 'The entire repo is under version control' '
run_command "# We are in the octocat/Hello-World repo."
run_command "# The \"operation log\" shows the operations so far:"
run_command "# The \"operation log\" shows the operations"
run_command "# so far:"
run_command "jj op log"
pause 7
run_command "# We are going to make some changes so we can see how the operation log works."
run_command "# We are currently working off of the \"master\" branch:"
run_command "# We are going to make some changes to show"
run_command "# how the operation log works."
run_command "# We are currently working off of the \"master\""
run_command "# branch:"
run_command "jj log"
pause 5
run_command "# Let'\''s add a file, set a description, and rebase onto the \"test\" branch:"
run_command "# Let'\''s add a file, set a description, and"
run_command "# rebase onto the \"test\" branch:"
run_command "echo stuff > new-file"
pause 2
run_command "jj describe -m stuff"
pause 2
run_command "jj rebase -d test"
pause 2
run_command "# We are now going to make another change off of master:"
run_command "# We are now going to make another change off of"
run_command "# master:"
run_command "jj co master"
pause 1
run_command "jj describe -m \"other stuff\""
@ -42,15 +47,18 @@ pause 7
run_command "# Let'\''s undo that rebase operation:"
run_command "jj undo -o $rebase_op"
pause 3
run_command "# The \"stuff\" change is now back on master as expected:"
run_command "# The \"stuff\" change is now back on master as"
run_command "# expected:"
run_command "jj log"
pause 5
run_command "# We can also see what the repo looked like after the rebase operation:"
run_command "# We can also see what the repo looked like"
run_command "# after the rebase operation:"
run_command "jj --at-op $rebase_op log"
pause 5
run_command "# Looks nice, let'\''s go back to that point:"
run_command "jj op restore -o $rebase_op"
pause 2
run_command "# We'\''re now back to before the \"other stuff\" change existed:"
run_command "# We'\''re now back to before the \"other stuff\""
run_command "# change existed:"
run_command "jj log"
'

View File

@ -8,34 +8,42 @@ jj git clone https://github.com/octocat/Hello-World
cd Hello-World
run_demo 'Basic conflict resolution flow' '
run_command "# We are on the master branch of the octocat/Hello-World repo:"
run_command "# We are on the master branch of the"
run_command "# octocat/Hello-World repo:"
run_command "jj log"
pause 7
run_command "# Let'\''s make an edit that will conflict when we rebase it:"
run_command "jj describe -m \"README: be specific about which world\""
run_command "# Let'\''s make an edit that will conflict"
run_command "# when we rebase it:"
run_command "jj describe -m \"README: say which world\""
run_command "echo \"Hello Earth!\" > README"
run_command "jj diff"
pause 2
run_command "# We'\''re going to rebase it onto commit b1. That commit looks like this:"
run_command "# We'\''re going to rebase it onto commit b1."
run_command "# That commit looks like this:"
run_command "jj diff -r b1"
pause 2
run_command "# Now rebase:"
run_command "jj rebase -d b1"
run_command "# Huh, that seemed to succeed. Let'\''s take a look at the repo:"
run_command "# Huh, that seemed to succeed. Let'\''s take a"
run_command "# look at the repo:"
pause 3
run_command "jj log"
pause 5
run_command "# As you can see, the rebased commit has a conflict. The working copy is on top of the conflict."
run_command "# The file in the working copy looks like this:"
run_command "# As you can see, the rebased commit has a"
run_command "# conflict. The working copy is on top of the"
run_command "# conflict. The file in the working copy looks"
run_command "# like this:"
run_command "cat README"
pause 5
run_command "# Now we will resolve the conflict:"
run_command "echo \"Hello earth!\" > README"
pause 2
run_command "# The diff of the conflict resolution looks like this:"
run_command "# The diff of the conflict resolution looks"
run_command "# like this:"
run_command "jj diff"
pause 5
run_command "# We now squash the conflict resolution into the conflicted parent change:"
run_command "# We now squash the conflict resolution into"
run_command "# the conflicted parent change:"
run_command "jj squash"
pause 2
run_command "# Looks good now:"

View File

@ -17,22 +17,26 @@ pause 2
run_command "# Now make some changes in the working copy:"
run_command "echo \"Goodbye World!\" > README"
run_command "echo stuff > new-file"
run_command "# Our working copy'\''s commit ID changed because we made changes:"
run_command "# Our working copy'\''s commit ID changed"
run_command "# because we made changes:"
run_command "jj status"
pause 5
run_command "# Add a branch so we can easily refer to this commit:"
run_command "# Add a branch so we can easily refer to this"
run_command "# commit:"
run_command "jj branch goodbye"
pause 2
run_command "# Start working on a new change off of master:"
run_command "jj co master"
pause 2
run_command "# Note that the working copy is now clean; the \"goodbye\" change stayed in its own commit:"
run_command "# Note that the working copy is now clean; the"
run_command "# \"goodbye\" change stayed in its own commit:"
run_command "jj status"
pause 5
run_command "# Modify a file in this new change:"
run_command "echo \"Hello everyone!\" > README"
pause 2
run_command "# The working copy is not special; we can, for example, set the description of any commit."
run_command "# The working copy is not special; we can, for"
run_command "# example, set the description of any commit."
run_command "# First, set it on the working copy:"
run_command "jj describe -m everyone"
pause 2