[英]svn merge doesn't merge
I'm trying to merge some hotfixes from trunk onto a branch. 我正在尝试将一些来自trunk的修补程序合并到一个分支上。 When I compare
trunk/foo.py
and branches/feature/foo.py
, I see differences. 当我比较
trunk/foo.py
和branches/feature/foo.py
,我看到了差异。 Yet, when I run svn merge https://<svn server>/trunk/foo.py foo.py
, no changes get merged. 然而,当我运行
svn merge https://<svn server>/trunk/foo.py foo.py
,没有任何更改被合并。 Retrying with the --force
option has no effect either. 使用
--force
选项重试也没有任何效果。 It seems like SVN thinks that the feature branch's copy of foo.py
is the latest version. 似乎SVN认为功能分支的
foo.py
副本是最新版本。 How do I convince SVN otherwise? 如何说服SVN呢?
EDIT: My Subversion client is svn
version 1.6.16 (Linux). 编辑:我的Subversion客户端是
svn
版本1.6.16(Linux)。 The server is running trac, version 0.12. 服务器正在运行trac,版本0.12。
EDIT2: The version of subversion the server is 1.6.9. EDIT2:服务器的subversion版本是1.6.9。 Thanks to hasienda in the comments for pointing out that trac and subversion aren't necessarily correlated.
感谢评论中的hasienda指出trac和subversion不一定是相关的。
I'd start with; 我先说
svn info <trunk>/foo.py
and svn <branch>/foo.py
; svn info <trunk>/foo.py
和svn <branch>/foo.py
; Check the last Changed Rev & Date, if SVN says they're the same file, no merge would happen. You can check out Advanced Merging for additional information. 您可以查看高级合并以获取更多信息。
我不确定你使用的是什么版本的subversion,但是我认为合并跟踪还没有完全实现。
Whenever something in Subversion is behaving unexpectedly or seems to be harder than it should be, my general rule of thumb is to grab a fresh working copy in a new, clean directory and try it again with no local modifications. 每当Subversion中的某些内容出现异常或似乎比它应该更难时,我的一般经验法则是在一个新的,干净的目录中获取一个新的工作副本,并在没有本地修改的情况下再次尝试。 This tends to rule out a number of subtle problems that can be hard to detect.
这往往排除了一些难以察觉的微妙问题。
Also, do a svn diff <server>/branches/this_branch <server>/trunk
to make sure Subversion thinks that there are changes to merge. 另外,执行
svn diff <server>/branches/this_branch <server>/trunk
以确保Subversion认为存在合并更改。 Using two repository paths here will eliminate any possible issues with your working copy. 在此处使用两个存储库路径将消除工作副本的任何可能问题。 If the above
diff
command gives you different results when you swap the branch URL with the path to your WC, then the problem is likely something in your working copy. 如果上面的
diff
命令在您将分支URL与WC的路径交换时给出了不同的结果,那么问题可能在您的工作副本中。
You can also do the merge purely in the repository by providing two full URLs to the merge
command. 您还可以通过向
merge
命令提供两个完整URL来纯粹在存储库中进行merge
。 If you go that route, I highly suggest using the --dry-run
option to preview the merge before making it official. 如果你走这条路线,我强烈建议使用
--dry-run
选项在合并之前预览合并。
Also, is there a reason why you are merging using specific filenames and not simply merging the the entire /trunk
to your branch? 此外,您是否有合理使用特定文件名而不是简单地将整个
/trunk
合并到您的分支的原因? I typically see far fewer problems when merging entire revisions into a branch rather than into specific files. 在将整个修订版本合并到一个分支而不是特定文件中时,我通常会看到更少的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.