{"thread":{"id":"9857","subject":"STG, problem with pop/push of alternative versions of a patch","startedAt":"2007-09-15T03:49:26Z","lastAt":"2007-09-15T22:44:03Z","messageCount":6,"participants":["Jon Smirl","Catalin Marinas"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"53089","messageId":"9e4733910709142049k6dcec6acuf851c21ed6704287@mail.gmail.com","threadId":"9857","inReplyTo":null,"subject":"STG, problem with pop/push of alternative versions of a patch","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2007-09-15T03:49:26Z","receivedAt":"2007-09-15T03:49:26Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"I trying to test two different versions of a patch that add files.\nThese patches create a new directory and add several files. When I pop\na version of the patch the directory and files and not getting\nremoved. This causes an error when I push the alternative version of\nthe patch.\n\njonsmirl@terra:~/mpc5200b$ stg series\n+ 0001-powerpc-exports-rheap-symbol-to-modules.patch\n+ 0002-powerpc-Changes-the-config-mechanism-for-rheap.patch\n+ 0003-powerpc-ppc32-Update-mpc52xx_psc-structure-with-B-r.patch\n+ 0004-powerpc-BestComm-core-support-for-Freescale-MPC5200.patch\n+ 0005-powerpc-BestcComm-ATA-task-support.patch\n+ 0006-powerpc-BestcComm-FEC-task-support.patch\n+ 0007-powerpc-BestcComm-GenBD-task-support.patch\n+ ignore-uImage\n+ 0008-drivers-net-Add-support-for-Freescale-MPC5200-SoC-i.patch\n+ 0009-sound-Add-support-for-Freescale-MPC5200-AC97-interf.patch\n+ 0010-powerpc-In-rheap.c-move-the-EXPORT_SYMBOL-and-use.patch\n+ 0011-powerpc-BestComm-move-the-EXPORT_SYMBOL-and-use-th.patch\n+ 0012-powerpc-BestComm-ATA-task-move-the-EXPORT_SYMBOL-a.patch\n+ 0013-powerpc-BestComm-FEC-task-move-the-EXPORT_SYMBOL-a.patch\n+ 0014-powerpc-BestComm-GenBD-task-move-the-EXPORT_SYMBOL.patch\n+ 0015-powerpc-BestComm-Replace-global-variable-bcom-by-b.patch\n+ 0016-powerpc-Make-the-BestComm-driver-a-standard-of_plat.patch\n+ 0017-powerpc-Fix-typo-in-BestComm-ATA-task-support-code.patch\n+ 0018-powerpc-BestComm-ATA-task-microcode-insert-copyri.patch\n+ 0019-powerpc-BestComm-FEC-task-microcode-insert-copyri.patch\n+ 0020-powerpc-BestComm-GenBD-task-microcode-insert-copy.patch\n+ 0021-powerpc-Fix-errors-in-bcom-bcom_eng-renaming.patch\n+ Makefile\n+ pcm030_bsp_powerpc\n+ fs_jffs2_use_memcpy_fromio\n+ gpio_frame\n+ ppc_gpio\n+ GPIO-adaption\n+ mpc52xx_restart\n> pcm_dts_eth_phys\n- domen-fec\njonsmirl@terra:~/mpc5200b$ stg pop\n0008-drivers-net-Add-support-for-Freescale-MPC5200-SoC-i.patch..\nChecking for changes in the working directory ... done\nPopping patches \"pcm_dts_eth_phys\" -\n\"0008-drivers-net-Add-support-for-Freescale-MPC5200-SoC-i.patch\" ...\ndone\nNow at patch \"ignore-uImage\"\njonsmirl@terra:~/mpc5200b$ stg series\n+ 0001-powerpc-exports-rheap-symbol-to-modules.patch\n+ 0002-powerpc-Changes-the-config-mechanism-for-rheap.patch\n+ 0003-powerpc-ppc32-Update-mpc52xx_psc-structure-with-B-r.patch\n+ 0004-powerpc-BestComm-core-support-for-Freescale-MPC5200.patch\n+ 0005-powerpc-BestcComm-ATA-task-support.patch\n+ 0006-powerpc-BestcComm-FEC-task-support.patch\n+ 0007-powerpc-BestcComm-GenBD-task-support.patch\n> ignore-uImage\n- 0008-drivers-net-Add-support-for-Freescale-MPC5200-SoC-i.patch\n- 0009-sound-Add-support-for-Freescale-MPC5200-AC97-interf.patch\n- 0010-powerpc-In-rheap.c-move-the-EXPORT_SYMBOL-and-use.patch\n- 0011-powerpc-BestComm-move-the-EXPORT_SYMBOL-and-use-th.patch\n- 0012-powerpc-BestComm-ATA-task-move-the-EXPORT_SYMBOL-a.patch\n- 0013-powerpc-BestComm-FEC-task-move-the-EXPORT_SYMBOL-a.patch\n- 0014-powerpc-BestComm-GenBD-task-move-the-EXPORT_SYMBOL.patch\n- 0015-powerpc-BestComm-Replace-global-variable-bcom-by-b.patch\n- 0016-powerpc-Make-the-BestComm-driver-a-standard-of_plat.patch\n- 0017-powerpc-Fix-typo-in-BestComm-ATA-task-support-code.patch\n- 0018-powerpc-BestComm-ATA-task-microcode-insert-copyri.patch\n- 0019-powerpc-BestComm-FEC-task-microcode-insert-copyri.patch\n- 0020-powerpc-BestComm-GenBD-task-microcode-insert-copy.patch\n- 0021-powerpc-Fix-errors-in-bcom-bcom_eng-renaming.patch\n- Makefile\n- pcm030_bsp_powerpc\n- fs_jffs2_use_memcpy_fromio\n- gpio_frame\n- ppc_gpio\n- GPIO-adaption\n- mpc52xx_restart\n- pcm_dts_eth_phys\n- domen-fec\njonsmirl@terra:~/mpc5200b$ stg push domen-fec\nChecking for changes in the working directory ... done\nPushing patch \"domen-fec\" ... error: drivers/net/fec_mpc52xx/Kconfig:\nalready exists in working directory\nerror: drivers/net/fec_mpc52xx/Makefile: already exists in working directory\nerror: drivers/net/fec_mpc52xx/fec.c: already exists in working directory\nerror: drivers/net/fec_mpc52xx/fec.h: already exists in working directory\nerror: drivers/net/fec_mpc52xx/fec_phy.c: already exists in working directory\nfatal: Untracked working tree file 'drivers/net/fec_mpc52xx/Kconfig'\nwould be overwritten by merge.\n\n  Error: The merge failed during \"push\".\n         Use \"refresh\" after fixing the conflicts or revert the\noperation with \"push --undo\".\nstg push: git-merge-recursive failed with code 128\njonsmirl@terra:~/mpc5200b$ stg push --undo\nUndoing push of \"domen-fec\" ... done\nNow at patch \"ignore-uImage\"\njonsmirl@terra:~/mpc5200b$ stg status\n? drivers/net/fec_mpc52xx/\njonsmirl@terra:~/mpc5200b$\n\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"53102","messageId":"b0943d9e0709150107o27571446v9bef8e31517777e1@mail.gmail.com","threadId":"9857","inReplyTo":"9e4733910709142049k6dcec6acuf851c21ed6704287@mail.gmail.com","subject":"Re: STG, problem with pop/push of alternative versions of a patch","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@gmail.com","sentAt":"2007-09-15T08:07:05Z","receivedAt":"2007-09-15T08:07:05Z","isPatch":false,"sender":{"key":"catalin.marinas@gmail.com","avatar":null},"body":"On 15/09/2007, Jon Smirl <jonsmirl@gmail.com> wrote:\n> I trying to test two different versions of a patch that add files.\n> These patches create a new directory and add several files. When I pop\n> a version of the patch the directory and files and not getting\n> removed. This causes an error when I push the alternative version of\n> the patch.\n\nThis shouldn't happen AFAICT (at least for the files, as GIT doesn't\ncare much about directories). What GIT/StGIT version are you using?\nStGIT simply calls GIT to do the HEAD switch.\n\nCould you run 'stg patches drivers/net/fec_mpc52xx/Kconfig' with the\ninitial series pushed? It should show which patches touch this file.\nIf it doesn't show any, maybe the files weren't added to any patch and\nhence the error.\n\nThanks.\n\n-- \nCatalin\n"},{"id":"53120","messageId":"9e4733910709150725k73bec66bw753c4b3c01244cff@mail.gmail.com","threadId":"9857","inReplyTo":"b0943d9e0709150107o27571446v9bef8e31517777e1@mail.gmail.com","subject":"Re: STG, problem with pop/push of alternative versions of a patch","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2007-09-15T14:25:39Z","receivedAt":"2007-09-15T14:25:39Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"On 9/15/07, Catalin Marinas <catalin.marinas@gmail.com> wrote:\n> On 15/09/2007, Jon Smirl <jonsmirl@gmail.com> wrote:\n> > I trying to test two different versions of a patch that add files.\n> > These patches create a new directory and add several files. When I pop\n> > a version of the patch the directory and files and not getting\n> > removed. This causes an error when I push the alternative version of\n> > the patch.\n>\n> This shouldn't happen AFAICT (at least for the files, as GIT doesn't\n> care much about directories). What GIT/StGIT version are you using?\n> StGIT simply calls GIT to do the HEAD switch.\n\nI have played around with some more. It is more complicated than the\nsimple case I described.  Earlier I noticed a message about applying a\npatch that was empty that shouldn't have been. I checked and the patch\nis indeed empty. The empty patch probably caused the files to be left.\nI had been using hide/unide and reordering with on the patch and had\nencountered a couple errors in stg. I'll try and track down the\nsequence that caused the contents of the patch to be lost.\n\n\n>\n> Could you run 'stg patches drivers/net/fec_mpc52xx/Kconfig' with the\n> initial series pushed? It should show which patches touch this file.\n> If it doesn't show any, maybe the files weren't added to any patch and\n> hence the error.\n>\n> Thanks.\n>\n> --\n> Catalin\n>\n\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"53136","messageId":"b0943d9e0709151031m70b9d03bw4068805e697e97f5@mail.gmail.com","threadId":"9857","inReplyTo":"9e4733910709150725k73bec66bw753c4b3c01244cff@mail.gmail.com","subject":"Re: STG, problem with pop/push of alternative versions of a patch","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@gmail.com","sentAt":"2007-09-15T17:31:14Z","receivedAt":"2007-09-15T17:31:14Z","isPatch":false,"sender":{"key":"catalin.marinas@gmail.com","avatar":null},"body":"On 15/09/2007, Jon Smirl <jonsmirl@gmail.com> wrote:\n> On 9/15/07, Catalin Marinas <catalin.marinas@gmail.com> wrote:\n> > On 15/09/2007, Jon Smirl <jonsmirl@gmail.com> wrote:\n> > > I trying to test two different versions of a patch that add files.\n> > > These patches create a new directory and add several files. When I pop\n> > > a version of the patch the directory and files and not getting\n> > > removed. This causes an error when I push the alternative version of\n> > > the patch.\n> >\n> > This shouldn't happen AFAICT (at least for the files, as GIT doesn't\n> > care much about directories). What GIT/StGIT version are you using?\n> > StGIT simply calls GIT to do the HEAD switch.\n>\n> I have played around with some more. It is more complicated than the\n> simple case I described.  Earlier I noticed a message about applying a\n> patch that was empty that shouldn't have been. I checked and the patch\n> is indeed empty. The empty patch probably caused the files to be left.\n> I had been using hide/unide and reordering with on the patch and had\n> encountered a couple errors in stg. I'll try and track down the\n> sequence that caused the contents of the patch to be lost.\n\nBTW, you can run 'stg log <patch>' to see how the patch was changed.\nIt even has a -g option to invoke gitk and see each change.\n\nOne way a patch could become empty is if the changes it makes are\nalready in the repository (in another patch or merged upstream).\n\n-- \nCatalin\n"},{"id":"53139","messageId":"9e4733910709151042p7c681e25o386be2ca2719daa9@mail.gmail.com","threadId":"9857","inReplyTo":"b0943d9e0709151031m70b9d03bw4068805e697e97f5@mail.gmail.com","subject":"Re: STG, problem with pop/push of alternative versions of a patch","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2007-09-15T17:42:31Z","receivedAt":"2007-09-15T17:42:31Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"On 9/15/07, Catalin Marinas <catalin.marinas@gmail.com> wrote:\n> On 15/09/2007, Jon Smirl <jonsmirl@gmail.com> wrote:\n> > On 9/15/07, Catalin Marinas <catalin.marinas@gmail.com> wrote:\n> > > On 15/09/2007, Jon Smirl <jonsmirl@gmail.com> wrote:\n> > > > I trying to test two different versions of a patch that add files.\n> > > > These patches create a new directory and add several files. When I pop\n> > > > a version of the patch the directory and files and not getting\n> > > > removed. This causes an error when I push the alternative version of\n> > > > the patch.\n> > >\n> > > This shouldn't happen AFAICT (at least for the files, as GIT doesn't\n> > > care much about directories). What GIT/StGIT version are you using?\n> > > StGIT simply calls GIT to do the HEAD switch.\n> >\n> > I have played around with some more. It is more complicated than the\n> > simple case I described.  Earlier I noticed a message about applying a\n> > patch that was empty that shouldn't have been. I checked and the patch\n> > is indeed empty. The empty patch probably caused the files to be left.\n> > I had been using hide/unide and reordering with on the patch and had\n> > encountered a couple errors in stg. I'll try and track down the\n> > sequence that caused the contents of the patch to be lost.\n>\n> BTW, you can run 'stg log <patch>' to see how the patch was changed.\n> It even has a -g option to invoke gitk and see each change.\n>\n> One way a patch could become empty is if the changes it makes are\n> already in the repository (in another patch or merged upstream).\n\nI was not happy when my patch disappeared. Luckily I had exported it a\nlittle while earlier.\n\nThis error may have messed up my state and I didn't detect it until\nlater. 0008-drivers-net-Add-support-for-Freescale-MPC5200-SoC-i.patch\nis the patch that went missing.\n\n\n---------- Forwarded message ----------\nFrom: Jon Smirl <jonsmirl@gmail.com>\nDate: Sep 13, 2007 4:08 PM\nSubject: Stg AssertionError in sink command\nTo: Git Mailing List <git@vger.kernel.org>, catalin.marinas@gmail.com\n\n\nUsing current git source for Stg\n\nPatch 008 was hidden and I used unhide to bring it back. But the\nhide/unhide process moved it to the top of the stack. I need to sink\nit back down to where it came from. Shouldn't hide/unhide preserve the\npatch position in the stack?\n\njonsmirl@terra:~/mpc5200b$ stg series\n+ 0001-powerpc-exports-rheap-symbol-to-modules.patch\n+ 0002-powerpc-Changes-the-config-mechanism-for-rheap.patch\n+ 0003-powerpc-ppc32-Update-mpc52xx_psc-structure-with-B-r.patch\n+ 0004-powerpc-BestComm-core-support-for-Freescale-MPC5200.patch\n+ 0005-powerpc-BestcComm-ATA-task-support.patch\n+ 0006-powerpc-BestcComm-FEC-task-support.patch\n> 0007-powerpc-BestcComm-GenBD-task-support.patch\n- domen-fec\n- 0009-sound-Add-support-for-Freescale-MPC5200-AC97-interf.patch\n- 0010-powerpc-In-rheap.c-move-the-EXPORT_SYMBOL-and-use.patch\n- 0011-powerpc-BestComm-move-the-EXPORT_SYMBOL-and-use-th.patch\n- 0012-powerpc-BestComm-ATA-task-move-the-EXPORT_SYMBOL-a.patch\n- 0013-powerpc-BestComm-FEC-task-move-the-EXPORT_SYMBOL-a.patch\n- 0014-powerpc-BestComm-GenBD-task-move-the-EXPORT_SYMBOL.patch\n- 0015-powerpc-BestComm-Replace-global-variable-bcom-by-b.patch\n- 0016-powerpc-Make-the-BestComm-driver-a-standard-of_plat.patch\n- 0017-powerpc-Fix-typo-in-BestComm-ATA-task-support-code.patch\n- 0018-powerpc-BestComm-ATA-task-microcode-insert-copyri.patch\n- 0019-powerpc-BestComm-FEC-task-microcode-insert-copyri.patch\n- 0020-powerpc-BestComm-GenBD-task-microcode-insert-copy.patch\n- 0021-powerpc-Fix-errors-in-bcom-bcom_eng-renaming.patch\n- Makefile\n- pcm030_bsp_powerpc\n- fs_jffs2_use_memcpy_fromio\n- gpio_frame\n- ppc_gpio\n- GPIO-adaption\n- mpc52xx_restart\n- pcm_dts_eth_phys\n- 0008-drivers-net-Add-support-for-Freescale-MPC5200-SoC-i.patch\njonsmirl@terra:~/mpc5200b$ stg sink -t domen-fec\n0008-drivers-net-Add-support-for-Freescale-MPC5200-SoC-i.patch\nChecking for changes in the working directory ... done\nTraceback (most recent call last):\n  File \"/usr/local/bin/stg\", line 43, in <module>\n    main()\n  File \"/usr/local/lib/python2.5/site-packages/stgit/main.py\", line 284, in main\n    command.func(parser, options, args)\n  File \"/usr/local/lib/python2.5/site-packages/stgit/commands/sink.py\",\nline 58, in func\n    crt_series.pop_patch(options.to or oldapplied[0])\n  File \"/usr/local/lib/python2.5/site-packages/stgit/stack.py\", line\n1129, in pop_patch\n    assert(name in applied)\nAssertionError\njonsmirl@terra:~/mpc5200b$\n\n\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"53146","messageId":"b0943d9e0709151544p1f40508cqad2663416187e15@mail.gmail.com","threadId":"9857","inReplyTo":"9e4733910709151042p7c681e25o386be2ca2719daa9@mail.gmail.com","subject":"Re: STG, problem with pop/push of alternative versions of a patch","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@gmail.com","sentAt":"2007-09-15T22:44:03Z","receivedAt":"2007-09-15T22:44:03Z","isPatch":false,"sender":{"key":"catalin.marinas@gmail.com","avatar":null},"body":"On 15/09/2007, Jon Smirl <jonsmirl@gmail.com> wrote:\n> I was not happy when my patch disappeared. Luckily I had exported it a\n> little while earlier.\n\nOtherwise, the patch log should be present and it shows each commit id\nof the patch.\n\nSince we are at this, I think we need a config option to automatically\nback up (export) the patches. Since StGIT detects whether the patch\napplied cleanly or it was modified (with a diff3 merge), it only needs\nto export in a few cases and not affect the performance (diff3 takes\nsignificantly longer anyway).\n\nThanks for reporting this issue.\n\n-- \nCatalin\n"}]}