svn - How to resolve "local edit, incoming delete upon update" message

ID : 10176

viewed : 44

Tags : svnsvn

Top 5 Answer for svn - How to resolve "local edit, incoming delete upon update" message

vote vote

91

Short version:

$ svn st !  +  C foo       >   local edit, incoming delete upon update !  +  C bar       >   local edit, incoming delete upon update $ touch foo bar $ svn revert foo bar $ rm foo bar 

If the conflict is about directories instead of files then replace touch with mkdir and rm with rm -r.


Note: the same procedure also work for the following situation:

$ svn st !     C foo       >   local delete, incoming delete upon update !     C bar       >   local delete, incoming delete upon update 

Long version:

This happens when you edit a file while someone else deleted the file and commited first. As a good svn citizen you do an update before a commit. Now you have a conflict. Realising that deleting the file is the right thing to do you delete the file from your working copy. Instead of being content svn now complains that the local files are missing and that there is a conflicting update which ultimately wants to see the files deleted. Good job svn.

Should svn resolve not work, for whatever reason, you can do the following:

Initial situation: Local files are missing, update is conflicting.

$ svn st !  +  C foo       >   local edit, incoming delete upon update !  +  C bar       >   local edit, incoming delete upon update 

Recreate the conflicting files:

$ touch foo bar 

If the conflict is about directories then replace touch with mkdir.

New situation: Local files to be added to the repository (yeah right, svn, whatever you say), update still conflicting.

$ svn st A  +  C foo       >   local edit, incoming delete upon update A  +  C bar       >   local edit, incoming delete upon update 

Revert the files to the state svn likes them (that means deleted):

$ svn revert foo bar 

New situation: Local files not known to svn, update no longer conflicting.

$ svn st ?       foo ?       bar 

Now we can delete the files:

$ rm foo bar 

If the conflict is about directories then replace rm with rm -r.

svn no longer complains:

$ svn st 

Done.

vote vote

81

Try to resolve the conflict using

svn resolve --accept=working PATH 
vote vote

80

I just got this same issue and I found that

$ svn revert foo bar 

solved the problem.

svn resolve did not work for me:

$ svn st !  +  C foo       >   local edit, incoming delete upon update !  +  C bar       >   local edit, incoming delete upon update  $ svn resolve --accept working svn: Try 'svn help' for more info svn: Not enough arguments provided  $ svn resolve --accept working .  $ svn st !  +  C foo       >   local edit, incoming delete upon update !  +  C bar       >   local edit, incoming delete upon update  $ svn resolve --accept working foo Resolved conflicted state of 'foo'  $ svn st !  +    foo !  +  C bar       >   local edit, incoming delete upon update 
vote vote

63

If you haven't made any changes inside the conflicted directory, you can also rm -rf conflicts_in_here/ and then svn up. This worked for me at least.

vote vote

58

You can force to revert your local directory to svn.

 svn revert -R your_local_path 

Top 3 video Explaining svn - How to resolve "local edit, incoming delete upon update" message

Related QUESTION?