Skip to content

Instantly share code, notes, and snippets.

@fmitha
Created March 25, 2018 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fmitha/93ba709fb90de904ea493a40d2442a9c to your computer and use it in GitHub Desktop.
Save fmitha/93ba709fb90de904ea493a40d2442a9c to your computer and use it in GitHub Desktop.
#!/bin/bash
set -x
rm -rf foo foo-remote
hg init foo-remote
hg clone foo-remote foo
cd foo
echo "This is foo" >> foo
hg add foo
hg ci -m "Add foo"
hg -v push
echo "Add line" >> foo
hg ci -m "Add line"
hg -v push
hg phase -d -f
hg amend -m "Add line (amendment 1)"
OUTPUT="$(hg strip 1 --hidden)"
OUTPUTARR=($OUTPUT)
echo "OUTPUT is ${OUTPUT}"
echo "OUTPUTARR is ${OUTPUTARR[4]}"
hg unbundle -u ${OUTPUTARR[4]}
hg -v push
hg in
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment