On Thu, Nov 14, 2013 at 1:29 PM, Saint Germain <[email protected]> wrote:
> On Thu, 14 Nov 2013 12:25:16 -0500, Olemis Lang <[email protected]> > wrote : > > [...] > Can you tell me what is the best way to apply several patch with your > method ? > Is this the right way: > - switch to patch1 branch > - use qpush > - switch to patch2 branch > - use qpush > But after that if I want to qpop, won't it get a bit messy ? > All patches are in a single branch e.g. {{{ There are many patches in a single branch e.g. in {{{#!sh $ hg qclone https://bitbucket.org/olemis/bloodhound-mq requesting all changes adding changesets adding manifests adding file changes added 484 changesets with 3175 changes to 1197 files (+12 heads) requesting all changes adding changesets adding manifests adding file changes added 482 changesets with 777 changes to 238 files (+45 heads) updating to branch default 2 files updated, 0 files merged, 0 files removed, 0 files unresolved 1052 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd bloodhound-mq/ $ hg log -r tip changeset: 483:c73c0611396d tag: svn-1541418 tag: tip user: rjollos@13f79535-47bb-0310-9956-ffa450edef68 date: Wed Nov 13 08:13:30 2013 +0000 summary: 0.8dev: Removed borders from fieldset-enclosed tables on Query page. $ hg branches --mq | grep t694 t694_bh_i18n 475:d4259dfb20f5 (inactive) $ hg update --mq t694_bh_i18n 4 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg qseries t707/t707_r1536966_test_discovery_logging.diff t706/t706_r1536966_AssertRaisesContext_import.diff t694/t694_r1534486_bloodhound_i18n.diff $ hg qpush -a applying t707/t707_r1536966_test_discovery_logging.diff patching file bloodhound_multiproduct/tests/__init__.py Hunk #1 FAILED at 15 Hunk #2 FAILED at 49 2 out of 3 hunks FAILED -- saving rejects to file bloodhound_multiproduct/tests/__init__.py.rej patch failed, unable to continue (try -v) patch failed, rejects left in working dir errors during apply, please fix and refresh t707/t707_r1536966_test_discovery_logging.diff }}} The error above is caused by the fact that the first two patches in the queue have been applied already in /trunk . After editing MQ series file this is what I get {{{#!sh $ hg qpop -a popping t707/t707_r1536966_test_discovery_logging.diff patch queue now empty $ find . -name "*.rej" | xargs -I file rm -v file removed `./bloodhound_multiproduct/tests/__init__.py.rej' $ vim .hg/patches/series $ cat .hg/patches/series #t707/t707_r1536966_test_discovery_logging.diff #t706/t706_r1536966_AssertRaisesContext_import.diff t694/t694_r1534486_bloodhound_i18n.diff $ hg qseries t694/t694_r1534486_bloodhound_i18n.diff $ hg qpush -a applying t694/t694_r1534486_bloodhound_i18n.diff patching file bloodhound_multiproduct/setup.py Hunk #2 FAILED at 58 Hunk #3 succeeded at 74 with fuzz 2 (offset 1 lines). 1 out of 3 hunks FAILED -- saving rejects to file bloodhound_multiproduct/setup.py.rej patch failed, unable to continue (try -v) patch failed, rejects left in working dir errors during apply, please fix and refresh t694/t694_r1534486_bloodhound_i18n.diff $ cat bloodhound_multiproduct/setup.py.rej --- setup.py +++ setup.py @@ -40,8 +59,9 @@ author = "Apache Bloodhound", license = "Apache License v2", url = "https://bloodhound.apache.org/", - packages = ['multiproduct', 'multiproduct.ticket', 'tests',], - package_data = {'multiproduct' : ['templates/*.html',]}, + packages = ['multiproduct', 'multiproduct.ticket', 'multiproduct.util', + 'tests',], + package_data = {'multiproduct' : ['templates/*.html','locale/*/LC_MESSAGES/*.mo']}, entry_points = {'trac.plugins': [ 'multiproduct.model = multiproduct.model', 'multiproduct.perm = multiproduct.perm', }} So these are the only conflicts that need to be resolved ... not a hard one ;) In general , if you need patches for ticket T1 to develop / fix ticket T2 then you merge branch for **ticket** T1 into branch for ticket T2 . This will update your patches and you'll only have to resolve conflicts in MQ series file . PS: I did not commit (--mq) these changes so feel free to follow the process and update the patch to work against current /trunk . -- Regards, Olemis - @olemislc
