{"thread":{"id":"10090","subject":"[PATCH] Support tags in uncommit - use git_id instead of rev_parse","startedAt":"2007-09-30T17:26:47Z","lastAt":"2007-10-07T21:06:19Z","messageCount":7,"participants":["Pavel Roskin","Karl Hasselström","Catalin Marinas"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"54416","messageId":"20070930172647.18972.49369.stgit@tt.roinet.com","threadId":"10090","inReplyTo":null,"subject":"[PATCH] Support tags in uncommit - use git_id instead of rev_parse","fromName":"Pavel Roskin","fromEmail":"proski@gnu.org","sentAt":"2007-09-30T17:26:47Z","receivedAt":"2007-09-30T17:26:47Z","isPatch":true,"sender":{"key":"proski@gnu.org","avatar":null},"body":"Signed-off-by: Pavel Roskin <proski@gnu.org>\n---\n\n stgit/commands/uncommit.py |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\n\ndiff --git a/stgit/commands/uncommit.py b/stgit/commands/uncommit.py\nindex 0cd0fb0..c22d3ea 100644\n--- a/stgit/commands/uncommit.py\n+++ b/stgit/commands/uncommit.py\n@@ -65,7 +65,7 @@ def func(parser, options, args):\n         if len(args) != 0:\n             parser.error('cannot specify patch name with --to')\n         patch_nr = patchnames = None\n-        to_commit = git.rev_parse(options.to)\n+        to_commit = git_id(options.to)\n     elif options.number:\n         if options.number <= 0:\n             parser.error('invalid value passed to --number')\n"},{"id":"54470","messageId":"20071001111632.GA2665@diana.vm.bytemark.co.uk","threadId":"10090","inReplyTo":"20070930172647.18972.49369.stgit@tt.roinet.com","subject":"Re: [PATCH] Support tags in uncommit - use git_id instead of rev_parse","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2007-10-01T11:16:32Z","receivedAt":"2007-10-01T11:16:32Z","isPatch":true,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"Sounds like a good idea. Test? :-)\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"},{"id":"54507","messageId":"b0943d9e0710011500o1bd621a4q10dfe0468c8795e2@mail.gmail.com","threadId":"10090","inReplyTo":"20070930172647.18972.49369.stgit@tt.roinet.com","subject":"Re: [PATCH] Support tags in uncommit - use git_id instead of rev_parse","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@gmail.com","sentAt":"2007-10-01T22:00:52Z","receivedAt":"2007-10-01T22:00:52Z","isPatch":true,"sender":{"key":"catalin.marinas@gmail.com","avatar":null},"body":"On 30/09/2007, Pavel Roskin <proski@gnu.org> wrote:\n> Signed-off-by: Pavel Roskin <proski@gnu.org>\n\nWith this patch, uncommit can take patch names (with modifiers) as the\n--to argument. When would this be needed?\n\nTo allow tags, maybe just pass something like\n\"git.rev_parse(options.to + '^{commit}')\" or just modify git.rev_parse\nto do it (and git_id to avoid it).\n\n-- \nCatalin\n"},{"id":"54616","messageId":"1191362591.26879.3.camel@dv","threadId":"10090","inReplyTo":"b0943d9e0710011500o1bd621a4q10dfe0468c8795e2@mail.gmail.com","subject":"Re: [PATCH] Support tags in uncommit - use git_id instead of rev_parse","fromName":"Pavel Roskin","fromEmail":"proski@gnu.org","sentAt":"2007-10-02T22:03:11Z","receivedAt":"2007-10-02T22:03:11Z","isPatch":true,"sender":{"key":"proski@gnu.org","avatar":null},"body":"On Mon, 2007-10-01 at 23:00 +0100, Catalin Marinas wrote:\n> On 30/09/2007, Pavel Roskin <proski@gnu.org> wrote:\n> > Signed-off-by: Pavel Roskin <proski@gnu.org>\n> \n> With this patch, uncommit can take patch names (with modifiers) as the\n> --to argument. When would this be needed?\n\nProbably never.\n\n> To allow tags, maybe just pass something like\n> \"git.rev_parse(options.to + '^{commit}')\" or just modify git.rev_parse\n> to do it (and git_id to avoid it).\n\nI prefer to work with software that understands what I mean and tells me\nthat I cannot do it.  It makes it easier to understand what is possible\nand how the command is working.\n\nRecognizing patch names in some commands but not others would be\nannoying and inconsistent.  Dumbing downs interactive software on\npurpose is probably not worth the trouble.\n\n-- \nRegards,\nPavel Roskin\n"},{"id":"54752","messageId":"b0943d9e0710031335o1c7f3a10i6f2055b76376bfd4@mail.gmail.com","threadId":"10090","inReplyTo":"1191362591.26879.3.camel@dv","subject":"Re: [PATCH] Support tags in uncommit - use git_id instead of rev_parse","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@gmail.com","sentAt":"2007-10-03T20:35:26Z","receivedAt":"2007-10-03T20:35:26Z","isPatch":true,"sender":{"key":"catalin.marinas@gmail.com","avatar":null},"body":"On 02/10/2007, Pavel Roskin <proski@gnu.org> wrote:\n> On Mon, 2007-10-01 at 23:00 +0100, Catalin Marinas wrote:\n> > To allow tags, maybe just pass something like\n> > \"git.rev_parse(options.to + '^{commit}')\" or just modify git.rev_parse\n> > to do it (and git_id to avoid it).\n>\n> I prefer to work with software that understands what I mean and tells me\n> that I cannot do it.  It makes it easier to understand what is possible\n> and how the command is working.\n>\n> Recognizing patch names in some commands but not others would be\n> annoying and inconsistent.  Dumbing downs interactive software on\n> purpose is probably not worth the trouble.\n\nWithout this patch, the 'stg uncommit -t patch' fails with 'Unknown\nrevision: patch'. With the patch applied, it still fails but with\n'Commit ... does not have exactly one parent'. I don't say that the\nfirst one is good but I don't think the latter is clearer. The 'stg\nuncommit --help' states that the '--to' option takes a commit argument\nbut if one passes a patch name the error message gets pretty\nconfusing.\n\n-- \nCatalin\n"},{"id":"54765","messageId":"1191447892.31052.5.camel@dv","threadId":"10090","inReplyTo":"b0943d9e0710031335o1c7f3a10i6f2055b76376bfd4@mail.gmail.com","subject":"Re: [PATCH] Support tags in uncommit - use git_id instead of rev_parse","fromName":"Pavel Roskin","fromEmail":"proski@gnu.org","sentAt":"2007-10-03T21:44:52Z","receivedAt":"2007-10-03T21:44:52Z","isPatch":true,"sender":{"key":"proski@gnu.org","avatar":null},"body":"On Wed, 2007-10-03 at 21:35 +0100, Catalin Marinas wrote:\n\n> Without this patch, the 'stg uncommit -t patch' fails with 'Unknown\n> revision: patch'. With the patch applied, it still fails but with\n> 'Commit ... does not have exactly one parent'. I don't say that the\n> first one is good but I don't think the latter is clearer. The 'stg\n> uncommit --help' states that the '--to' option takes a commit argument\n> but if one passes a patch name the error message gets pretty\n> confusing.\n\nActually, 'Commit ... does not have exactly one parent' means that stg\nmisinterpreted the patch name as some non-existing hash and started\niterating back until it hit the first merge.\n\nPerhaps stgit should make sure that the hash is valid before walking the\ncommit tree.  If it's not, stgit could provide a better message.\n\n-- \nRegards,\nPavel Roskin\n"},{"id":"55086","messageId":"b0943d9e0710071406k38387ee0w961f403c57794159@mail.gmail.com","threadId":"10090","inReplyTo":"1191447892.31052.5.camel@dv","subject":"Re: [PATCH] Support tags in uncommit - use git_id instead of rev_parse","fromName":"Catalin Marinas","fromEmail":"catalin.marinas@gmail.com","sentAt":"2007-10-07T21:06:19Z","receivedAt":"2007-10-07T21:06:19Z","isPatch":true,"sender":{"key":"catalin.marinas@gmail.com","avatar":null},"body":"On 03/10/2007, Pavel Roskin <proski@gnu.org> wrote:\n> On Wed, 2007-10-03 at 21:35 +0100, Catalin Marinas wrote:\n>\n> > Without this patch, the 'stg uncommit -t patch' fails with 'Unknown\n> > revision: patch'. With the patch applied, it still fails but with\n> > 'Commit ... does not have exactly one parent'. I don't say that the\n> > first one is good but I don't think the latter is clearer. The 'stg\n> > uncommit --help' states that the '--to' option takes a commit argument\n> > but if one passes a patch name the error message gets pretty\n> > confusing.\n>\n> Actually, 'Commit ... does not have exactly one parent' means that stg\n> misinterpreted the patch name as some non-existing hash and started\n> iterating back until it hit the first merge.\n>\n> Perhaps stgit should make sure that the hash is valid before walking the\n> commit tree.  If it's not, stgit could provide a better message.\n\nOK, I applied your patch but I'll have to look into the error message\nto make it more meaningful. Thanks.\n\n-- \nCatalin\n"}]}