• 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: problems with Perforce and Xcode 3.0
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problems with Perforce and Xcode 3.0


  • Subject: Re: problems with Perforce and Xcode 3.0
  • From: Andrew Pontious <email@hidden>
  • Date: Thu, 1 May 2008 11:31:22 -0700

On May 1, 2008, at 10:35 AM, Ludovic Nicolle wrote:

In short the problem is that Xcode 3 does not refresh its cached information about the locked state of a file, ever. Xcode 2.5 had a different problem when using integrated perforce commands, where a checked out file would only become writable in xcode after a context switch. But I was so used to that one that i had developed a parasympathic motion to do command-tab twice.

Because of all the other problems with perforce integration in Xcode 3 (bugged separately by other coworkers), we are pretty much forced to use an external P4 client separately from Xcode. When we do this and go in Xcode 3, if the file has *already* been read by Xcode 3 in that session, it will forever believe the file is locked. Quitting Xcode is the only way I know to make it forget about the file state and show it as unlocked.

Similarly after a checkin, the file will forever remain writable, even though it should be locked, and Xcode 3 will happily write modifications to file without a warning.

My ticket only talked about the first behavior, not the second, but they both annoying. Based on a comment by someone at Apple yesterday, maybe those are fixed in 3.1, I sure hope so :)

The issues you mentioned:

- p4 editing a file from the command line, going to Xcode, and finding Xcode still thinks the file is locked
- p4 submitting a file from the command line, going to Xcode, and finding that Xcode still thinks the file is unlocked


are fixed in the next version of Xcode.

If you have SCM turned on in Xcode, you may still need to select SCM - > Refresh Entire Project for Xcode to get the new SCM status completely right. This is standard in Xcode when you've changed something SCM from the command line.

But whether you have SCM turned on or off, when you go back to Xcode, the locked status of the file should be correct.

These command-line commands also work within Xcode: SCM -> Edit and SCM -> Commit Changes..., respectively. And when you do it from within Xcode itself, you won't need to do the SCM -> Refresh Entire Project step, because Xcode will know what has changed already.

-- Andrew

On 1-May-08, at 2:08 AM, Andrew Pontious wrote:


On Apr 30, 2008, at 4:01 PM, Eric Johnson wrote:

Hi All,
I have been having trouble getting Perforce and Xcode 3.0 to work together. I'm wondering if anyone else on the list has seen these problems and maybe have solutions or workarounds.


1) With SCM Repository set to "None" ( in Project's general settings), if I check a file out using the Perforce client and then attempt to modify the file, I get the "File is Read Only" dialog from Xcode. If I press the "Allow Editing" button, I can continue. Xcode does not seem to be aware that the file's permissions have changed to allow writing. (Seems like an Xcode bug). Additional notes: the file is not "locked".

Not sure what you mean by "Xcode does not seem to be aware that the file's permissions have changed to allow writing." Does Xcode not allow you to type into the file?


(Yes, we use "locked" as shorthand for any condition in the file that disallows editing.)

Or do you mean that, when you do this, you are changing the filesystem, but you are not telling your Perforce depot about changes in that file's status as far as Perforce is concerned. My understanding is that this is a bad thing, because you won't be able to commit your changes to your Perforce depot.

I'm curious why you would set your project SCM Repository setting to "None" if you want Perforce and Xcode to work together.

2) (More serious issue) Executing SCM commands from within Xcode seems to be completely broken. For example, checking out files does not work. Selecting a file in the project and then going to the SCM menu, the "Get SCM Info" choice is grayed out. The SCM Repository setting for the project is set to Perforce and the SCM preferences for Xcode show that the Perforce repository has been "authenticated".

If you've set your SCM Repository for the project to "None", then all the SCM options will be unavailable. If you've set it to a valid repository, then you should be able to do things, though i think there's more to it than that. Are your files "checked out" (I realize that's not the right terminology for Perforce) from the depot?


It might help if you describe what steps you took to set up Perforce.

-- Andrew
_______________________________________________
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
References: 
 >Re: problems with Perforce and Xcode 3.0 (From: Andrew Pontious <email@hidden>)

  • Prev by Date: Re: where did the IBPalette template project go?
  • Next by Date: Re: Xcode debugger quality
  • Previous by thread: Re: problems with Perforce and Xcode 3.0
  • Next by thread: Re: problems with Perforce and Xcode 3.0
  • Index(es):
    • Date
    • Thread