SVN文件夹结构:
repo/
trunk
trunk-merge
tags
branch/
me/
sprint-01
我需要运行一个命令将sprint-01合并到trunk-merge中,这两个版本都是主要版本。
现在我为开关运行以下命令:
svn switch https://xxxxxxx/xxx/repo/trunk-merge /var/www/project/
如何为合并方案构建此命令?
答案 0 :(得分:1)
SomeMailer
)之后,您将发现:为了合并任何两个节点,您必须:
svn help merge
或者您可以将另一个存储库树的未使用的WC切换为trunk-merge svn co https://xxxxxxx/xxx/repo/trunk-merge && cd trunk-merge
并使用第一种形式的合并(“完全合并”)
cd $SOMEPATH && svn switch ^/trunk-merge
好的,带玩具回购的逐步展示(对于部分俄罗斯语言环境感到抱歉,我懒得切换它)
使用主干和工作分支记录(完整)回购
cd $TRUNK-MERGE
svn merge ^/branch/me/sprint-01
行李箱状态
WC>svn log -v
------------------------------------------------------------------------
r5 | Badger | 2016-01-16 16:57:50 +0500 (Сб, 16 янв 2016) | 1 line
Changed paths:
M /branches/sprint01/a.txt
Added non-conflicting change to a.txt
------------------------------------------------------------------------
r4 | Badger | 2016-01-16 16:56:16 +0500 (Сб, 16 янв 2016) | 1 line
Changed paths:
A /branches/sprint01/Sub
A /branches/sprint01/Sub/c.txt
A /branches/sprint01/b.txt
Added b.txt, dir Sub and file Sub/c.txt
------------------------------------------------------------------------
r3 | Badger | 2016-01-16 16:53:32 +0500 (Сб, 16 янв 2016) | 1 line
Changed paths:
A /branches/sprint01 (from /trunk:2)
Create branch sprint01 from trunk
------------------------------------------------------------------------
r2 | Badger | 2016-01-16 16:51:12 +0500 (Сб, 16 янв 2016) | 1 line
Changed paths:
A /trunk/a.txt
Commit a.txt
------------------------------------------------------------------------
r1 | Badger | 2016-01-16 16:48:47 +0500 (Сб, 16 янв 2016) | 1 line
Changed paths:
A /branches
A /tags
A /trunk
Imported folder structure
------------------------------------------------------------------------
分支机构状况
>svn ls -v "^/trunk"
2 Badger янв 16 16:51 ./
2 Badger 18 янв 16 16:51 a.txt
我会尝试合并分支的更改(从发散点到结束点)到主干,请注意当前合并目录
>svn ls -v -R "^/branches/sprint01"
5 Badger янв 16 16:57 ./
4 Badger янв 16 16:56 Sub/
4 Badger 18 янв 16 16:56 Sub/c.txt
5 Badger 36 янв 16 16:57 a.txt
4 Badger 18 янв 16 16:56 b.txt
没有错误,全部添加和更新
WC\trunk>svn merge "^/branches/sprint01" .
--- Merging r3 through r5 into '.':
U a.txt
A b.txt
A Sub
A Sub\c.txt
--- Recording mergeinfo for merge of r3 through r5 into '.':
U .
提交mergeset后的WC\trunk>svn st
M .
A + Sub
M a.txt
A + b.txt