{"thread":{"id":"31474","subject":"help doing a hotfix bisect: cherry-pick -m ??","startedAt":"2012-09-07T18:44:06Z","lastAt":"2012-09-07T21:55:34Z","messageCount":3,"participants":["Jim Cromie","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"198541","messageId":"CAJfuBxwBn-WFw+nci1MpdWQvyXkrhyB3maXPwMAsxggTE3gz3Q@mail.gmail.com","threadId":"31474","inReplyTo":null,"subject":"help doing a hotfix bisect: cherry-pick -m ??","fromName":"Jim Cromie","fromEmail":"jim.cromie@gmail.com","sentAt":"2012-09-07T18:44:06Z","receivedAt":"2012-09-07T18:44:06Z","isPatch":false,"sender":{"key":"jim.cromie@gmail.com","avatar":null},"body":"hi all.\n\nIm trying to add a jumplabel implementation into dynamic-debug,\nand have run into an include-dependency problem.\nIve managed to resolve 1 problem, and am now stuck on how to use cherry-pick -m\n\n1st, the problem Ive handled (just for setup, story)\n\nI did a simple hotfix bisection, adding:\n\n--- a/include/linux/dynamic_debug.h\n+++ b/include/linux/dynamic_debug.h\n\n+#include <linux/jump_label.h>\n+\n\nThis bisect run pointed to:\n\n    commit b202952075f62603bea9bfb6ebc6b0420db11949\n    Author: Gleb Natapov <gleb@redhat.com>\n    Date:   Sun Nov 27 17:59:09 2011 +0200\n\n        perf, core: Rate limit perf_sched_events jump_label patching\n\n        jump_lable patching is very expensive operation that involves pausing al\n        cpus. The patching of perf_sched_events jump_label is easily controllabl\n        from userspace by unprivileged user.\n        ...\n\nThat commit adds #include <linux/workqueue.h> to dynamic_debug.h,\nso I split the workqueue and _deferred elements out to jump_label_deferred.h,\nand updated the _deferred users.  The result builds cleanly and boots.\n\n\nHowever, once I try adding the above hotfix patch again, I get another handful\nof compile-errs (minus 1 that got fixed by above)\n\nAnd now Im running into bisection troubles.\nThere are a 1/2 dozen patches to jump-label between Gleb's and -rc4,\nwhich make my patch against rc4 inapplicable.\n\nIve tried to use the cherry-pick example from the help to pick them all up:\nbut it craps out (tech term)\n\ngit rev-list --reverse b2029520..dyndbg/jump-3a --\ninclude/linux/jump_label.h  | git cherry-pick -n --stdin\nerror: could not apply c5905af... static keys: Introduce 'struct\nstatic_key', static_key_true()/false() and static_key_slow_[inc|dec]()\nhint: after resolving the conflicts, mark the corrected paths\nhint: with 'git add <paths>' or 'git rm <paths>'\n\nSo I tried again, adding kernel/jump_label.c\n\ngit rev-list --reverse b2029520..dyndbg/jump-3a --\ninclude/linux/jump_label.h kernel/jump_label.c | git cherry-pick -n\n--stdin\nerror: Commit 9e31905f293ae84e4f120ed9e414031eaefa0bdf is a merge but\nno -m option was given.\nfatal: cherry-pick failed\n\nIve tried several variations on -m <arg>, trying 1, 2, parent-sha,\n(thats quite wrong)\nI keep getting this err:\n\ngit rev-list --reverse b2029520..dyndbg/jump-3a --\ninclude/linux/jump_label.h kernel/jump_label.c | git cherry-pick -n\n--stdin -m 1\nerror: Mainline was specified but commit\n9cdbe1cbac4ec318037297175587a0080acc9d11 is not a merge.\n\nI find the -m help text completely unenlightening.\nwhat is a parent number ?\nwhere does it start from ?\n\nIm trying to cherry pick from master to hotfix-2, I presume thats a\nnormal/natural usage.\n\nare parent numbers relative to the branch Im on, or the branch Im\ncherry-picking from ?\nor something else completely.\n\nBroader question:\npresuming I do manage to cherry-pick the right set commits, should I\ndrop the -n ?\nIm thinking that having a hotfix branch, and merging --no-commit would\nwork better,\nespecially when bisection lands on a commit which already contains\nsome of those in the hotfix branch.\nAm I thinking rightly ?  Anything else to add ??\n\n\nSince concrete, in-context advice would be so much more helpful than\ntips using foo, bar, etc,\nIve pushed my branch to github, user jimc, branch dyndbg/jump-3a\n\ngit://github.com/jimc/linux-2.6.git\nhttps://github.com/jimc/linux-2.6.git\nhttps://github.com/jimc/linux-2.6/tree/dyndbg/jump-3a\n\nthanks in advance.\n"},{"id":"198546","messageId":"7v627py6or.fsf@alter.siamese.dyndns.org","threadId":"31474","inReplyTo":"CAJfuBxwBn-WFw+nci1MpdWQvyXkrhyB3maXPwMAsxggTE3gz3Q@mail.gmail.com","subject":"Re: help doing a hotfix bisect: cherry-pick -m ??","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-09-07T19:27:32Z","receivedAt":"2012-09-07T19:27:32Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jim Cromie <jim.cromie@gmail.com> writes:\n\n> Broader question:\n\n> Im thinking that having a hotfix branch, and merging --no-commit would\n> work better,\n> especially when bisection lands on a commit which already contains\n> some of those in the hotfix branch.\n\nWhen your history leading to the \"bad\" commit contains only part of\nthe hot-fix branch and not all of it, that may work better.\n"},{"id":"198557","messageId":"CAJfuBxw4_VhyGENcgsBp0WohapAAmiqfEstWF-gjcnUestBwLw@mail.gmail.com","threadId":"31474","inReplyTo":"7v627py6or.fsf@alter.siamese.dyndns.org","subject":"Re: help doing a hotfix bisect: cherry-pick -m ??","fromName":"Jim Cromie","fromEmail":"jim.cromie@gmail.com","sentAt":"2012-09-07T21:55:34Z","receivedAt":"2012-09-07T21:55:34Z","isPatch":false,"sender":{"key":"jim.cromie@gmail.com","avatar":null},"body":"On Fri, Sep 7, 2012 at 1:27 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Jim Cromie <jim.cromie@gmail.com> writes:\n>\n>> Broader question:\n>\n>> Im thinking that having a hotfix branch, and merging --no-commit would\n>> work better,\n>> especially when bisection lands on a commit which already contains\n>> some of those in the hotfix branch.\n>\n> When your history leading to the \"bad\" commit contains only part of\n> the hot-fix branch and not all of it, that may work better.\n\ngood, I have a 1/2 grip at least. thank you.\n\nany tips on how to use the -m option ?\nIve had no success passing small integers,\nand I need to include the commits from the merged branch\n\nThe only alternative I have is to rework the split *_deferred patch\non top of the merge-point, and hope that it tests ok with the original\nhotfix patch,\nthen I can probably do the bisect.\n"}]}