• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Project checkout vs. Perforce SCM
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Project checkout vs. Perforce SCM


  • Subject: Re: Project checkout vs. Perforce SCM
  • From: Chuck Soper <email@hidden>
  • Date: Tue, 22 Nov 2005 11:40:38 -0800

Title: 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

  • Follow-Ups:
    • Re: Project checkout vs. Perforce SCM
      • From: Michael Hecht <email@hidden>
    • Re: Project checkout vs. Perforce SCM
      • From: Chas Spillar <email@hidden>
References: 
 >Project checkout vs. Perforce SCM (From: Michael Hecht <email@hidden>)

  • Prev by Date: Re: slow gdb startup time on one computer, not another
  • Next by Date: Re: Project checkout vs. Perforce SCM
  • Previous by thread: Re: Project checkout vs. Perforce SCM
  • Next by thread: Re: Project checkout vs. Perforce SCM
  • Index(es):
    • Date
    • Thread