Warm tip: This article is reproduced from serverfault.com, please click

其他-SVN通过Eclipse合并与命令行相比有所不同

(其他 - SVN Merging Via Eclipse Differs Compared to Command Line)

发布于 2020-12-09 15:08:23

最近,我在将更改集成到主存储库(将分支移动到主干)中时遇到了一些问题,并且在理解为什么遇到这些问题时遇到了一些问题。

这是我得到的确切错误:

Working copy and merge source not ready for reintegration
svn: Cannot merge into a working copy that has local modifications

就我所知,这意味着我必须先将分支更新为头部,然后再将主干重新设置为干基,然后才能将分支移入主干。

这是我在Eclipse中执行的步骤:

<branch> > Team > Update to HEAD
<branch> > Team > Merge (Targeting <trunk>)
<branch> > Team > Commit...

这产生了上面提到的错误。

通过命令行执行以下步骤不会引起任何问题:

svn co <svn path to branch>
cd <specifically modified module of branch>
svn merge <path to branch module in trunk>
svn commit -m "<Commit message>"

有人可以帮助我理解Eclipse为什么会产生这些问题。我了解这些步骤略有不同,但是我仍然不明白为什么我应该遇到这些问题。

另外,请告诉我我的术语是否有误,需要任何更正或进一步的说明。任何和所有建设性的批评表示赞赏。

Questioner
lime
Viewed
11
Claudio Weiler 2020-12-09 23:22:54

svn: Cannot merge into a working copy that has local modifications 意味着你有本地修改没有提交(你有污垢的工作空间)。

如果确定没有本地修改,则可以尝试清除原始数据: Team > Cleanup

或/并且仅删除项目(删除标记为磁盘上的内容),然后再次从SVN导入。