configuring Subversion in Xcode - iphone

I have configured SVN repositories in my XCode,I have imported and checked out well.but how can i commit and revert files which are in xCode?

XCode 4.x:
File / Source Control / Commit to get a list of all changed files to commit.
For one file go to navigator, right click and select Source Control. There you'll find commit, revert, etc.
XCode 3.26:
Menu SCM Commit Entire Project
Current file: Commit Changes or Discard Changes but this is only available when your editor pane is split and the file is selected in the list of (changed) files

Related

Need Eclipse Team History for a File

I have set up eclipse on a new computer and on the old one I was able to get the entire Git revision history of a file with a history tab of all changes complete with color coded line numbers in margin.
Now I only get Right click -> Team -> Show Local History.
How do I get Team -> Show In History back again?
Tried this with different perspectives and adding history view to both Navigator and Package Explorer views.
I can get revision history of an entire package resource but need it for just files.
You need to make sure your file is part of a git repo you have cloned locally (there should be a .git subfolder at the root of your project)
And you need to share that project with Git (Eclipse will recognized an existing Git repo)

eclipse egit some files won't commit to github

I have a github repository and it is integrated into eclipse. I sometimes create files in other text editors, then refresh my project and then left click the project to get >Team>Commit. This usually gets every file. Unfortunately, I have several files that failed to commit this way. I don't see them on github and I can see the following when I do Team Synchronizing.
There is nothing I can do to get these files to commit to github. Can anyone see why? These is no error message or warning or anything. When I go to commit these files, they don't appear in the window that shows everything that needs to be commited (ie is new or has changes).
In Eclipse EGit, the preferred way to create commits is by using the Staging View. It shows a clear view of what files are staged and ready to commit and what changed files are not. It supports drag-and-drop to move files from un-staged to staged, as well as commit and commit+push directly in the view.
Open the Staging View and see if those files are in the Unstaged section. If so, drag them to Staged and then commit.

Subclipse: Change file state from Incoming Change to Outgoing Change

I have a project in eclipse versioned to a SVN repository using subclipse.
In that project I took an older revision of a file and want to commit it as a new revision but when I right click it and go to Team -> Synchronize with Repository Subclipse shows me the file as if it has incoming changes (since the file is bound to an old revision and there's a new one on the repository).
How can I tell subclipse that I want to Override and commit the current version of the file?
You cannot do what you want using the approach you took. SVN is bring "too smart" here.
You cannot commit a file unless the local version is at the HEAD revision. You apparently pulled in an old revision of the file in a way that SVN knows this. So SVN is not going to allow you to commit that file without first updating it to HEAD.
What you want to do is get the "content" of the file at the old revision, rather than getting the old revision itself. Here is how to do this:
1) Go ahead and update the file back to HEAD revision. This will get rid of the current contents but that is fine.
2) Right click on the file and choose Team > Show History
3) In the History, find the revision you want and select it. Right-click and choose the "Get Contents" option. This will pull in the content of the file at that revision, but leave the working copy metadata at HEAD revision.
The file should now show as a local modification. Diff should work etc. and you can now commit it.

Github and Eclipse: not all files are commited

I´m using Github in Eclipse, and commiting my changes to it. I have added some files to my project, and I have clicked on Team->"Add to index" in each of them, for them to be commited when I make a commit of the whole project. However, these files are not added to be commited, and when I click in "Commit", they arent´shown in the list of modified files. How can I force them to be commited?
Thanks.
It sounds like you may be confusing the usage of Git wit SVN. In SVN when you add a file to be tracked, updates to the file will always be committed automatically.
In Git, when you add a file to the index, only the current version of that file is recorded. If you subsequently update the file and commit, the new updates won't be included. The solution is to do an "Add to index" on the root of your project right before you commit: the equivalent of git add . on the commandline. Make sure your .gitignore is set up correctly so you don't commit things you don't intend to.
An equivalent action is to do a git commit -a, which automatically adds all files previously in the index and updates any deleted files as well. I believe the equivalent setting in Eclipse (for eGit) would be to Include selected untracked files as in the commit settings below.

I commited an svn file delete and now I want it back

I deleted a bunch of files from my env and committed the changes.
Of course I now want one of them back.
What is the best way to bring the ONE file back out of the revision?
I have brought the file up from View History on the package (it is a java file), but don't see a way to bring it back short of copy and paste.
Eclipse 3.7.0, subclipse 1.6
UPDATE
It looks like Antonio Pérez and qor72 solutions both accomplish the goal. Antonio's can be done in eclipse but the number of reverts can be large. Also merge requests that one commit open changes.
I like qor72's solution. To access copy in this scenario:
look at the history and find the deleted file.
right click on file name and choose copy.
select the original directory.
OK.
What I have done in the past is ressurrect the file per the SVN documentation, for example:
$ svn copy ^/calc/trunk/real.c#807 ./real.c
Then readd/commit and off you go.
Probably the subclipse client would allow a simple way of doing it. But if you'd like to give a try to the command line client.
$ cd <working_copy_path>
$ svn merge repo_url[#M] repo_url[#M-1]
M is the revision where you committed the deleted files. And you should get back all the files you deleted as added files in your working copy. Then
$ svn commit <your_file_to_be_recovered>
$ svn revert (to remove the rest of added file that you don't need back)
Further info on the svn merge command.
you can follow these steps to get it back
1. Identify the folder in the project which contained the deleted files.
2. Right click the folder, select Team -> Merge
Within Merge Pop up Window
3. On the URL tab, Browse and select the "repository resource to merge with" i.e the same folder in the repository.
4. Select Revisions radio button,
5. Click Browse button to select revisions.
6. Select the revisions which you want to be restored ( select the revision wherein you deleted the files / folders )
7. Enable Reversed merge.
8. Click Preview and check that it shows an entry for the file / folder which you plan to restore.
9. Click OK
10. Eclipse now switches to SVN Merge and with the Synchronize view.
11. In the Synchronize view, right click the files you want and select Accept
12. In the Synchronize view, use the Synchronize SVN icon to switch from SVN Merge to SVN, where you can see the restored file as an outgoing change.
13. Right click the file -> Team -> commit to check in the file again to the repository.