Cannot update project from its SVN repo in Xcode - xcode

I have a project that lives in an SVN repository. The repository is added to Xcode, I can browse it from my Organizer and check out projects. Here's the problem. Whenever I'm trying to update an old version of the project to a new one, I right-click on the project int the Project Navigator and go to Source Control -> Update selected files, I get the following error:
The operation could not be performed because the selection is invalid.
Please verify the selection and try again.
What am I doing wrong? I tried selecting individual files instead of the project, and I tried selected lines of code (silly, but you never know). Am I not checking out the project correctly? Is this a common issue?
Cheers! = )

Go to settings and map Update All and Commit All to some keys, when you use those options (no update/commit specific file but ALL project) you shoudn't see those errors.

Maybe something wasn't done properly in the past and from then on the system cannot manage it anymore correctly.
I would have backuped the probject and then delete the project entire directry, and than checkout the project from scratch using the organizer.

Related

TFS not adding files to repository properly

We are working with building ETL packages in SSIS using a TFS repository. When my collegue add new files to the repository they are not added properly to the repository even though he checks in the entire project file. He sees the files in his project folder, and it looks like everything is checked in. But when I click on "Get latest version" I get a warning that the package is missing from the project directory. If any of us then try to add the file again we get a warning that the file all redy exists, even though it is not visible in my folders. Right now the solution we are using is for him to delete the file and then commit the change. After he deletes the file I get the latest version. Then he sends me the files and then I add them to the repository. Once I have added the files things seem to work as expected. Has anyone else had this problem, and know of a solution?
UPDATE:
The solution we found now is that I have to go to the local folder and find the new file my colegue added. Then I right click the file he just added and select add to project. Then the new file is visible in my version, but it does not have a blue lock icon next to it. If I then double click the sln-file to reload the project the blue lock icon is visible to me.
It is still not an optimal solution, but it works a lot better than him having to send me the file so I could check it in.
Is this the way TFS is supposed to work?
Can you please check the mapped work space path in your local machine there you will find the checked code. You need to manually Add.
Right Click on SSIS package -->AddExisting Package--> Select the package from Workspace-->Ok
Now you will find the missing package in your Solution Explorer as well.
If you are using TFVC.
Open Source Control Explorer=>Right click that solution/project folder=>View History, then check the related ChangeSet whether he add the file correctly.
Let your college to check the permission of that folder/file: Right click the folder/file->Advanced=>Security.
Regards

Xcode/Git Repository Error: "Please verify that the working copy is reachable and try again."

Here are the steps I take.
I open Xcode (4.3.3) organizer and select Checkout or Clone Repository
I choose the location https://MyUsername#bitbucket.org/MyUsername/myrepo.git
Press Clone button and it successfully clones it on my local disk
So I open the local copy of the project and perform some changes to it.
When I try to commit changes (or do any other git related operation) I get the following error:
The working copy "MyAppName" could not be reached.
Please verify that the working copy is reachable and try again.
However I can perform commits (and other types of git operations) without any issues from the Terminal app using command lines.
I've tried restarting my computer, deleting all Xcode settings, but nothing helped.
Update: I tried it again today and it works fine now. Maybe it's some sort of an intermittent bug in Xcode.
Whenever this happens to me (and it happens often) I do the following:
1-Close the project
2-Open the organiser
3-Go into the repositories tab.
If your current working copy has been added to the list already, then within the organizer navigate to it, and double-click on the .xcodeproj project.
This will re-open the project in XCode, and you'll find that now SCM operation will work fine.
If your current working copy hasn't been added to the list, press the + button in the bottom left corner, select "Add Working Copy", navigate to the folder containing the .xcodeproj and open this folder.
Now double click on the .xcodeproj file, the project will open in XCode.
And it's all working fine again...
No idea why this make things work... but it does
I have the same problem. It happens if you have ~/ in the path to project. Works fine, when you open your project from organizer.
It's a bug of Xcode! When you search the xxx.xcodeproj from your Home folder of the dialog box directly, Xcode will use the ~/xxx/xxx as the SVN/Git path which is completely wrong.
So you should avoid this, and search from the "/" path instead.
This is not exactly the answer you might be looking for, but I ran across similar problems when using Remote git repository (Github) and Xcode.
I ended up using a GUI tool "SourceTree", a good and easy to use tool to pull/push your code from Local Git to Remote Git Repository. Try it out http://sourcetreeapp.com/

Xcode duplicates my repository and renames its location to lowercase

