view evolve-session @ 33:7fb4764757b1 default tip @

Explain that obsolete commands are only shared as needed
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Tue, 11 Mar 2014 17:03:02 -0400
parents 3df93a421f8d
children
line wrap: on
line source

# Let's grab the Python Code of Conduct and have a look
hg clone http://hg.python.org/coc/
cd coc
hg log -G
ls

# Now let's add a couple of bookmarks
hg book upstream
hg book jordi

# And make two changes
fold -s -w 72 CodeOfConduct.rst > /tmp/coc && mv /tmp/coc CodeOfConduct.rst
sed -i 's/ $//' CodeOfConduct.rst
hg ci -m "Word-wrap CodeOfConduct"
sed -i 's/Python/Cobra/g' CodeOfConduct.rst
hg ci -m "Change Python's name to something much cooler"

# Where were we?
hg log -G
hg diff -c 3

# Wait, Cobra is not a community
sed -i 's/community/command/g' CodeOfConduct.rst
hg ci -m "Cobra Command is not a community"

hg log -G

# Command should be capitalised
sed -i 's/command/Command/g' CodeOfConduct.rst
hg amend

hg log -G

# Wait, we forgot to update the README
hg prev
hg log -G
sed -i "s/Python Software Foundation/Cobra Commander HQ/g" README
sed -i "s/PSF/CCHQ/g" README
cat README
hg amend

# What's this about unstable csets?
hg log -G
hg evolve
hg log -G

# What if we try to drop an old commit?
hg prune -r upstream

!RET

# Clone repo again...
hg clone http://hg.python.org/coc/ ../coc-other
hg push -B jordi -B upstream ../coc-other

# Let's see here...
hg log -G --hidden
cd ../coc-other
hg log -G --hidden
hg update jordi

# Fold both commits into one
hg fold jordi jordi^ -m "Rename the Python CoC to the Cobra CoC"
hg log -G
hg log -pvr jordi

# Return
cd ../coc
hg pull ../coc-other
hg log -G
hg evolve
hg log -G

!RET