views:

3658

answers:

5

Eclipse + Subversive plugin

On commiting a directory which is out of sync with the SVN a message pops up:

Merge conflict during commit
svn: Commit failed (details follow):
svn: File or directory '.' is out of date; try updating
svn: resource out of date; try updating

Tried to update the whole project from Eclipse Navigator view (right click>Refresh or F5) and the problem still persists.

Is there something that can be done in this case?

A: 

Someone else has modified this directory on you.

You need to do a svn update to get the latest version before commiting.

svn update

or

right click > Team > Update

Refresh or F5 will only re-read what's currently checked out and check for local changes, i.e. changes made outside of eclipse.

The svn update command pulls any changes made remotely (commits) down to your workspace.

Glen
A: 

You need to do an svn update to make sure you are completely up-to-date before committing.

svn update

If the update does not work, you may need to do a cleanup.

svn cleanup

You should be able to find both of these commands in your SVN client outside of Eclipse if you are using one.

Kevin Crowell
+6  A: 

You are mixing up two different operation in Eclipse:

  • Update (from version control)

and

  • Refresh

"update" means retrieve the most recent version of a file(s) from the version control system. "Refresh" just means that Eclipse will update its view of the local filesystem, in case a file was changed outside Eclipse.

You need to do an update (Team->Update).

sleske
+3  A: 

You should update, resolve conflicts, then commit again.

See this link for help on resolving conflicts in eclipse.

RJFalconer
A: 

Sometimes eclipse+subversion gets a bit lost and a more robust solution is called for:

  1. Copy the code with changes to a different location (preferably via copy and paste).
  2. Replace with latest from repo (or revert) on the directory giving the problem
  3. Copy the changes back (via cut and paste again) and check in.
Michael Wiles