[p4] Can I preserve executable status of a file?

Ivey, William william_ivey at bmc.com
Tue Apr 24 08:47:22 PDT 2007


> -----Original Message-----
> From: perforce-user-bounces at perforce.com
> [mailto:perforce-user-bounces at perforce.com]On Behalf Of Gross, Steve

> I have a file in my perforce depot "foo". Foo is, in fact, an 
> exectuable
> script. Is there a way to tell perforce that "foo" should have its
> executable bit set to true (on unix) ?

You have a few options. When you open a file for edit
on the command line you can specify the type with the -t
option. (Also works for add.)

p4 edit -t +x foo

If you forget to do it with the edit/add command, you can use
the reopen command before you submit the file:

p4 reopen -t +x foo

In P4Win right-click on an open file in your changelist and
you'll see an option to change the file's type.

Also, for executable files with consistent file patterns
(such as *.bat, *.sh, etc.) you can add entries to your
typemap table (p4 typemap).

-Wm



More information about the perforce-user mailing list