{"thread":{"id":"9944","subject":"[PATCH] [git-p4] Detect exec bit in more cases.","startedAt":"2007-09-19T18:15:03Z","lastAt":"2007-09-24T06:20:41Z","messageCount":13,"participants":["David Brown","Simon Hausmann","Dana How","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"53592","messageId":"119022570352-git-send-email-git@davidb.org","threadId":"9944","inReplyTo":null,"subject":"[PATCH] [git-p4] Detect exec bit in more cases.","fromName":"David Brown","fromEmail":"git@davidb.org","sentAt":"2007-09-19T18:15:03Z","receivedAt":"2007-09-19T18:15:03Z","isPatch":true,"sender":{"key":"git@davidb.org","avatar":"https://gravatar.com/avatar/94c86a2938470a74c2eac5e2b69afc0871f79a660295c02219597aba8cb101c1?d=mp&s=160"},"body":"git-p4 was missing the execute bit setting if the file had other attribute\nbits set.\n---\n contrib/fast-import/git-p4 |    5 ++++-\n 1 files changed, 4 insertions(+), 1 deletions(-)\n\ndiff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4\nindex adaaae6..50850b8 100755\n--- a/contrib/fast-import/git-p4\n+++ b/contrib/fast-import/git-p4\n@@ -932,7 +932,10 @@ class P4Sync(Command):\n                 data = file['data']\n \n                 mode = \"644\"\n-                if file[\"type\"].startswith(\"x\"):\n+                if (file[\"type\"].startswith(\"x\") or\n+                        file[\"type\"].startswith(\"cx\") or\n+                        file[\"type\"].startswith(\"kx\") or\n+                        file[\"type\"].startswith(\"ux\")):\n                     mode = \"755\"\n                 elif file[\"type\"] == \"symlink\":\n                     mode = \"120000\"\n-- \n1.5.3.1\n"},{"id":"53595","messageId":"200709192103.53526.simon@lst.de","threadId":"9944","inReplyTo":"119022570352-git-send-email-git@davidb.org","subject":"Re: [PATCH] [git-p4] Detect exec bit in more cases.","fromName":"Simon Hausmann","fromEmail":"simon@lst.de","sentAt":"2007-09-19T19:03:50Z","receivedAt":"2007-09-19T19:03:50Z","isPatch":true,"sender":{"key":"hausmann@kde.org","avatar":"https://gravatar.com/avatar/bc9aad4fb31dce17eb66e690e7b51fe980c62da3c225c785da35dd806b8da778?d=mp&s=160"},"body":"On Wednesday 19 September 2007 20:15:03 David Brown wrote:\n> git-p4 was missing the execute bit setting if the file had other attribute\n> bits set.\n> ---\n>  contrib/fast-import/git-p4 |    5 ++++-\n>  1 files changed, 4 insertions(+), 1 deletions(-)\n>\n> diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4\n> index adaaae6..50850b8 100755\n> --- a/contrib/fast-import/git-p4\n> +++ b/contrib/fast-import/git-p4\n> @@ -932,7 +932,10 @@ class P4Sync(Command):\n>                  data = file['data']\n>\n>                  mode = \"644\"\n> -                if file[\"type\"].startswith(\"x\"):\n> +                if (file[\"type\"].startswith(\"x\") or\n> +                        file[\"type\"].startswith(\"cx\") or\n> +                        file[\"type\"].startswith(\"kx\") or\n> +                        file[\"type\"].startswith(\"ux\")):\n>                      mode = \"755\"\n>                  elif file[\"type\"] == \"symlink\":\n>                      mode = \"120000\"\n\nI'm fine with this, so unless you find a better way:\n\nAcked-By: Simon Hausmann <simon@lst.de>\n\n\nSimon\n"},{"id":"53596","messageId":"20070919191412.GA6475@old.davidb.org","threadId":"9944","inReplyTo":"200709192103.53526.simon@lst.de","subject":"Re: [PATCH] [git-p4] Detect exec bit in more cases.","fromName":"David Brown","fromEmail":"git@davidb.org","sentAt":"2007-09-19T19:14:12Z","receivedAt":"2007-09-19T19:14:12Z","isPatch":true,"sender":{"key":"git@davidb.org","avatar":"https://gravatar.com/avatar/94c86a2938470a74c2eac5e2b69afc0871f79a660295c02219597aba8cb101c1?d=mp&s=160"},"body":"On Wed, Sep 19, 2007 at 09:03:50PM +0200, Simon Hausmann wrote:\n>On Wednesday 19 September 2007 20:15:03 David Brown wrote:\n>> git-p4 was missing the execute bit setting if the file had other attribute\n>> bits set.\n>> ---\n>>  contrib/fast-import/git-p4 |    5 ++++-\n>>  1 files changed, 4 insertions(+), 1 deletions(-)\n>>\n>> diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4\n>> index adaaae6..50850b8 100755\n>> --- a/contrib/fast-import/git-p4\n>> +++ b/contrib/fast-import/git-p4\n>> @@ -932,7 +932,10 @@ class P4Sync(Command):\n>>                  data = file['data']\n>>\n>>                  mode = \"644\"\n>> -                if file[\"type\"].startswith(\"x\"):\n>> +                if (file[\"type\"].startswith(\"x\") or\n>> +                        file[\"type\"].startswith(\"cx\") or\n>> +                        file[\"type\"].startswith(\"kx\") or\n>> +                        file[\"type\"].startswith(\"ux\")):\n>>                      mode = \"755\"\n>>                  elif file[\"type\"] == \"symlink\":\n>>                      mode = \"120000\"\n>\n>I'm fine with this, so unless you find a better way:\n\nWell, I just tested it, and it still doesn't work, so I need to take some\ntime and try to figure out what is happening.\n\nI'm sometimes getting back 'xtext', and sometimes things like 'text+mx'\nback from perforce, so I need to read up, and really figure out what to\nlook for.\n\nDavid\n"},{"id":"53597","messageId":"56b7f5510709191231g22385e32y9c34d711d65b3bb7@mail.gmail.com","threadId":"9944","inReplyTo":"20070919191412.GA6475@old.davidb.org","subject":"Re: [PATCH] [git-p4] Detect exec bit in more cases.","fromName":"Dana How","fromEmail":"danahow@gmail.com","sentAt":"2007-09-19T19:31:52Z","receivedAt":"2007-09-19T19:31:52Z","isPatch":true,"sender":{"key":"danahow@gmail.com","avatar":null},"body":"On 9/19/07, David Brown <git@davidb.org> wrote:\n> On Wed, Sep 19, 2007 at 09:03:50PM +0200, Simon Hausmann wrote:\n> >On Wednesday 19 September 2007 20:15:03 David Brown wrote:\n> >> git-p4 was missing the execute bit setting if the file had other attribute\n> >> bits set.\n> >\n> >I'm fine with this, so unless you find a better way:\n>\n> Well, I just tested it, and it still doesn't work, so I need to take some\n> time and try to figure out what is happening.\n>\n> I'm sometimes getting back 'xtext', and sometimes things like 'text+mx'\n> back from perforce, so I need to read up, and really figure out what to\n> look for.\n\nThe output of \"git p4 filetypes\" was enough for me\nwhen I wrote my p4 front-end to fast-import;\nI never did read the p4 manual.\n\nHave fun,\n-- \nDana L. How  danahow@gmail.com  +1 650 804 5991 cell\n"},{"id":"53599","messageId":"20070919194944.GA11271@old.davidb.org","threadId":"9944","inReplyTo":"56b7f5510709191231g22385e32y9c34d711d65b3bb7@mail.gmail.com","subject":"Re: [PATCH] [git-p4] Detect exec bit in more cases.","fromName":"David Brown","fromEmail":"git@davidb.org","sentAt":"2007-09-19T19:49:44Z","receivedAt":"2007-09-19T19:49:44Z","isPatch":true,"sender":{"key":"git@davidb.org","avatar":"https://gravatar.com/avatar/94c86a2938470a74c2eac5e2b69afc0871f79a660295c02219597aba8cb101c1?d=mp&s=160"},"body":"On Wed, Sep 19, 2007 at 12:31:52PM -0700, Dana How wrote:\n>On 9/19/07, David Brown <git@davidb.org> wrote:\n>> On Wed, Sep 19, 2007 at 09:03:50PM +0200, Simon Hausmann wrote:\n>> >On Wednesday 19 September 2007 20:15:03 David Brown wrote:\n>> >> git-p4 was missing the execute bit setting if the file had other attribute\n>> >> bits set.\n>> >\n>> >I'm fine with this, so unless you find a better way:\n>>\n>> Well, I just tested it, and it still doesn't work, so I need to take some\n>> time and try to figure out what is happening.\n>>\n>> I'm sometimes getting back 'xtext', and sometimes things like 'text+mx'\n>> back from perforce, so I need to read up, and really figure out what to\n>> look for.\n>\n>The output of \"git p4 filetypes\" was enough for me\n>when I wrote my p4 front-end to fast-import;\n>I never did read the p4 manual.\n\nI have a patch based on what 'p4 help filetypes'.  I'm running it now on a\nlarge test repository, and I'll compare the results when it is done.\nProvided it works, I'll send a new patch in a little bit.\n\nDavid\n"},{"id":"53600","messageId":"1190232768445-git-send-email-git@davidb.org","threadId":"9944","inReplyTo":"119022570352-git-send-email-git@davidb.org","subject":"[PATCH] [git-p4] Detect exec bit in more cases.","fromName":"David Brown","fromEmail":"git@davidb.org","sentAt":"2007-09-19T20:12:48Z","receivedAt":"2007-09-19T20:12:48Z","isPatch":true,"sender":{"key":"git@davidb.org","avatar":"https://gravatar.com/avatar/94c86a2938470a74c2eac5e2b69afc0871f79a660295c02219597aba8cb101c1?d=mp&s=160"},"body":"git-p4 was missing the execute bit setting if the file had other attribute\nbits set.\n---\n contrib/fast-import/git-p4 |   10 +++++++++-\n 1 files changed, 9 insertions(+), 1 deletions(-)\n\ndiff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4\nindex adaaae6..557649a 100755\n--- a/contrib/fast-import/git-p4\n+++ b/contrib/fast-import/git-p4\n@@ -63,6 +63,14 @@ def system(cmd):\n     if os.system(cmd) != 0:\n         die(\"command failed: %s\" % cmd)\n \n+def isP4Exec(kind):\n+    \"\"\"Determine if a Perforce 'kind' should have execute permission\n+\n+    'p4 help filetypes' gives a list of the types.  If it starts with 'x',\n+    or x follows one of a few letters.  Otherwise, if there is an 'x' after\n+    a plus sign, it is also executable\"\"\"\n+    return (re.search(r\"(^[cku]?x)|\\+.*x\", kind) != None)\n+\n def p4CmdList(cmd, stdin=None, stdin_mode='w+b'):\n     cmd = \"p4 -G %s\" % cmd\n     if verbose:\n@@ -932,7 +940,7 @@ class P4Sync(Command):\n                 data = file['data']\n \n                 mode = \"644\"\n-                if file[\"type\"].startswith(\"x\"):\n+                if isP4Exec(file[\"type\"]):\n                     mode = \"755\"\n                 elif file[\"type\"] == \"symlink\":\n                     mode = \"120000\"\n-- \n1.5.3\n"},{"id":"53606","messageId":"20070919210318.GA32131@old.davidb.org","threadId":"9944","inReplyTo":"1190232768445-git-send-email-git@davidb.org","subject":"Re: [PATCH] [git-p4] Detect exec bit in more cases.","fromName":"David Brown","fromEmail":"git@davidb.org","sentAt":"2007-09-19T21:03:18Z","receivedAt":"2007-09-19T21:03:18Z","isPatch":true,"sender":{"key":"git@davidb.org","avatar":"https://gravatar.com/avatar/94c86a2938470a74c2eac5e2b69afc0871f79a660295c02219597aba8cb101c1?d=mp&s=160"},"body":"On Wed, Sep 19, 2007 at 01:12:48PM -0700, David Brown wrote:\n>git-p4 was missing the execute bit setting if the file had other attribute\n>bits set.\n>---\n> contrib/fast-import/git-p4 |   10 +++++++++-\n> 1 files changed, 9 insertions(+), 1 deletions(-)\n\nI've tested this patch on our fairly large P4 repo, and at least the tip\nexactly matches the files that P4 finds.  So, it at least should be better.\ngit-p4 still has some problems with case-insensitive servers.\n\nDave\n"},{"id":"53654","messageId":"20070920151637.GA26873@old.davidb.org","threadId":"9944","inReplyTo":"200709192103.53526.simon@lst.de","subject":"Re: [PATCH] [git-p4] Detect exec bit in more cases.","fromName":"David Brown","fromEmail":"git@davidb.org","sentAt":"2007-09-20T15:16:37Z","receivedAt":"2007-09-20T15:16:37Z","isPatch":true,"sender":{"key":"git@davidb.org","avatar":"https://gravatar.com/avatar/94c86a2938470a74c2eac5e2b69afc0871f79a660295c02219597aba8cb101c1?d=mp&s=160"},"body":"On Wed, Sep 19, 2007 at 09:03:50PM +0200, Simon Hausmann wrote:\n>On Wednesday 19 September 2007 20:15:03 David Brown wrote:\n\n>> git-p4 was missing the execute bit setting if the file had other attribute\n>> bits set.\n>> ---\n\n>I'm fine with this, so unless you find a better way:\n>\n>Acked-By: Simon Hausmann <simon@lst.de>\n\nI sent out an improved version of this patch yesterday\n<1190232768445-git-send-email-git@davidb.org> that I'd like to get\napproved.  I guess I'm not quite sure what happens at this point with a\npatch.\n\nThanks,\nDavid\n"},{"id":"53685","messageId":"7vodfxj6db.fsf@gitster.siamese.dyndns.org","threadId":"9944","inReplyTo":"20070920151637.GA26873@old.davidb.org","subject":"Re: [PATCH] [git-p4] Detect exec bit in more cases.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-09-20T22:53:52Z","receivedAt":"2007-09-20T22:53:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"David Brown <git@davidb.org> writes:\n\n> On Wed, Sep 19, 2007 at 09:03:50PM +0200, Simon Hausmann wrote:\n>>On Wednesday 19 September 2007 20:15:03 David Brown wrote:\n>\n>>> git-p4 was missing the execute bit setting if the file had other attribute\n>>> bits set.\n>>> ---\n>\n>>I'm fine with this, so unless you find a better way:\n>>\n>>Acked-By: Simon Hausmann <simon@lst.de>\n>\n> I sent out an improved version of this patch yesterday\n> <1190232768445-git-send-email-git@davidb.org> that I'd like to get\n> approved.  I guess I'm not quite sure what happens at this point with a\n> patch.\n\nI still have that *768445* message as \"the last one proposed as\nbetter than previous ones\" in my mbox.\n\nSimon?\n"},{"id":"53708","messageId":"200709211220.05434.simon@lst.de","threadId":"9944","inReplyTo":"7vodfxj6db.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] [git-p4] Detect exec bit in more cases.","fromName":"Simon Hausmann","fromEmail":"simon@lst.de","sentAt":"2007-09-21T10:20:01Z","receivedAt":"2007-09-21T10:20:01Z","isPatch":true,"sender":{"key":"hausmann@kde.org","avatar":"https://gravatar.com/avatar/bc9aad4fb31dce17eb66e690e7b51fe980c62da3c225c785da35dd806b8da778?d=mp&s=160"},"body":"On Friday 21 September 2007 00:53:52 Junio C Hamano wrote:\n> David Brown <git@davidb.org> writes:\n> > On Wed, Sep 19, 2007 at 09:03:50PM +0200, Simon Hausmann wrote:\n> >>On Wednesday 19 September 2007 20:15:03 David Brown wrote:\n> >>> git-p4 was missing the execute bit setting if the file had other\n> >>> attribute bits set.\n> >>> ---\n> >>\n> >>I'm fine with this, so unless you find a better way:\n> >>\n> >>Acked-By: Simon Hausmann <simon@lst.de>\n> >\n> > I sent out an improved version of this patch yesterday\n> > <1190232768445-git-send-email-git@davidb.org> that I'd like to get\n> > approved.  I guess I'm not quite sure what happens at this point with a\n> > patch.\n>\n> I still have that *768445* message as \"the last one proposed as\n> better than previous ones\" in my mbox.\n>\n> Simon?\n\nIndeed, the new improved version is much better :)\n\nAcked-By: Simon Hausmann <simon@lst.de>\n\n\nSimon\n"},{"id":"53751","messageId":"7vfy17iuu9.fsf@gitster.siamese.dyndns.org","threadId":"9944","inReplyTo":"200709211220.05434.simon@lst.de","subject":"Re: [PATCH] [git-p4] Detect exec bit in more cases.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-09-21T21:15:10Z","receivedAt":"2007-09-21T21:15:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Simon Hausmann <simon@lst.de> writes:\n\n> On Friday 21 September 2007 00:53:52 Junio C Hamano wrote:\n>> David Brown <git@davidb.org> writes:\n>> > On Wed, Sep 19, 2007 at 09:03:50PM +0200, Simon Hausmann wrote:\n>> >>On Wednesday 19 September 2007 20:15:03 David Brown wrote:\n>> >>> git-p4 was missing the execute bit setting if the file had other\n>> >>> attribute bits set.\n>> >>> ---\n>> >>\n>> >>I'm fine with this, so unless you find a better way:\n>> >>\n>> >>Acked-By: Simon Hausmann <simon@lst.de>\n>> >\n>> > I sent out an improved version of this patch yesterday\n>> > <1190232768445-git-send-email-git@davidb.org> that I'd like to get\n>> > approved.  I guess I'm not quite sure what happens at this point with a\n>> > patch.\n>>\n>> I still have that *768445* message as \"the last one proposed as\n>> better than previous ones\" in my mbox.\n>>\n>> Simon?\n>\n> Indeed, the new improved version is much better :)\n>\n> Acked-By: Simon Hausmann <simon@lst.de>\n\nThanks.  This should go to 'maint' (part of v1.5.3.3) right?\n"},{"id":"53752","messageId":"20070921212443.GA14983@old.davidb.org","threadId":"9944","inReplyTo":"7vfy17iuu9.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] [git-p4] Detect exec bit in more cases.","fromName":"David Brown","fromEmail":"git@davidb.org","sentAt":"2007-09-21T21:24:43Z","receivedAt":"2007-09-21T21:24:43Z","isPatch":true,"sender":{"key":"git@davidb.org","avatar":"https://gravatar.com/avatar/94c86a2938470a74c2eac5e2b69afc0871f79a660295c02219597aba8cb101c1?d=mp&s=160"},"body":"On Fri, Sep 21, 2007 at 02:15:10PM -0700, Junio C Hamano wrote:\n>Simon Hausmann <simon@lst.de> writes:\n>\n>> On Friday 21 September 2007 00:53:52 Junio C Hamano wrote:\n>>> David Brown <git@davidb.org> writes:\n>>> > On Wed, Sep 19, 2007 at 09:03:50PM +0200, Simon Hausmann wrote:\n>>> >>On Wednesday 19 September 2007 20:15:03 David Brown wrote:\n>>> >>> git-p4 was missing the execute bit setting if the file had other\n>>> >>> attribute bits set.\n>>> >>> ---\n>>> >>\n>>> >>I'm fine with this, so unless you find a better way:\n>>> >>\n>>> >>Acked-By: Simon Hausmann <simon@lst.de>\n>>> >\n>>> > I sent out an improved version of this patch yesterday\n>>> > <1190232768445-git-send-email-git@davidb.org> that I'd like to get\n>>> > approved.  I guess I'm not quite sure what happens at this point with a\n>>> > patch.\n>>>\n>>> I still have that *768445* message as \"the last one proposed as\n>>> better than previous ones\" in my mbox.\n>>>\n>>> Simon?\n>>\n>> Indeed, the new improved version is much better :)\n>>\n>> Acked-By: Simon Hausmann <simon@lst.de>\n>\n>Thanks.  This should go to 'maint' (part of v1.5.3.3) right?\n\nSounds good by me.  I've been using it on a few other repos, and haven't\nhad any problems.\n\nDavid\n"},{"id":"53890","messageId":"200709240820.45185.simon@lst.de","threadId":"9944","inReplyTo":"20070921212443.GA14983@old.davidb.org","subject":"Re: [PATCH] [git-p4] Detect exec bit in more cases.","fromName":"Simon Hausmann","fromEmail":"simon@lst.de","sentAt":"2007-09-24T06:20:41Z","receivedAt":"2007-09-24T06:20:41Z","isPatch":true,"sender":{"key":"hausmann@kde.org","avatar":"https://gravatar.com/avatar/bc9aad4fb31dce17eb66e690e7b51fe980c62da3c225c785da35dd806b8da778?d=mp&s=160"},"body":"On Friday 21 September 2007 23:24:43 David Brown wrote:\n> On Fri, Sep 21, 2007 at 02:15:10PM -0700, Junio C Hamano wrote:\n> >Simon Hausmann <simon@lst.de> writes:\n> >> On Friday 21 September 2007 00:53:52 Junio C Hamano wrote:\n> >>> David Brown <git@davidb.org> writes:\n> >>> > On Wed, Sep 19, 2007 at 09:03:50PM +0200, Simon Hausmann wrote:\n> >>> >>On Wednesday 19 September 2007 20:15:03 David Brown wrote:\n> >>> >>> git-p4 was missing the execute bit setting if the file had other\n> >>> >>> attribute bits set.\n> >>> >>> ---\n> >>> >>\n> >>> >>I'm fine with this, so unless you find a better way:\n> >>> >>\n> >>> >>Acked-By: Simon Hausmann <simon@lst.de>\n> >>> >\n> >>> > I sent out an improved version of this patch yesterday\n> >>> > <1190232768445-git-send-email-git@davidb.org> that I'd like to get\n> >>> > approved.  I guess I'm not quite sure what happens at this point with\n> >>> > a patch.\n> >>>\n> >>> I still have that *768445* message as \"the last one proposed as\n> >>> better than previous ones\" in my mbox.\n> >>>\n> >>> Simon?\n> >>\n> >> Indeed, the new improved version is much better :)\n> >>\n> >> Acked-By: Simon Hausmann <simon@lst.de>\n> >\n> >Thanks.  This should go to 'maint' (part of v1.5.3.3) right?\n>\n> Sounds good by me.  I've been using it on a few other repos, and haven't\n> had any problems.\n\nAgreed.\n\n\nSimon\n"}]}