{"thread":{"id":"10608","subject":"StGIT fails to clean patch series, and to go to a patch","startedAt":"2007-11-03T09:45:20Z","lastAt":"2007-11-03T13:17:47Z","messageCount":3,"participants":["Jakub Narebski","Catalin Marinas"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"58087","messageId":"200711031045.21506.jnareb@gmail.com","threadId":"10608","inReplyTo":null,"subject":"StGIT fails to clean patch series, and to go to a patch","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-11-03T09:45:20Z","receivedAt":"2007-11-03T09:45:20Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"I have patch series with empty patch in the middle of the stack.\nAfter trying to stg-clean (and failing) stack looks like below:\n\n1167:[gitweb/web!git]$ stg series -e -s\n+ gitweb-Always-set-from_file-to_file\n+ gitweb-Add-status_str-diffinfo\n+ gitweb-Easier-adding-parameters-to-current-URL\n+ gitweb-Use-replay-to-generate-pagination\n> gitweb-Use-replay-to-generate-alt-views\n0 gitweb-Update-INSTALL-file\n- gitweb-No-CGI_Carp-in-test\n- gitweb-Test-config-override\n- gitweb-Config-reader\n- gitweb-Use-config-more\n\nNow stg-rebase works, but stg-goto doesn't work. It returns\nthe following error.\n\n1164:[gitweb/web!git]$ stg goto gitweb-Use-config-more \nChecking for changes in the working directory ... done\nTraceback (most recent call last):\n  File \"/usr/bin/stg\", line 43, in ?\n    main()\n  File \"/usr/lib/python2.4/site-packages/stgit/main.py\", line 284, in main\n    command.func(parser, options, args)\n  File \"/usr/lib/python2.4/site-packages/stgit/commands/goto.py\", line 63, in func\n    push_patches(patches)\n  File \"/usr/lib/python2.4/site-packages/stgit/commands/common.py\", line 165, in push_patches\n    forwarded = crt_series.forward_patches(patches)\n  File \"/usr/lib/python2.4/site-packages/stgit/stack.py\", line 954, in forward_patches\n    bottom_tree = git.get_commit(bottom).get_tree()\n  File \"/usr/lib/python2.4/site-packages/stgit/git.py\", line 136, in get_commit\n    commit = Commit(id_hash)\n  File \"/usr/lib/python2.4/site-packages/stgit/git.py\", line 77, in __init__\n    lines = _output_lines(['git-cat-file', 'commit', id_hash])\n  File \"/usr/lib/python2.4/site-packages/stgit/git.py\", line 196, in _output_lines\n    raise GitException, '%s failed (%s)' % (' '.join(cmd),\nTypeError: sequence item 2: expected string, NoneType found\n1165:[gitweb/web!git]$ stg version\nStacked GIT 0.13\ngit version 1.5.3.5\nPython version 2.4.3 (#1, Jun 13 2006, 16:41:18) \n[GCC 4.0.2 20051125 (Red Hat 4.0.2-8)]\n-- \nJakub Narebski\nPoland\n"},{"id":"58092","messageId":"b0943d9e0711030332s49877dcep46460121fb6ec712@mail.gmail.com","threadId":"10608","inReplyTo":"200711031045.21506.jnareb@gmail.com","subject":"Re: StGIT fails to clean patch series, and to go to a patch","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@gmail.com","sentAt":"2007-11-03T10:32:13Z","receivedAt":"2007-11-03T10:32:13Z","isPatch":false,"sender":{"key":"catalin.marinas@gmail.com","avatar":null},"body":"On 03/11/2007, Jakub Narebski <jnareb@gmail.com> wrote:\n> I have patch series with empty patch in the middle of the stack.\n> After trying to stg-clean (and failing) stack looks like below:\n\nDoes 'stg delete gitweb-Update-INSTALL-file' work?\n\n> 1164:[gitweb/web!git]$ stg goto gitweb-Use-config-more\n> Checking for changes in the working directory ... done\n> Traceback (most recent call last):\n\nDoes a simple 'stg push' work? I suspect there is something wrong with\nthe gitweb-Update-INSTALL-file patch but not sure why or how it could\nget to this inconsistent state?\n\nIt's worth checking the values of 'stg id\ngitweb-Update-INSTALL-file//top' and //bottom and whether they are\ncommit ids or something else.\n\n-- \nCatalin\n"},{"id":"58128","messageId":"200711031417.47388.jnareb@gmail.com","threadId":"10608","inReplyTo":"b0943d9e0711030332s49877dcep46460121fb6ec712@mail.gmail.com","subject":"Re: StGIT fails to clean patch series, and to go to a patch","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-11-03T13:17:47Z","receivedAt":"2007-11-03T13:17:47Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Catalin Marinas wrote:\n> On 03/11/2007, Jakub Narebski <jnareb@gmail.com> wrote:\n>\n>> I have patch series with empty patch in the middle of the stack.\n>> After trying to stg-clean (and failing) stack looks like below:\n> \n> Does 'stg delete gitweb-Update-INSTALL-file' work?\n> \n>> 1164:[gitweb/web!git]$ stg goto gitweb-Use-config-more\n>> Checking for changes in the working directory ... done\n>> Traceback (most recent call last):\n> \n> Does a simple 'stg push' work? I suspect there is something wrong with\n> the gitweb-Update-INSTALL-file patch but not sure why or how it could\n> get to this inconsistent state?\n> \n> It's worth checking the values of 'stg id\n> gitweb-Update-INSTALL-file//top' and //bottom and whether they are\n> commit ids or something else.\n\n1168:[gitweb/web!git]$ stg id gitweb-Update-INSTALL-file \nNone\n1169:[gitweb/web!git]$ stg id gitweb-Update-INSTALL-file//top\nNone\n1170:[gitweb/web!git]$ stg id gitweb-Update-INSTALL-file//bottom\nNone\n1171:[gitweb/web!git]$ stg delete gitweb-Update-INSTALL-file \nTraceback (most recent call last):\n  File \"/usr/bin/stg\", line 43, in ?\n    main()\n  File \"/usr/lib/python2.4/site-packages/stgit/main.py\", line 284, in main\n    command.func(parser, options, args)\n  File \"/usr/lib/python2.4/site-packages/stgit/commands/delete.py\", line 76, in func\n    crt_series.delete_patch(patch)\n  File \"/usr/lib/python2.4/site-packages/stgit/stack.py\", line 919, in delete_patch\n    patch.delete()\n  File \"/usr/lib/python2.4/site-packages/stgit/stack.py\", line 160, in delete\n    for f in os.listdir(self._dir()):\nOSError: [Errno 2] No such file or directory: '.git/patches/gitweb/web/patches/gitweb-Update-INSTALL-file'\n\nI wonder how that happened... I'm just interested in recovering\nthe unapplied commits. There is always reflog, but StGIT does not\ncreate reflog message as it should.\n\nHmmm... removing gitweb-Update-INSTALL-file line from 'unapplied' file\nworked; nice.\n\n-- \nJakub Narebski\nPoland\n"}]}