svn 分支合并,有些文件没有合并过来

本文介绍在使用Subversion (SVN)版本控制系统时遇到的文件重命名后合并失败的问题及其解决方法。当从旧版本3.0的a.txt更改为3.1版本的b.txt时,合并过程中会导致找不到对应文件而失败。文章提供了如何在IntelliJ IDEA中避免此问题的方法,并介绍了通过使用SVN的Rename功能来修复文件历史记录关联。

原因

在版本3.0中文件名字是a.txt,在3.1版本将a.txt改为了b.txt,合并时3.0的a.txt找不到对应文件,导致合并失败;
此时intellij message标签页中提示,

Warning:Integration interrupted. There are unresolved conflicts or skipped items.

并且在subversion version control中提示
这里写图片描述
此时,intellij的local changes会提示 local deleted
这里写图片描述

解决

在合并前,不要修改文件名字。

svn官方文档的说明

关于改了文件名,就断了联系这一点,svn官方文档说是可以修复的,

Repairing File Renames
Sometimes your friendly IDE will rename files for you as part of a refactoring exercise, and of course it doesn’t tell Subversion. If you try to commit your changes, Subversion will see the old filename as missing and the new one as an unversioned file. You could just check the new filename to get it added in, but you would then lose the history tracing, as Subversion does not know the files are related.
A better way is to notify Subversion that this change is actually a rename, and you can do this within the Commit and Check for Modifications dialogs. Simply select both the old name (missing) and the new name (unversioned) and use Context Menu → Repair Move to pair the two files as a rename.

亲测试后得知,tortoise svn的rename功能 intellij已经实现了关联,但是只是在当前分支实现了关联,修改文件名字后,查看svn history可以看到以前的commit信息,但是如果从旧分支合并到新分支,还是合并不了,不能跨分支;

参考

https://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-rename.html

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值