作者在 2012-08-17 22:38:24 发布以下内容
You are *not* merging two unrelated sources. https://svn/A/trunk@1000 and https://svn/A/trunk@2000 are related to each other yes?
This matters because:
1) 'svn diff' ignores ancestry by default
2) 'svn merge' considers ancestry by default
Check out this section of the Subversion book, http://svnbook.red-bean.com/nightly/en/svn-book.html#svn.branchmerge.advanced.ancestry, it explains in more detail what I am talking about.
What this means for you is that the diffs calculated by
c:\SOURCE\A\trunk\>svn diff -r 1000:2000 > trunk.A.patch
and
c:\SOURCE\B\trunk\>svn merge -r 1000:2000 https://svn/A/trunk
are not *necessarily* the same. To make diff equivalent to merge or vice-versa you need to use the --ignore/--notice-ancestry options.
In your case that means the diffs generated by these two are equivalent:
c:\SOURCE\A\trunk\>svn diff -r 1000:2000 --consider-ancestry > trunk.A.patch
c:\SOURCE\B\trunk\>svn merge -r 1000:2000 https://svn/A/trunk
And so are these:
c:\SOURCE\A\trunk\>svn diff -r 1000:2000 > trunk.A.patch
c:\SOURCE\B\trunk\>svn merge -r 1000:2000 --ignore-ancestry https://svn/A/trunk
It might be informative to try generating these two diffs:
c:\SOURCE\A\trunk\>svn diff -r 1000:2000 --consider-ancestry > trunk.A.consider-ancestry.patch
c:\SOURCE\A\trunk\>svn diff -r 1000:2000 > trunk.A.ignore-ancestry.patch
Are the diffs exactly the same? If not, this might be part of your problem.
This matters because:
1) 'svn diff' ignores ancestry by default
2) 'svn merge' considers ancestry by default
Check out this section of the Subversion book, http://svnbook.red-bean.com/nightly/en/svn-book.html#svn.branchmerge.advanced.ancestry, it explains in more detail what I am talking about.
What this means for you is that the diffs calculated by
c:\SOURCE\A\trunk\>svn diff -r 1000:2000 > trunk.A.patch
and
c:\SOURCE\B\trunk\>svn merge -r 1000:2000 https://svn/A/trunk
are not *necessarily* the same. To make diff equivalent to merge or vice-versa you need to use the --ignore/--notice-ancestry options.
In your case that means the diffs generated by these two are equivalent:
c:\SOURCE\A\trunk\>svn diff -r 1000:2000 --consider-ancestry > trunk.A.patch
c:\SOURCE\B\trunk\>svn merge -r 1000:2000 https://svn/A/trunk
And so are these:
c:\SOURCE\A\trunk\>svn diff -r 1000:2000 > trunk.A.patch
c:\SOURCE\B\trunk\>svn merge -r 1000:2000 --ignore-ancestry https://svn/A/trunk
It might be informative to try generating these two diffs:
c:\SOURCE\A\trunk\>svn diff -r 1000:2000 --consider-ancestry > trunk.A.consider-ancestry.patch
c:\SOURCE\A\trunk\>svn diff -r 1000:2000 > trunk.A.ignore-ancestry.patch
Are the diffs exactly the same? If not, this might be part of your problem.