Re: Perforce problem with XCode 3.1.1
Re: Perforce problem with XCode 3.1.1
- Subject: Re: Perforce problem with XCode 3.1.1
- From: Andrew Pontious <email@hidden>
- Date: Mon, 20 Oct 2008 11:09:07 -0700
On Oct 18, 2008, at 9:44 PM, Mike Kobb wrote:
Many thanks to the XCode list member who answered me off-list. The
problem was that my project root was set to the default location,
which is the same directory as the project file. This apparently
prevents the SCM system from looking elsewhere, even though the
project file contains files from other directories.
The "solution" is to move the project root up one level, to the
common folder that encloses both the project folder and the common
headers.
I still believe that this behavior is broken (although I can't find
any documentation on what the "Root" of the XCode project is
supposed to be...).
I went to http://developer.apple.com, chose Mac Dev Center, logged in,
and searched on "SCM". One of the hits was the Xcode Source Management
Guide, currently available at:
http://developer.apple.com/documentation/DeveloperTools/Conceptual/XcodeSourceManagement/40-Snapshots/chapter_4_section_1.html#//apple_ref/doc/uid/TP40006828-CH1000-SW1
This should also be shipping with Xcode. For example, if I open Xcode
3.1, go to Help -> Documentation, select Developer Tools Library under
Apple Xcode 3.1, choose Tools, then Xcode, I can also find the Xcode
Source Management Guide.
These are good places to start when looking for documentation in the
future.
XCode's SCM system should be smart enough to get the Perforce
information for the files incorporated in the project, no matter
where they are. It should also be smart enough not to get SCM
information for hundreds of files that are not in my project, which
it does now that I've moved the root.
This is how we used to do it. Xcode determined the directory for every
file in the project, and then did SCM operations on all those
directories.
We've decided that it's faster if the user specifies a directory to
use for such operations. Using only a single directory speeds up the
operation, and only the user can say with surety what the highest-
level directory is that should be used.
We've heard quite a bit of feedback on this, and we will be making
tweaks to it, but we are moving away from a system where Xcode
attempts to determine SCM directories by reverse-engineering the
Groups & Files tree.
As well, there is absolutely no error indication when you try to
"Edit" files that XCode is not able to get SCM information on. A
simple message like "This file is outside of the project root
directory, so SCM information is unavailable" would have saved me a
couple of hours of puzzlement.
Please file a bug.
Now that I've been clued into the solution, I also see that this is
apparently a problem that was introduced in XCode 3.0. I'm sorry to
see that it's still a problem a full year after this thread reported
it:
http://lists.apple.com/archives/Xcode-users/2007/Oct/msg00631.html
As I said above, this is a deliberate direction for us. We are always
looking for feedback to make it better, but we are not planning on
going back to the way things were before.
-- Andrew
On Oct 17, 2008, at 11:10 PM, Mike Kobb wrote:
Greetings,
I'm having a bit of a problem with the Perforce SCM integration
with XCode 3.1.1, and I wonder if anybody knows what the trouble
might be.
I have an XCode project file in 2.4-compatible format. It has
about 43 files in the Groups & Files list, some of which are at the
top level, and some of which are in groups.
I have configured a repository for my company's Perforce server,
and the status indicator shows green. I have set the project's
repository to that Perforce repository.
Here's the problem: XCode only seems to get SCM information for
about half of the files. If I open the SCM Results window, the
file listing at the top shows 21 files, but omits the rest.
The only pattern I can detect here is that the files that don't
show up for SCM reside in a different directory from the project
file. This is because my project shares a set of common headers
with a second project, so the common headers are in a folder
outside the folder that contains my project file:
Perforce root folder
Project folder 1
MyProject.xcodeproj
<files that show up with SCM information>
Project folder 2
<stuff that I'm not working on right now>
Common Headers
<files that are included by reference in
MyProject.xcodeproj, but that don't work
with SCM within that project>
Or, if this will wrap properly:
Perforce root folder
|
_____________________________|_____________________
| | |
Project Folder 1 Common Headers Project folder 2
| |
Working files live here Non-working files live here
MyProject.xcodeproj
All of the affected files are set up with "project relative" paths,
and are openable, editable and buildable within XCode, as well as
being integrated into the CodeSense index. They are all within the
folder hierarchy managed by the Perforce workspace.
Is this just a bug in the SCM handling, with it refusing to look
outside the project's folder?
Thanks,
--Mike
_______________________________________________
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
_______________________________________________
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