subversion merge a delete command

When I merge the trunk into a feature-branch, a delete that occurred on the trunk will not be replicated to my working copy.

Why will a delete on trunk not delete the same file on a branch when merging?
I’m using subversion 1.5 client and server.

  • Couldn't merge origin/master: error: Your local changes to the following files would be overwritten by merge
  • .gitattributes: merge=ours strategy vs. fast-forward merging
  • File is shown as deleted while merging branch to trunk
  • Force git custom merge driver for the purpose of merging pom.xml (maven) files
  • Commits and merges on SVN subdirectories considered harmful?
  • Merging multiple branches with git
  • I’m assuming that changes to the file in the branch will be skipped when reintegrating the branch?

    What’s the best way to redeem the file on trunk, as a colleague deleted the file from trunk only because it was not “ready”.


    cd project; svn copy trunk branches/f1; svn ci -m "branching out" branches f1;
    echo "modifying a file on branch." >> branches/f1/file1; svn ci branches/f1 -m "Branch modified"; 
    echo "Above modify is not even needed to state the case";
    svn rm trunk/file1; svn ci trunk -m "creating (conflicting) delete on trunk";
    cd branches/f1; svn merge svn+ssh://repos/trunk .
    [ -f file1 ] && echo "file f1 does exist while it should have been deleted by merge.";

    So, the file still exists in my working copy even though I’m merging in trunk where the file has been actively deleted. Highly unexpected. In my case I haven’t even made any changes to the file, which is the only reason i can think of why svn would save the file.

  • Command-line SVN client for Mac
  • Subversion: Expected format '3' of repository; found format '5'
  • Learning version control with git first or via SVN?
  • Branch vs. Tag vs. Revision in SVN terminology
  • Local only, revision/version/source control
  • Does git only support a flat tag structure?
  • 2 Solutions collect form web for “subversion merge a delete command”

    To the best of my understanding, what you’ve done is create a local conflict in file1. In your branch, it was modified. In your trunk, it was deleted. When you merge, it will be in conflict. So the file will still be around.

    I suggest 2 tests:

    1. After running the code above,
      include the results of svn status.
    2. Try the same code as above, but
      without modifying that branch at
      all. (svn status would be helpful
      here as well.)

    Are you sure that the file deleted on the trunk is still under version control after the merge? It may be unversioned, but still present, which is the expected behavior. Looking at the output of svn status will let you see whether the file is still under version control.

    You may wish to take a look at this bug report, which thoroughly explains the situation:

    Git Baby is a git and github fan, let's start git clone.