Skip to content

Instantly share code, notes, and snippets.

@fmitha
Created June 14, 2023 19:43
Show Gist options
  • Save fmitha/9d4da528e68f59e8381af21bf7df8ffb to your computer and use it in GitHub Desktop.
Save fmitha/9d4da528e68f59e8381af21bf7df8ffb to your computer and use it in GitHub Desktop.
rm -rf test-shelve2
hg init test-shelve2
cd test-shelve2
echo "First line of foo.txt" >> foo.txt
hg add foo.txt
hg ci -m "Add foo.txt"
echo "Second line of foo.txt" >> foo.txt
hg ci -m "foo.txt second line"
hg topic bar
echo "First line of bar.txt" >> bar.txt
hg add bar.txt
hg ci -m "Add bar.txt"
echo "Second line of bar.txt" >> bar.txt
hg ci -m "bar.txt second line"
find . -type f -name '*.txt' -exec sed -i 's/Second line/Second Line/g' {} +
hg shelve
hg shelve -p
hg up default
hg unshelve
hg status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment