Can't commit/update file in Xcode editor (SVN) - xcode

I'm having problems with Xcode's built in SVN manager.
I checked out a remote SVN repository and I want to commit the changes while I'm working in Xcode's editor. As seen on the screenshot, it shows the correct SVN flag in the Organiser window and also in the editor sidebar (M for modified etc.), but when I try to commit from within the editor, I get the error:
The operation could not be performed because no valid working copies were found.
Although commiting/updating etc. works fine in the Organiser window…
Any ideas why?

I had this exact same issue recently.
The solution for me was a simple restart of Xcode, and after that all the files were noted as being updatable via the right click "Source Control >" menu.

I encountered this myself today when trying out Git with Xcode for the first time. I created two demo projects with the "create a local git repository" option and they had the same problem. I was able to commit from the organizer window, but the main Xcode file view didn't seem to recognize git at all.
After quitting and restarting, I created a third demo with the git option, and the main window recognized the changes right off the bat - i.e showed the "M" beside a modified file.

I think Xcode subversion version is different from repositary version.
if you use other svn management tools like "cornerstone", you have to check versions.
Check subversion's version on Terminal
1.xcode subversion
/Applications/Xcode.app/Contents/Developer/usr/bin/svn --version
2.installed subversion
/usr/bin/svn --version
3.port installed version
/opt/local/bin/svn --version
check these versions and upgrade Xcode's svn binary.
This is what i did.
$ cd /Applications/Xcode.app/Contents/Developer/usr/bin
$ mkdir svn_backup
$ mv svn* svn_backup/.
$ ln -s /opt/local/bin/svn* .
and restart Xcode.

Related

Git version control history "modifed files" are empty in Xcode 8.1

When I click "show modified files" in my Git History
I see empty window with message "No version Editor"
I noticed, that If I commit some files and doesn't restart XCode, history of that commit will show modified files well. But after Xcode restart it becomes empty too.
My settings:
XCode 8.1
Console git commangs like git log -p, work fine.
How can I reattach repository to my project to reset it?
I have no repositories in my accounts settings:
Yes, it’s the bug for xcode to show modified files in version control history. You can vote your voice in Apple bug reporting

Xcode won't add files to source control

when ever i add files to my project. Xcode should automatically "at least it did at one point" add it to my source control. and write a A out for it.
now it just does this : see picture
i tried to reinstall Xcode using app-cleaner.. nothing changed there
And NO it doesn't help if i click the add files, no matter where in Xcode i click Add - nothing happens...
i'm using Github as repo
and using Xcode 5.1
i know i could just use Terminal and use git commands like : git add -A git commit -m "first init" and finally git push origin -u
but Xcode should do all this for me
If you click on 'Source Control' in the XCode menu do you see two options listed? I found that I had a .git file located in my iOS projects directory which contains all of my iOS projects. I deleted this and it fixed the problem.
I think that when you import all of your repos into SourceTree it creates a .git file in the parent folder of your repos.

Cannot find FileMerge (opendiff tool) but I have xcode 4.6 installed

