Update individual files in Xcode 4.4 SVN - xcode

I could select individual file when 'update' in SVN project in Xcode 4.3.
I could review which files were changed and committed.
But after I upgraded Xcode to 4.4, when I click 'File > Source Control > Update' from menu bar or click 'Update' in Organizer, no updated files list comes out and just tiny updating slide comes down.
It updates whole changed files without my selection.
I know I can update specific file by right clicking it and select 'Source Control > Update Selected Files' but I want to review the whole changed files in one window like before Xcode 4.4.
How can I do it?
Thank you.

It looks like you want to do "Update..." instead of "Update".
You can get that to show up under File-->Source Control and holding down the control key.
It looks like in XCode 4.4. the default source control options have been switched around as follows:
Xcode 4.4+ - default = "Update"
"Update" (Cmd+Opt+X) - Silently updates all files unless there is a merge conflict that needs to be manually corrected
"Update..." (Ctrl+Cmd+Opt+X) - Updates all files allowing you to verify/merge updated files
Xcode 4.3 - default = "Update..."
"Update..." (Ctrl+Cmd+Opt+X) - Updates all files allowing you to verify/merge updated files
"Update All" (Cmd+Opt+X) - Silently updates all files unless there is a merge conflict that needs to be manually corrected

This is again broken in XCode 4.5. Silently will update all files, ignoring your selected files. It doesn't matter if you control-click or right-click or File->Source Control... whatever the way you select it, xcode will update the whole project.
Bad, bad Apple!

Related

Why is it not possible to diff 2 files in sublime text 3103 on mac anymore?

I know this feature was available previously. Selecting 2 files inside a project, right clicking them and do a diff on both files. This does not work anymore on build 3103. After selecting both files, I right click and then one file gets deselected. Is there a fix for this?
This appears to be a bug, but it only appears under certain conditions. I tested Build 3103 (the most recent public build) and the latest dev build 3111 (just released today, in fact) on OS X 10.10.5. First I picked two random files in one of the folders of my project that were not already open, clicked to select one, held down ⌘ and clicked to select the other, then right-clicked on one and selected Diff Files.... The diff view opened up just fine in both 3103 and 3111.
However, if one or both of the files was already open in Sublime, it could not be selected in the sidebar in 3103, and therefore the Diff Files command wasn't accessible. Diffing worked just fine on open files in Build 3111.
So, if you're a registered user (and you really should be if you're using Sublime long-term or for commercial purposes), just download Build 3111 (or whatever the most recent dev build is when you read this) and you'll be all set.

xcode does not show files in the commit window

I have checked out a copy of a SVN project, I have modified some files and want to commit the changes. If I go to File > Source Control > Commit. I see an empty list and a button saying "Commit X files". I expected a list of the modified files.
Now, I use the command line tool (svn ...). But I want to bring back the Xcode commit window.
How may I fix it?
BTW. I'm using Xcode 4.6.1
That is a very very strange screen shot. Sometimes Xcode's svn integration can be a bit strange. If I were you I would just cancel out of the strange empty dialog and use svn at the command-line in Terminal instead.
In file > preferences there is a source control section. You probably have the check box checked to update the source control automatically. So, because it is already updating the source control, it doesn't let you do it.
So you can uncheck that box to make it not automatic, then change something in your project and try to commit the changes. You will probably see some files now.

How to delete an old/unused Data Model Version in Xcode

