Commiting new files to SVN through eclipse - eclipse

I'm working on a project for which I'm using the plugin Subeclipse in Eclipse to commit changes to our SVN repository. It is the first time I'm using SVN and I was trying to create a branch when I accidentally got a commit in which all my files were deleted.
So I went back to a working revision and I want to commit it. However, because all the files are deleted the commit fails with a File not found and path not found error.
svn: File not found: transaction '5148-475', path '/ndeklein/MS/PyMS/pyMS/rPlots.py'
svn: '/svn/test/!svn/ver/5147/ndeklein/MS/PyMS/pyMS/rPlots.py' path not found: 404 Not Found (https://test.ac.uk)
I tried importing the whole project to SVN through the commandline with svn import, but this gives the following error:
svn: MKCOL of '/svn/barton/!svn/wrk/be218e50-2605-479e-af1c-ebd8b08b8164/ndeklein/MS/PyMS': 405 Method Not Allowed (https://test.ac.uk)
Doing an update removes all the files again (since the revision it is at now still has all the files removed)
So how can I commit a bunch of new files with SVN?

Subversion (inside and outside Eclipse) has no option to work on previous revisions. So you can do the following steps:
Ensure that your are current by doing an update.
Then copy the files you want to commit (again) in your working copy. You will of course loose the history of these items then.
Add them to your working copy (svn add).
Commit them at the end.
Alternatively, you could copy the files on the server into the HEAD. By doing this, the history of the files is continued. Then you are able to do an update first, change what you want to change and commit your changes.

Related

bin-dir does not get ignored with SVN

I am working on a project using Eclipse 4.19.0. I also have Subclipse installed. However I started using TortoiseSVN 1.10. I have ignored files in a nested project (trunk > subproject > right click > TortoiseSVN > Properties) like:
However, if I trunk > right click > Commit, changes in subproject/bin/someFolder does still get shown. Weirdly the ignore works for subproject/build/*.
Any idea what could be the cause?
If a file has been commited to SVN then it doesn't matter if it is ignored or not. It will be handled like any other file you have checked out from the SVN repository.
So if you want to ignore files that have already been committed to SVN you first have to delete them from SVN.
TortoiseSVN has a functionality that combines deleting the file in SVN (but keeping it locally) and adding it to ignore list:
Unversion and add to ignore list:
The other ways like deleting the file locally and commit it or delete the file in SVN via SVN repo browser will end up in the local file being deleted. So you chose this way make sure to first copy the local files to a backup location so that you are able to restore the file(s) once the delete operation has been applied.

"Fetching SVN revision history" error on Eclipse

Yesterday I move my Eclipse workspace following this method to a bigger partition. It works fine I got back all my projects. Except about one option:
My projects are managed with SVN, I can still commit or update, but when I want to get the SVN history (right click on a procject => Team => Show History) I got the following error:
'Fetching SVN revision history' has encountered a problem
org.apache.subversion.javahl.ClientException: The path is not a working copy folder.
svn: '/home/admin/workspace/myproject' is not a working copy
The workspace's old path was /home/admin/workspace/ and the new one is /media/1to/workspace/.
It seems that there is still a hardcoded path on the history config. Do you know how I can find this path in order to correct it?

Changed SVN Repo in Eclipse

I was refactoring my code which lays in a SVN repository and both added new files aswell as changed existing files. I also renamed/moved some existing files in different directories. Now since I am using a SVN Plugin in Eclipse I thought the plugin could manage that. Unfortunately right now I can't commit and I don't want to setup the repository completely new since this would mean I would loose the whole history.
This is what I get as an error:
Some of selected resources were not added to version control. (multiple times)
Some of selected resources were not committed.
svn: E150002: 'C:\somePath' is already under version control
(multiple times)
svn: E200009: Commit failed (details follow):
svn: E200009: 'C:\path' is not under version control
When I try to commit via Tortoise SVN this is what I get:
Commit failed (details follow):
Cannot commit 'C:\path'
because it was moved to
'C:\otherPath'
which is not part of the commit; both sides of the move must be committed
together
I also renamed/moved some existing files in different directories.
...............................
When I try to commit via Tortoise SVN this is what I get:
which is not part of the commit; both sides of the move must be committed
together
When moving/renaming files, you must commit parent folder which contains both old and new path.

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.

Merging an already (locally) deleted folder

I'm using Mercurial and ran into an issue I'm not sure how to resolve. The issue I'm facing at the moment is as follows:
We had a project (folder) that was initially called A and pushed that to a remote repository.
I renamed Project A to B and pushed it to the remote repository. While doing so, I also locally renamed Project A to B.
Project A was removed from the remote repository.
I tried to pull those changes but Mercurial seems to get confused as the files (or paths to files) do not exist locally anymore.
If I'm invoking 'hg merge', the following output is produced:
"Abort: outstanding uncommitted changes, ..."
If I then invoke 'hg status', all the files which were in the initial version of Project A are listed - which now are not locally available anymore because the paths have changed from A/.../... to B/.../...
Can anybody give me a hint or tip on how to resolve this issue?
Are the listed files listed as "deleted" (R I think)?
If yes, just commit this change (about the deleted files), then merge. Mercurial have to know about all the changes, including the files moved or removed.