Discussion:
[p4] [no]clobber and [no]allwrite options
Mujtaba Hussain
2003-03-25 20:50:55 UTC
Permalink
Hi All,

In the clientspec the [no]clobber option selects whether a writable file in
the workspace should be overwritten by perforce or not. There is another
option in the client spec [no]allwrite if you select allwrite then when you
do a sync everything is writeable.

What I have seen is that if you check out with allwrite and even if you have
noclobber option set p4 will overwrite your files. It appears to be a bug,
does anybody have any insight?

Note: I am evaluating perforce 2002.2.

Regards,
Mujtaba Hussain
Mujtaba Hussain
2003-03-25 21:44:01 UTC
Permalink
We plan to use the Check Consistency mechanism to find out which files were
edited/deleted. The reason we have to use this is because we are using
IntelliJ for our java development which provides excellent code refactoring
support. If you move a class to a different package it fixes references to
that class automatically. If you check out from perforce as read-only then
you lose that transparent refactoring capability because IntelliJ fails to
fix references to the refactored class as the referring classes are
read-only.

I tried using the plugin perfin which is supposed to support refactoring
with IntelliJ and perforce but wasn't able to make it work. The
documentation is sparse for the plugin. Any pointers about this are welcome
if anybody made it work successfully.

Thanks in advance.


How can it tell that you have or haven't modified the file?

Those options are there for specific build-environment cases in which the
compiler needs to over-write something that you normally would have readonly
in Perforce. Don't overuse them to imitate something like a bad CVS option,
which it sounds like you're doing.

If you want to modify a file, open it for edit. That puts entries in
databases that drive "p4 diff" and "p4 submit" so that they can operate very
quickly and efficiently.

-Jeff Bowles
w***@us.itmasters.com
2003-03-26 15:40:10 UTC
Permalink
Post by Mujtaba Hussain
What I have seen is that if you check out with allwrite and
even if you have noclobber option set p4 will overwrite your
files. It appears to be a bug, does anybody have any insight?
It's not a bug. To get the behavior you want, you would simply
make the file writable after syncing and use noclobber. The
allwrite option allows you to have a writable file that CAN be
updated AND is not set to read-only after submitting. (The
options apply to different operations.)

By the way, you can make individual files always writable by
setting the file's type with the +w modifier. -Wm

Loading...