When I attempt to run FileMerge as a GUI for Opendiff, I receive an error:
$ git mergetool -t opendiff
Merging:
Gemfile
Gemfile.lock
...
Normal merge conflict for 'Gemfile':
{local}: modified file
{remote}: modified file
Hit return to start merge resolution tool (opendiff):
2013-12-26 20:00:20.248 opendiff[22367:e07] Couldn't find FileMerge
Gemfile seems unchanged.
Was the merge successful? [y/n] ^C
$
I have installed XCode 4.6.3 and Command Line Tools for Xcode April 2013. I am running OSX 10.7.5
I have tried solutions from the following two links with no success:
git diff with opendiff gives "Couldn't launch FileMerge" error
Is filemerge still available after Xcode 4.3 installation?
When I go to Xcode -> Open Developer Tool I do not see FileMerge in the list of options. There is a More Developer Tools link that takes me here: https://developer.apple.com/downloads/index.action?name=for%20Xcode%20-
How do I get FileMerge working?
FileMerge is located at within Xcode.
From the command-line:
cd /Applications/Xcode.app/Contents/Applications/
open .
Go into that directory once it opens:
Right-click on the app
Choose "Make alias"
Move that alias to your Applications directory
You're all set.
Strange. "XCode 4.5, where is FileMerge ?" suggests:
The FileMerge that is bundled with Xcode 4.5 doesn't work as a standalone application. I tried compressing it from the application bundle. I was able to expand it to show the FileMerge app on the desktop. But when I tried to run it I got an error saying it couldn't be opened.
Apple's developer downloads site has every version of Xcode. You could try trashing your current version of Xcode 4.5, downloading Xcode 4.5 from the developer downloads site, and see if FileMerge is there. If not, you can download Xcode 4.4 and see if that has FileMerge.
Indeed, I downloaded a fresh new install of XCode 4.5 and put my updated 4.4 to 4.5 upgraded version into the trash and I have now all the developer tools again, including FileMerge. Weird...
The other option, from that same thread:
Why not just install the Command Line Tools? That will give you the "opendiff" tool. Then, you create a little script like this one to make it useful and actually do a merge.
#!/bin/sh
# Get a hold of the last parameter.
eval LAST=\${$#}
# Now run opendiff with the previous version and the current version.
opendiff ${*} -merge "$LAST"
if you have xcode installed, then you can probably run the following from the command line to open FileMerge directly
open /Applications/Xcode.app/Contents/Applications/FileMerge.app/
Try reinstalling Xcode. I had the same issue and it fixed it for me! It appears the Merge utility got corrupt somehow.

How to deactivate the Xcode git feature? (remove git integration)

My Xcode project is on git, but I don't like the XCode git integration and sometime, I have errors coming from Xcode
So I would like to completely remove that feature of XCode. I tried to remove the repository in Organizer->Repository (but after a while, it comes up again).
Any idea?
It's unsupported, but it has appeared to work fine for me in the past:
Quit Xcode
Remove this bundle from its folder: Xcode.app/Contents/Plugins/IDEGit.ideplugin or change the bundle's extension.
Restart Xcode
This disables the extension which provides git support in Xcode. You can still use Git for version control -- just not in Xcode.
Remove git functionality from Xcode 9 by disabling it in the preferences pane:
Open Xcode
Type ⌘, (or Xcode menu > Preferences... row)
Switch to the Source Control pane
Toggle Enable Source Control off
If you want to disable Git support in Xcode 4 you'll have to rename "/Developer/Library/Xcode/PrivatePlugIns/IDEGit.ideplugin" to something other than .ideplugin
Have a look at this: Remove git from project in Xcode 4
It doesn't work in Xcode 4.2.1
You will have to remove the local git file. Refer to this: http://thompsonng.blogspot.sg/2012/03/xcode-remove-local-git-repository.html
Maybe what you wanted is only to deactivate version control in XCode, which is the same thing if you use git or SVN or whatever. If that's the case, check here: Xcode 5 - remove source control for project
I know that this thread is old, but if new people arrive here, this might be the right answer.
Cícero

xcode 4 cannot create a local repository

When ticking the "Create local repository for this project" in Xcode 4, I get a dialog box that says:
"Cannot create a local repository.
The git command line tool is required. Check the SystemTools checkbox in the Xcode Installer to do so."
Do I need to re-install Xcode or is there a fix for this problem?
As the error is telling you, you need to install the command line tools for Xcode 4 which includes the git binaries.
Edited to add
Also - Xcode installs and expects to find a git installation in /usr/bin/git and this causes problems if you already have Git installed, as it isn't seen. I wrote a script to to replace Xcode's git installation with symlinks to your own installation which is on github here.
Remember to edit it with the correct location of Git on your computer.

Resources