I want to merge revision r1007
from the trunk into a pristine working copy of a /branches/feature-branch
. The revision includes changes to 2 files that already exist in both trunk and branch.
I've tried with both tools TortoiseSVN and the command-line client and the result is always the same: the merge proceeds without errors but no file contents get modified. Only the svn:mergeinfo
property gets (properly) updated to reflect r1007
:
C:\>svn log -r1007 --verbose https://example.com.s:8443/svn/project/trunk
------------------------------------------------------------------------
r1007 | alvaro | 2011-02-01 17:44:37 +0100 (mar, 01 feb 2011) | 5 lines
Changed paths:
M /trunk/Servidor/web/importar/index.php
M /trunk/Servidor/web/logica/importacion-ayuntamiento.php
Fix blah blah blah
------------------------------------------------------------------------
C:\>svn merge https://example.com:8443/svn/project/trunk@1006 ^
https://example.com:8443/svn/project/trunk@1007 ^
C:\Project\feature-branch
C:\>svn status C:\Project\feature-branch
M C:\Project\feature-branch
(I've tried svn merge -r1006:1007 https://example.com:8443/svn/project/trunk C:\Project\feature-branch
as well.)
The only involved directory that has a svn:mergeinfo
property is C:\Project\feature-bran开发者_如何学运维ch
and I see nothing wrong in it:
/branches/branch-a:476-477,481,611,613-614,620-622,661-662,731,740-742,745-748,751,757,922,988
/branches/branch-b:482,489-497,499-589,598,603,610,625,627,636,638-640,646,648,657,668-672,682,684,690,700,715-718,720,722,725-730,762,764-767,770,773,778-779,782-789,803,805,807,826,834,836-837,839-859,869,875,882,900-905
/branches/branch-c:706,709,712,735,737-739,829,842-852,854,877,892,907-910,918
/trunk:1-942,980,986,991,995,1000,1007,1017-1021
The only change made by the merge is adding ,1007
to the /trunk
line (it's not there before merging).
Do you have any idea of why the merge is neither copying my code changes nor failing?
Update: The source code itself can be merged just fine: I can create a patch an apply it manually.
Sorry for wasting your time but it turned out to be the typical effect of bad sleep and strained eyes.
I had committed r1008
with a new feature on /branches/feature-branch
that already contained those same changes (among others). Subversion is smart enough to realise that there is not need to port those new lines of code since there are already there in the target file. That's the correct behaviour.
(I guess that when I did manual patching in order to test I wasn't careful enough and interpreted the results wrong.)
How I made the same changes in two branches without merging is something I'll never know, but I did it: it's all in the log.
I may be missing something but 1007 is already in the /trunk line:
/trunk:1-942,980,986,991,995,1000,1007,1017-1021
精彩评论