Commits

Yuya Nishihara committed 2c0d1c8 Merge

merged with default

Comments (0)

Files changed (1)

advanced/2010-02-11-merging-mq-patches-with-rebase.html

+{% extends "_tip.html" %}
+{%hyde
+    title: Merging MQ Patches with Rebase
+    author_name: Steve Losh
+    author_link: http://stevelosh.com/
+    created: 2010-02-11
+%}
+
+
+{% block excerpt %}
+MQ patches don't usually merge well, but you can use the rebase extension to
+fix that!
+{% endblock %}
+
+
+{% block tip %}
+
+**First of all:** I want to try something new with this tip. This is the first
+tip that includes a screencast. It's a complex topic and I think a screencast
+is the best way to talk about it. Please post a comment and let me know if you
+like it or if you think hgtip should stick to text-only tips!
+
+This tip is for those of you that are familiar and comfortable with using
+[MQ][] to handle patches. If you use MQ regularly you may have noticed some
+problems. One of the biggest problems appears when you have some patches and
+someone else commits something that changes the files you're working on.
+
+[MQ]: http://mercurial.selenic.com/wiki/MqExtension
+
+The normal workflow is to pull their changes, `qpop` your patches, update to
+the new repository (or branch) tip, and `qpush` your patches. Unfortunately MQ
+doesn't keep track of the parents of patches, so it can't intelligently merge
+changes when you `qpush`.
+
+The way to get around this limitation is to use the [rebase extension][] to
+rebase your MQ patches while they're still applied. I'll demonstrate how to do
+this in the screencast below:
+
+[rebase extension]: http://mercurial.selenic.com/wiki/RebaseExtension
+
+<div class="screencast">
+<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0' width='560' height='345'><param name='movie' value='http://screenr.com/Content/assets/screenr_1116090935.swf' /><param name='flashvars' value='i=46386' /><param name='allowFullScreen' value='true' /><embed src='http://screenr.com/Content/assets/screenr_1116090935.swf' flashvars='i=46386' allowFullScreen='true' width='560' height='345' pluginspage='http://www.macromedia.com/go/getflashplayer'></embed></object>
+</div>
+
+{% endblock %}