I have a Git repository where my project is linked to. It is located somewhere like /Users/a/Documents/Xcode Projects/MyProject. I use Xcode's UI to commit changes and it worked perfectly for a couple of times. But now, out of a sudden, I get this error when trying to commit new changes:
The working copy myproject could not be reached.
Please verify that the working copy is reachable and try again.
As you can see, the message shows my project's name in lowercase and when I check the Repositories in XCode (File - Source Control - Repositories...). I see there are two, apparently identical, repositories (they both link to the same Origin), but one with the name all in lowercase.
The correct one location is /Users/a/Documents/Xcode Projects/MyProject as I told you. But the duplicated one is supposed to be located in /Users/a/Documents/xcode projects/myproject which, of course, does not exist.
Does anybody know why is this happening? Can anybody help me to delete this duplicated repository and make my project link the correct one? So I can keep using the XCode's UI to commit changes in my code.
I found that Xcode 4.2 can behave in two different ways depending on what exactly you select in the File->Open dialog, when opening the project from within Xcode:
The .xcodeproj file
The project folder (containing the .xcodeproj file)
Selecting 1 or 2 and pressing enter wil give me two different repositories with different paths in Xcode's Repositories, so sometimes it helps to close the project, delete both repositories and then open the project in "the right way", say 1 or 2.
I had the same problem. You probably clicked the recent opened project offered at the beginning of Xcode screen. I chose to open the project/workspace from manual selection in the file system and it solved this duplicated working copy issue. Hope it could be a help.

Xcode 4.0.2 Git Commit Error: fatal: '...' is outside repository (Possible Bug)

This is an issue in XCode in which the built-in source control feature is unable to load the repository for projects located within a directory named with ALL-CAPS, such as ~/Documents/CODE. Running XCode 4.0.2 on a 2008 black macbook. If anyone has insight, please share.
This was the issue.
I create a new project, save it to the directory ~/Documents/CODE/...here-or-a-subdirectory-therein, making sure to check the "create local git repository" checkbox. I make a small edit to the AppDelegate or any other file, and Source Control commits will not work from within XCode. From the command-line, I see that .git was created in the project directory, and that the 'first commit' occurred. I can perform git commits from the command-line.
Possibly related issue: In Organizer->repositories, all my repositories have the yellow stoplight icon (even those I've gotten to work).
This was the Error:
When I try to commit from the project window (File-->SourceControl-->Commit, type a comment, and press commit) I get the following error:
The Working copy of "MyProjectName" failed to commit files.
fatal: '/Users/myUserName/Documents/CODE/MyProjectName/MyProjectName/MyProjectNameAppDelegate.m' is outside repository.
Over in the Organizer, I select MyProjectName (with the drop-down arrow and icon of the repository safe). The location is displayed as /Users/myUserName/Documents/CODE/MyProjectName/
But in the area where the commit comments are normally displayed, I see the message:
Unable to load revisions.
The likely cause was that XCode was internally identifying the Project directory as ~/Documents/Code, not ~/Documents/CODE.
One way to resolve the issue was to rename ~/Documents/CODE to ~/Documents/Code, then in Organizer (select the Repositories Tab) I deleted the repository listing for MyProjectName.
NOTE - Only removes XCode's reference to the repository, the actual repository remains intact. Now Close XCode and Reopen it. Open the project MyProjectName. XCode will recreate a reference to the Project with the correct Capitalization. Note that the renaming of the directory seems to force XCode to recognize the new directory name when the repository is recreated.
Another way to resolve the issue is: within XCode's Organizer window (select the Repositories Tab), delete the reference to the repository. Then, still in Organizer, select the "Projects" tab at top. To the left of the project's window is a list of all the projects...select MyProjectName. Now in the center frame is a field named "Derived Data" with a path to your project. Click the little -> arrow to the right of the PATH to open up the Project's Internal Settings Directory in Finder. Open the file called "info.plist" and edit the key "WorkspacePath" such that it's value EXACTLY MATCHES the location of your project (correct the capitalization of the directory if necessary). Save, and return to Organizer. Close XCode. Reopen XCode and the repository reference will be recreated. You can go directly into Organizer now, select the "Repositories" tab, then select MyProjectName's repository. You'll see the commit messages there (even if you haven't committed yet, you'll still see the auto-generated 'first-commit' that occurred internally when your project was created).
I just ran into this problem. Luckily, restarting Xcode did the trick for me.
You should probably consider using i case sensitive HFS Volume for your source files.
This way you avoid name clashes like the ones you see.
You could try and create a disk image using a case sensitive filesystem and see if your problem persists.
I had similar problem and the problem in hidden .git folder.
I added external class which I cloned from git repository and when I was adding files to my XCode project I accidentally added hidden .git files.
When I removed them everything started working correctly.
I had the same issue. You must to remove this problem file from project (only reference) and then return it back.
Happened to me that the little checkboxes next to the files in the commit window were all deselected. I selected them and this error came out.
Restarted XCode and it was the same but I noticed that the Commit button was enabled although the files were still deselect.
Tried it and it was successful...
Sometimes XCode is so strange

Xcode project — old files warnings

I have a lot of warnings in my Xcode project about old files that have been deleted from my project and from the project's folder.
I have tried to delete the "build" folder of the project.
Any suggestions?
Thanks!
Are you, by chance, using this project from a source code repository?
You need to remove the files from the repository as well. For instance, "svn delete ".
What sort of warnings are you seeing?
In Xcode go to the Build menu and select Clean, then try to build again. Sometimes deleting the build folder is not enough.
If you explore the project do you see any file names that are red? If so, click to select them and press Delete.

Resources