Re: Project checkout vs. Perforce SCM
Re: Project checkout vs. Perforce SCM
- Subject: Re: Project checkout vs. Perforce SCM
- From: Chas Spillar <email@hidden>
- Date: Tue, 22 Nov 2005 12:41:10 -0800
- Thread-topic: Project checkout vs. Perforce SCM
Michael,
You need to edit the appropriate project files to stop this warning from
occurring. The reason that you are getting the message has to do with the
fact that the project files are write protected until you chmod them or p4
edit them. I have found that I need to do the following to get the project
to act properly:
Where MySourceDirectory is a variable containing the path of
myproject.xcodeproj:
cd $MySourceDirectory
p4 edit myproject.xcodeproj/*
chmod -R +w myproject.xcodeproj/
This works for me. Then when any changes are made to the project file you
can submit them whenever it is necessary.
Chas.
> From: Chuck Soper <email@hidden>
> Date: Tue, 22 Nov 2005 11:40:38 -0800
> To: Michael Hecht <email@hidden>, XCode Users
> <email@hidden>
> Subject: Re: Project checkout vs. Perforce SCM
>
> At 11:06 AM -0500 11/22/05, Michael Hecht wrote:
> We're using Perforce for SCM. I've added Foo.xcodeproj/project.pbxproj to my
> Perforce depot. So this file is now write-locked in my workspace. Note that my
> johndoe.pbxuser, johndoe.mode2, etc., files are not in the Perforce depot and
> are not write-locked.
>
> Now when I quit Xcode I get this warning:
>
> Warning
>
> The project "Foo.xcodeproj" is read only and cannot be saved.
> Your changes will be lost when you close it. You may need to
> SCM edit the project file to gain writability.
>
> Close and Lose Changes Don't Close
>
> After searching the online help, I came across this "expert" setting:
>
> defaults write com.apple.Xcode PBXDontWarnIfProjectSaveFails YES
>
> I've tried this but it doesn't seem to help. I've submitted this as a bug to
> Apple.
>
> Furthermore, for some of our developers, they turn on SCM in the project
> (select project > Get Info > General: SCM System: Perforce; Enable SCM: Yes).
> These settings stay in effect until they quit Xcode, at which point they get
> the above warning. When next opened, the project settings are not retained.
> (Note that the Perforce settings like P4PORT, P4CLIENT, etc., are, however,
> retained.)
>
> Note that when I initially added the project.pbxproj file to the Perforce
> depot, these settings were in effect!
>
> So I'm seeing several issues:
> - Xcode may not be properly dividing project settings that are per-user (like
> whether to use SCM) vs. for all users (like files in project, build settings,
> etc.).
> - Alternately, when Xcode needs to write new settings to the johndoe.pbxuser
> file, perhaps it gives up if it sees that project.pbxproj is write-locked.
> - When a user wants to modify the project in a way that affects all users,
> they should be given the SCM Edit prompt.
> - PBXDontWarnIfProjectSaveFails doesn't seem to actually work.
>
> So my question for this forum is two-fold: what exactly do you think the bug
> is here (if any)? And how do other Perforce users deal with this issue?
>
> (Note that I've read archived messages on this list about adding all the
> johndoe.pbxuser files to the depot, but that "solution" doesn't look tenable
> to me.)
>
> --Michael
>
>
> If you add the following lines to your Perforce typemap (on the server) then I
> don't think that you'll get the warnings:
> unicode+w //...project.pbxproj
> unicode+w //....pbxuser
> unicode+w //....mode1
>
> This makes the files writeable for all users. If you do that be sure to use
> the Perforce reopen command on the project files to change their file types to
> unicode+w.
>
> I usually use p4v when I checkout (i.e. open for write) the project file. I
> typically open three files: project.pbxproj, chuck.pbxuser and chuck.mode1.
>
> hope this helps,
> Chuck
>
>
> ?
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden