echo echo 'Creating repo...' mkdir c1 cd c1 hg init echo echo 'Creating branches...' hg branch 2.7 echo foo> 27.txt hg add hg ci -m 'create 2.7 branch and add a file' hg branch 3.1 echo foo> 31.txt hg add hg ci -m 'create 3.1 branch and add a file' hg branch 3.2 echo foo> 32.txt hg add hg ci -m 'create 3.2 branch and add a file' hg branch default echo foo> default.txt hg add hg ci -m 'create default branch and add a file' echo echo 'Create and merge a few changesets...' hg up 3.1 echo bar> 31.txt hg ci -m 'change 3.1' hg up 3.2 hg merge 3.1 hg ci -m 'merge with 3.1' hg up default hg merge 3.2 hg ci -m 'merge with 3.2' echo echo 'The following branches are now available...' hg branches echo echo 'Downloading and setting up hook...' wget http://bugs.python.org/file27171/checkmerge.py echo '[hooks]'> .hg/hgrc echo 'pretxnchangegroup.checkmerge = python:checkmerge.py:hook'>> .hg/hgrc echo echo 'Creating a new clone...' cd .. hg clone c1 c2 echo echo 'Setup complete' echo 'Now cd in c2, try to commit something, push it, and try to break my hook.'

AltStyle によって変換されたページ (->オリジナル) /