* [PATCH] [git-p4] Detect exec bit in more cases.
@ 2007-09-19 18:15 David Brown
2007-09-19 19:03 ` Simon Hausmann
2007-09-19 20:12 ` David Brown
0 siblings, 2 replies; 13+ messages in thread
From: David Brown @ 2007-09-19 18:15 UTC (permalink / raw)
To: git; +Cc: David Brown
git-p4 was missing the execute bit setting if the file had other attribute
bits set.
---
contrib/fast-import/git-p4 | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index adaaae6..50850b8 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -932,7 +932,10 @@ class P4Sync(Command):
data = file['data']
mode = "644"
- if file["type"].startswith("x"):
+ if (file["type"].startswith("x") or
+ file["type"].startswith("cx") or
+ file["type"].startswith("kx") or
+ file["type"].startswith("ux")):
mode = "755"
elif file["type"] == "symlink":
mode = "120000"
--
1.5.3.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH] [git-p4] Detect exec bit in more cases.
2007-09-19 18:15 [PATCH] [git-p4] Detect exec bit in more cases David Brown
@ 2007-09-19 19:03 ` Simon Hausmann
2007-09-19 19:14 ` David Brown
2007-09-20 15:16 ` David Brown
2007-09-19 20:12 ` David Brown
1 sibling, 2 replies; 13+ messages in thread
From: Simon Hausmann @ 2007-09-19 19:03 UTC (permalink / raw)
To: David Brown; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 1058 bytes --]
On Wednesday 19 September 2007 20:15:03 David Brown wrote:
> git-p4 was missing the execute bit setting if the file had other attribute
> bits set.
> ---
> contrib/fast-import/git-p4 | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
> index adaaae6..50850b8 100755
> --- a/contrib/fast-import/git-p4
> +++ b/contrib/fast-import/git-p4
> @@ -932,7 +932,10 @@ class P4Sync(Command):
> data = file['data']
>
> mode = "644"
> - if file["type"].startswith("x"):
> + if (file["type"].startswith("x") or
> + file["type"].startswith("cx") or
> + file["type"].startswith("kx") or
> + file["type"].startswith("ux")):
> mode = "755"
> elif file["type"] == "symlink":
> mode = "120000"
I'm fine with this, so unless you find a better way:
Acked-By: Simon Hausmann <simon@lst.de>
Simon
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] [git-p4] Detect exec bit in more cases.
2007-09-19 19:03 ` Simon Hausmann
@ 2007-09-19 19:14 ` David Brown
2007-09-19 19:31 ` Dana How
2007-09-20 15:16 ` David Brown
1 sibling, 1 reply; 13+ messages in thread
From: David Brown @ 2007-09-19 19:14 UTC (permalink / raw)
To: Simon Hausmann; +Cc: git
On Wed, Sep 19, 2007 at 09:03:50PM +0200, Simon Hausmann wrote:
>On Wednesday 19 September 2007 20:15:03 David Brown wrote:
>> git-p4 was missing the execute bit setting if the file had other attribute
>> bits set.
>> ---
>> contrib/fast-import/git-p4 | 5 ++++-
>> 1 files changed, 4 insertions(+), 1 deletions(-)
>>
>> diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
>> index adaaae6..50850b8 100755
>> --- a/contrib/fast-import/git-p4
>> +++ b/contrib/fast-import/git-p4
>> @@ -932,7 +932,10 @@ class P4Sync(Command):
>> data = file['data']
>>
>> mode = "644"
>> - if file["type"].startswith("x"):
>> + if (file["type"].startswith("x") or
>> + file["type"].startswith("cx") or
>> + file["type"].startswith("kx") or
>> + file["type"].startswith("ux")):
>> mode = "755"
>> elif file["type"] == "symlink":
>> mode = "120000"
>
>I'm fine with this, so unless you find a better way:
Well, I just tested it, and it still doesn't work, so I need to take some
time and try to figure out what is happening.
I'm sometimes getting back 'xtext', and sometimes things like 'text+mx'
back from perforce, so I need to read up, and really figure out what to
look for.
David
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] [git-p4] Detect exec bit in more cases.
2007-09-19 19:14 ` David Brown
@ 2007-09-19 19:31 ` Dana How
2007-09-19 19:49 ` David Brown
0 siblings, 1 reply; 13+ messages in thread
From: Dana How @ 2007-09-19 19:31 UTC (permalink / raw)
To: Simon Hausmann, git, danahow
On 9/19/07, David Brown <git@davidb.org> wrote:
> On Wed, Sep 19, 2007 at 09:03:50PM +0200, Simon Hausmann wrote:
> >On Wednesday 19 September 2007 20:15:03 David Brown wrote:
> >> git-p4 was missing the execute bit setting if the file had other attribute
> >> bits set.
> >
> >I'm fine with this, so unless you find a better way:
>
> Well, I just tested it, and it still doesn't work, so I need to take some
> time and try to figure out what is happening.
>
> I'm sometimes getting back 'xtext', and sometimes things like 'text+mx'
> back from perforce, so I need to read up, and really figure out what to
> look for.
The output of "git p4 filetypes" was enough for me
when I wrote my p4 front-end to fast-import;
I never did read the p4 manual.
Have fun,
--
Dana L. How danahow@gmail.com +1 650 804 5991 cell
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] [git-p4] Detect exec bit in more cases.
2007-09-19 19:31 ` Dana How
@ 2007-09-19 19:49 ` David Brown
0 siblings, 0 replies; 13+ messages in thread
From: David Brown @ 2007-09-19 19:49 UTC (permalink / raw)
To: Dana How; +Cc: Simon Hausmann, git
On Wed, Sep 19, 2007 at 12:31:52PM -0700, Dana How wrote:
>On 9/19/07, David Brown <git@davidb.org> wrote:
>> On Wed, Sep 19, 2007 at 09:03:50PM +0200, Simon Hausmann wrote:
>> >On Wednesday 19 September 2007 20:15:03 David Brown wrote:
>> >> git-p4 was missing the execute bit setting if the file had other attribute
>> >> bits set.
>> >
>> >I'm fine with this, so unless you find a better way:
>>
>> Well, I just tested it, and it still doesn't work, so I need to take some
>> time and try to figure out what is happening.
>>
>> I'm sometimes getting back 'xtext', and sometimes things like 'text+mx'
>> back from perforce, so I need to read up, and really figure out what to
>> look for.
>
>The output of "git p4 filetypes" was enough for me
>when I wrote my p4 front-end to fast-import;
>I never did read the p4 manual.
I have a patch based on what 'p4 help filetypes'. I'm running it now on a
large test repository, and I'll compare the results when it is done.
Provided it works, I'll send a new patch in a little bit.
David
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH] [git-p4] Detect exec bit in more cases.
2007-09-19 18:15 [PATCH] [git-p4] Detect exec bit in more cases David Brown
2007-09-19 19:03 ` Simon Hausmann
@ 2007-09-19 20:12 ` David Brown
2007-09-19 21:03 ` David Brown
1 sibling, 1 reply; 13+ messages in thread
From: David Brown @ 2007-09-19 20:12 UTC (permalink / raw)
To: git; +Cc: David Brown
git-p4 was missing the execute bit setting if the file had other attribute
bits set.
---
contrib/fast-import/git-p4 | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index adaaae6..557649a 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -63,6 +63,14 @@ def system(cmd):
if os.system(cmd) != 0:
die("command failed: %s" % cmd)
+def isP4Exec(kind):
+ """Determine if a Perforce 'kind' should have execute permission
+
+ 'p4 help filetypes' gives a list of the types. If it starts with 'x',
+ or x follows one of a few letters. Otherwise, if there is an 'x' after
+ a plus sign, it is also executable"""
+ return (re.search(r"(^[cku]?x)|\+.*x", kind) != None)
+
def p4CmdList(cmd, stdin=None, stdin_mode='w+b'):
cmd = "p4 -G %s" % cmd
if verbose:
@@ -932,7 +940,7 @@ class P4Sync(Command):
data = file['data']
mode = "644"
- if file["type"].startswith("x"):
+ if isP4Exec(file["type"]):
mode = "755"
elif file["type"] == "symlink":
mode = "120000"
--
1.5.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH] [git-p4] Detect exec bit in more cases.
2007-09-19 20:12 ` David Brown
@ 2007-09-19 21:03 ` David Brown
0 siblings, 0 replies; 13+ messages in thread
From: David Brown @ 2007-09-19 21:03 UTC (permalink / raw)
To: git
On Wed, Sep 19, 2007 at 01:12:48PM -0700, David Brown wrote:
>git-p4 was missing the execute bit setting if the file had other attribute
>bits set.
>---
> contrib/fast-import/git-p4 | 10 +++++++++-
> 1 files changed, 9 insertions(+), 1 deletions(-)
I've tested this patch on our fairly large P4 repo, and at least the tip
exactly matches the files that P4 finds. So, it at least should be better.
git-p4 still has some problems with case-insensitive servers.
Dave
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] [git-p4] Detect exec bit in more cases.
2007-09-19 19:03 ` Simon Hausmann
2007-09-19 19:14 ` David Brown
@ 2007-09-20 15:16 ` David Brown
2007-09-20 22:53 ` Junio C Hamano
1 sibling, 1 reply; 13+ messages in thread
From: David Brown @ 2007-09-20 15:16 UTC (permalink / raw)
To: Simon Hausmann; +Cc: git
On Wed, Sep 19, 2007 at 09:03:50PM +0200, Simon Hausmann wrote:
>On Wednesday 19 September 2007 20:15:03 David Brown wrote:
>> git-p4 was missing the execute bit setting if the file had other attribute
>> bits set.
>> ---
>I'm fine with this, so unless you find a better way:
>
>Acked-By: Simon Hausmann <simon@lst.de>
I sent out an improved version of this patch yesterday
<1190232768445-git-send-email-git@davidb.org> that I'd like to get
approved. I guess I'm not quite sure what happens at this point with a
patch.
Thanks,
David
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] [git-p4] Detect exec bit in more cases.
2007-09-20 15:16 ` David Brown
@ 2007-09-20 22:53 ` Junio C Hamano
2007-09-21 10:20 ` Simon Hausmann
0 siblings, 1 reply; 13+ messages in thread
From: Junio C Hamano @ 2007-09-20 22:53 UTC (permalink / raw)
To: David Brown; +Cc: git, Simon Hausmann
David Brown <git@davidb.org> writes:
> On Wed, Sep 19, 2007 at 09:03:50PM +0200, Simon Hausmann wrote:
>>On Wednesday 19 September 2007 20:15:03 David Brown wrote:
>
>>> git-p4 was missing the execute bit setting if the file had other attribute
>>> bits set.
>>> ---
>
>>I'm fine with this, so unless you find a better way:
>>
>>Acked-By: Simon Hausmann <simon@lst.de>
>
> I sent out an improved version of this patch yesterday
> <1190232768445-git-send-email-git@davidb.org> that I'd like to get
> approved. I guess I'm not quite sure what happens at this point with a
> patch.
I still have that *768445* message as "the last one proposed as
better than previous ones" in my mbox.
Simon?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] [git-p4] Detect exec bit in more cases.
2007-09-20 22:53 ` Junio C Hamano
@ 2007-09-21 10:20 ` Simon Hausmann
2007-09-21 21:15 ` Junio C Hamano
0 siblings, 1 reply; 13+ messages in thread
From: Simon Hausmann @ 2007-09-21 10:20 UTC (permalink / raw)
To: Junio C Hamano; +Cc: David Brown, git
[-- Attachment #1: Type: text/plain, Size: 889 bytes --]
On Friday 21 September 2007 00:53:52 Junio C Hamano wrote:
> David Brown <git@davidb.org> writes:
> > On Wed, Sep 19, 2007 at 09:03:50PM +0200, Simon Hausmann wrote:
> >>On Wednesday 19 September 2007 20:15:03 David Brown wrote:
> >>> git-p4 was missing the execute bit setting if the file had other
> >>> attribute bits set.
> >>> ---
> >>
> >>I'm fine with this, so unless you find a better way:
> >>
> >>Acked-By: Simon Hausmann <simon@lst.de>
> >
> > I sent out an improved version of this patch yesterday
> > <1190232768445-git-send-email-git@davidb.org> that I'd like to get
> > approved. I guess I'm not quite sure what happens at this point with a
> > patch.
>
> I still have that *768445* message as "the last one proposed as
> better than previous ones" in my mbox.
>
> Simon?
Indeed, the new improved version is much better :)
Acked-By: Simon Hausmann <simon@lst.de>
Simon
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] [git-p4] Detect exec bit in more cases.
2007-09-21 10:20 ` Simon Hausmann
@ 2007-09-21 21:15 ` Junio C Hamano
2007-09-21 21:24 ` David Brown
0 siblings, 1 reply; 13+ messages in thread
From: Junio C Hamano @ 2007-09-21 21:15 UTC (permalink / raw)
To: Simon Hausmann; +Cc: David Brown, git
Simon Hausmann <simon@lst.de> writes:
> On Friday 21 September 2007 00:53:52 Junio C Hamano wrote:
>> David Brown <git@davidb.org> writes:
>> > On Wed, Sep 19, 2007 at 09:03:50PM +0200, Simon Hausmann wrote:
>> >>On Wednesday 19 September 2007 20:15:03 David Brown wrote:
>> >>> git-p4 was missing the execute bit setting if the file had other
>> >>> attribute bits set.
>> >>> ---
>> >>
>> >>I'm fine with this, so unless you find a better way:
>> >>
>> >>Acked-By: Simon Hausmann <simon@lst.de>
>> >
>> > I sent out an improved version of this patch yesterday
>> > <1190232768445-git-send-email-git@davidb.org> that I'd like to get
>> > approved. I guess I'm not quite sure what happens at this point with a
>> > patch.
>>
>> I still have that *768445* message as "the last one proposed as
>> better than previous ones" in my mbox.
>>
>> Simon?
>
> Indeed, the new improved version is much better :)
>
> Acked-By: Simon Hausmann <simon@lst.de>
Thanks. This should go to 'maint' (part of v1.5.3.3) right?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] [git-p4] Detect exec bit in more cases.
2007-09-21 21:15 ` Junio C Hamano
@ 2007-09-21 21:24 ` David Brown
2007-09-24 6:20 ` Simon Hausmann
0 siblings, 1 reply; 13+ messages in thread
From: David Brown @ 2007-09-21 21:24 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Simon Hausmann, git
On Fri, Sep 21, 2007 at 02:15:10PM -0700, Junio C Hamano wrote:
>Simon Hausmann <simon@lst.de> writes:
>
>> On Friday 21 September 2007 00:53:52 Junio C Hamano wrote:
>>> David Brown <git@davidb.org> writes:
>>> > On Wed, Sep 19, 2007 at 09:03:50PM +0200, Simon Hausmann wrote:
>>> >>On Wednesday 19 September 2007 20:15:03 David Brown wrote:
>>> >>> git-p4 was missing the execute bit setting if the file had other
>>> >>> attribute bits set.
>>> >>> ---
>>> >>
>>> >>I'm fine with this, so unless you find a better way:
>>> >>
>>> >>Acked-By: Simon Hausmann <simon@lst.de>
>>> >
>>> > I sent out an improved version of this patch yesterday
>>> > <1190232768445-git-send-email-git@davidb.org> that I'd like to get
>>> > approved. I guess I'm not quite sure what happens at this point with a
>>> > patch.
>>>
>>> I still have that *768445* message as "the last one proposed as
>>> better than previous ones" in my mbox.
>>>
>>> Simon?
>>
>> Indeed, the new improved version is much better :)
>>
>> Acked-By: Simon Hausmann <simon@lst.de>
>
>Thanks. This should go to 'maint' (part of v1.5.3.3) right?
Sounds good by me. I've been using it on a few other repos, and haven't
had any problems.
David
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] [git-p4] Detect exec bit in more cases.
2007-09-21 21:24 ` David Brown
@ 2007-09-24 6:20 ` Simon Hausmann
0 siblings, 0 replies; 13+ messages in thread
From: Simon Hausmann @ 2007-09-24 6:20 UTC (permalink / raw)
To: David Brown; +Cc: Junio C Hamano, git
[-- Attachment #1: Type: text/plain, Size: 1329 bytes --]
On Friday 21 September 2007 23:24:43 David Brown wrote:
> On Fri, Sep 21, 2007 at 02:15:10PM -0700, Junio C Hamano wrote:
> >Simon Hausmann <simon@lst.de> writes:
> >> On Friday 21 September 2007 00:53:52 Junio C Hamano wrote:
> >>> David Brown <git@davidb.org> writes:
> >>> > On Wed, Sep 19, 2007 at 09:03:50PM +0200, Simon Hausmann wrote:
> >>> >>On Wednesday 19 September 2007 20:15:03 David Brown wrote:
> >>> >>> git-p4 was missing the execute bit setting if the file had other
> >>> >>> attribute bits set.
> >>> >>> ---
> >>> >>
> >>> >>I'm fine with this, so unless you find a better way:
> >>> >>
> >>> >>Acked-By: Simon Hausmann <simon@lst.de>
> >>> >
> >>> > I sent out an improved version of this patch yesterday
> >>> > <1190232768445-git-send-email-git@davidb.org> that I'd like to get
> >>> > approved. I guess I'm not quite sure what happens at this point with
> >>> > a patch.
> >>>
> >>> I still have that *768445* message as "the last one proposed as
> >>> better than previous ones" in my mbox.
> >>>
> >>> Simon?
> >>
> >> Indeed, the new improved version is much better :)
> >>
> >> Acked-By: Simon Hausmann <simon@lst.de>
> >
> >Thanks. This should go to 'maint' (part of v1.5.3.3) right?
>
> Sounds good by me. I've been using it on a few other repos, and haven't
> had any problems.
Agreed.
Simon
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2007-09-24 6:21 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-19 18:15 [PATCH] [git-p4] Detect exec bit in more cases David Brown
2007-09-19 19:03 ` Simon Hausmann
2007-09-19 19:14 ` David Brown
2007-09-19 19:31 ` Dana How
2007-09-19 19:49 ` David Brown
2007-09-20 15:16 ` David Brown
2007-09-20 22:53 ` Junio C Hamano
2007-09-21 10:20 ` Simon Hausmann
2007-09-21 21:15 ` Junio C Hamano
2007-09-21 21:24 ` David Brown
2007-09-24 6:20 ` Simon Hausmann
2007-09-19 20:12 ` David Brown
2007-09-19 21:03 ` David Brown
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).