Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top