How can I delete an old Data Model in Xcode? The option is disabled on the menu. (The models I want to delete have not been released to the public - they are interim development models.)
It's a hack, but this worked for me:
Set the Current version of the model in Xcode to one that you want to keep
Remove the .xcdatamodeld from your project (Right-click -> Delete -> Remove Reference Only)
Show the contents of the .xcdatamodeld package in the Finder (Right-click -> Show Package Contents)
Delete the .xcdatamodel file(s) that you don't want anymore
Re-add the .xcdatamodeld file to your project
This eliminates the need to manually modify any of the project metadata files.
I've just found the need to do this. I created a new model version then realised I didn't need it after all. I was surprised to find there was no way of deleting it (that I could find) from Xcode. Still, to remove it I did the following:
First I made sure it wasn't my current model version. Then I went to Finder and found my *.xcdatamodeld file. Right click and Show Package Contents on that. In there you will find the actual model file and can delete it.
This still doesn't remove it from Xcode and it will show red in the Files and Groups. To stop this from happening go back to Finder and Show Package Contents on your main *.xcodeproj file (you may want to make sure you have a backup of this first). In there open up and edit project.pbxproj do a find on your model version name, in my case "interval 8". For me it appeared on two separate lines. I removed these lines and now it's completely removed from Xcode.
This worked for me in XCode 10.3 without the ordering issue occurring when removing the whole model and adding it again:
Select any model version other than the one you want to delete.
From XCode, right-click the .xcdatamodeld file and select 'Show in Finder'.
Close XCode.
In finder, right-click the same file and select 'Show Package Contents'.
Write down the name of the model you want to remove, then from Finder, delete it.
Still in Finder, navigate to the project file (.xcodeproj).
Right-click and open with Atom or any other editor.
From the 'Project' pane open project.pbxproj file.
Remove all lines containing the model name you removed (Example: "ABC 17.xcdatamodel"). You will find two lines similar to the following:
9D88880323C545B800A789B9 / ABC 17.xcdatamodel / = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "ABC 17.xcdatamodel"; sourceTree = "";
and
9D88880323C545B800A789B9 / ABC 17.xcdatamodel /,
Note if you find a third line it will be something like:
currentVersion = 9D88880323C545B800A789B9 / ABC 17.xcdatamodel /;
That means it is the currently selected model. Never delete this line. Just change the text to another model version.
Re-open XCode.
My answer is not issue-specific at all but it's quick and works. For those using git. You can just discard unstaged changes.
git stash save --keep-index
Then you can drop that stash with a git stash drop command if you like.

How to make Xcode refresh the editor content?

I am developing a project with Xcode 4.1 using Subversion through Xcode's built-in source control menu and command line. When reverting/updating the source through command line, I can't get the Xcode editor to show the current version of the source files (as they appear in the Finder or any external editor). I guess this is generally the case when editing a source file with an external editor.
Eclipse would immediately warn you that the editor content is outdated (Xcode does it when you try to save the file). Then you would simply right click on the project tree to refresh the corresponding files/directories. There must be a similar feature in Xcode.
svn revert MyFile.m
will copy the old back and therefore also the old timestamp, making XCode think it is using the most recent version of the file (which is true, except that in this particular situation you would want it to use the older version again).
As a workaround you can "touch" all the reverted files, giving them a new timestamp.
touch MyFile.m
That will make XCode display the content as it is in the file and also include it in the next build iteration. This works for .h/.m files but also any project or meta data files used by XCode.
Do you mean Menue:File >> Source Control >> Refresh Status ?

Xcode Subversion (SCM) Difference between Refresh and Update

I have configured Xcode to use Subversion (hosted on a remote webserver - Beanstalk.com).
In Xcode menu under SCM, I want to know the difference between two options
1. "Refresh Entire Project ..." and
2. "Update Entire Project ..."
Please help.
Thanks
Dev.
Open the SCM Results window from the SCM menu item, click on the little 'text' button on the left-hand-side (might be at the bottom of the window to start with?), expand it so you can see a little more, and then run refresh and update to see what commands Xcode passes to SVN.
Sorry, can't speak for SVN right now, but for CVS it did this for me:
I believe Refresh will check the repository if there is a newer, updated version of any files within your project that may have been committed by another developer since your last checkout.
Opening your SCM Results view will show you in the 'Update' column what files have been updated since your last checkout with an 'M'.
If you select Update, you will actually pull down those files and update your current project while Refresh will just check the files and list them in the SCM results window without downloading and overwriting your file.

Resources