开发者

Subversion - Merge skipping duplicate file name and not restoring

开发者 https://www.devze.com 2023-04-10 02:52 出处:网络
Apologies if this is answered, but I waded through a bunch of articles before I decided to post this.

Apologies if this is answered, but I waded through a bunch of articles before I decided to post this.

So I have a branch and the main trunk and I was experimenting with Merging.

/trunk/Blah /branch/Blah/Fea开发者_如何转开发tureA

So I create a file "test.txt" in the branch and commited it. I then accidentally created a file "test.txt" in the trunk

Later I attempt to merge the feature A branch to the main trunk.

It gives me the error

Skipped 'Test.txt'
Summary of conflicts:
  Skipped paths: 1

When merging.

So I realize it's because the main trunk had a non-sensical copy of the file. I delete the file from the trunk and re-run the merge command and it gives me zero output.

If I run the merge with the --dry-run, it too returns no output

If I run the diff command with the same arguments it shows the file Test.txt and that it intends to add.

So I ran off and did the test again but this time with "test2.txt". I made sure that the trunk didn't have a file named "test2.txt". I ran the merge and it ran perfectly.

So my question is, when I do accidentally have a file in the trunk with the same name that causes a conflict.

How do I get subversion to

  1. Raise a conflict and ask me if it wants to replace or edit the conflict
  2. Allow me to rename/delete the file so that I can simply re-run the merge and it works

Thanks!

** EDIT - With Answer **

I had a second set of eyes, apparently I neglected to add the --ignore-ancestry flag on my merge command. Once I added that, everything worked perfectly


This kind of conflict is a tree conflict.
The only way to resolve the conflict is to choose a file from either trunk or branch. There is not helper to rename during merge, you must manually solve this conflict.


I had a second set of eyes, apparently I neglected to add the --ignore-ancestry flag on my merge command. Once I added that, everything worked perfectly

0

精彩评论

暂无评论...
验证码 换一张
取 消