Skip to content

Instantly share code, notes, and snippets.

@smailliwcs
Created September 22, 2020 15:24
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 smailliwcs/6eddcb1bf2f75c6524d3dc9059f3bb9d to your computer and use it in GitHub Desktop.
Save smailliwcs/6eddcb1bf2f75c6524d3dc9059f3bb9d to your computer and use it in GitHub Desktop.
Mercurial and upstream CVS with MQ
# Set up repo
cvs checkout repo
cd repo
hg init
>> .hgignore echo syntax: glob
>> .hgignore echo CVS/*
>> .hgignore echo .cvsignore
# Consult .cvsignore files
hg addremove
# Verify pending changes
hg commit -m "Upstream import."
hg init --mq
hg commit --mq -m "Initial import."
# Create patches
hg qnew -m MESSAGE PATCH
# Make changes
hg qrefresh -UD
# Repeat as needed
# Tag queue
hg qnew -m "Add tag TAG." TAG
>> .mqtags echo TAG
hg add .mqtags # Only for the first tag
hg qrefresh -UD
# Now you can `hg qgoto TAG`
# Save queue
hg commit --mq -m MESSAGE
# Update from upstream
hg update qparent
cvs update
# Consult .cvsignore files
hg addremove
# Verify pending changes
hg commit -m "Upstream update."
hg update qtip
hg rebase
# Fix merge conflicts
hg commit --mq -m "Rebase to upstream."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment