Boris Pavlović
Boris Pavlović

Reputation: 64632

SVN Merge conflict during commit

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?

Upvotes: 8

Views: 24047

Answers (6)

Kate
Kate

Reputation: 109

try to delete .svn/all-wcprops. maybe it will help

Upvotes: 1

Michael Wiles
Michael Wiles

Reputation: 21186

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.

Upvotes: 2

RJFalconer
RJFalconer

Reputation: 11682

You should update, resolve conflicts, then commit again.

See this link for help on resolving conflicts in eclipse.

Upvotes: 8

sleske
sleske

Reputation: 83599

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).

Upvotes: 12

Kevin Crowell
Kevin Crowell

Reputation: 10180

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.

Upvotes: 0

Glen
Glen

Reputation: 22290

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.

Upvotes: 0

Related Questions