Perforce仓库中有四个分支:B1,B2,B3和B4 让我们认为B1是主要的(核心,主干) B2和B3可能包含必须包含在B1中但由于某些原因而错过的更改 B4是已经从B1创建的目标分支,但由于错过了B2而B3中的B3变化未满 目标是构建文件列表(不进行合并!),这些文件没有从B2和B3传播到B1(一个列表),而且没有从B1传播到B4
答案 0 :(得分:3)
这是一个例子。它很小,但希望它能给你这个想法。
C:\Users\Bryan\perforce\client>mkdir B1
C:\Users\Bryan\perforce\client>cd B1
C:\Users\Bryan\perforce\client\B1>vim f1 f2
C:\Users\Bryan\perforce\client\B1>p4 add f1 f2
//depot/B1/f1#1 - opened for add
//depot/B1/f2#1 - opened for add
C:\Users\Bryan\perforce\client\B1>p4 submit -d add_B1
Submitting change 15.
Locking 2 files ...
add //depot/B1/f1#1
add //depot/B1/f2#1
Change 15 submitted.
C:\Users\Bryan\perforce\client\B1>p4 populate //depot/B1/... //depot/B2/...
2 files branched (change 16).
C:\Users\Bryan\perforce\client\B1>p4 populate //depot/B1/... //depot/B3/...
2 files branched (change 17).
C:\Users\Bryan\perforce\client\B1>p4 edit B1/f1
B1/f1 - file(s) not on client.
C:\Users\Bryan\perforce\client\B1>p4 sync
//depot/B2/f1#1 - added as c:\Users\Bryan\perforce\client\B2\f1
//depot/B2/f2#1 - added as c:\Users\Bryan\perforce\client\B2\f2
//depot/B3/f1#1 - added as c:\Users\Bryan\perforce\client\B3\f1
//depot/B3/f2#1 - added as c:\Users\Bryan\perforce\client\B3\f2
C:\Users\Bryan\perforce\client\B1>cd ..\
C:\Users\Bryan\perforce\client>p4 edit B2\f1
//depot/B2/f1#1 - opened for edit
C:\Users\Bryan\perforce\client>vim B2\f1
C:\Users\Bryan\perforce\client>p4 submit -d add_to_B2
Submitting change 18.
Locking 1 files ...
edit //depot/B2/f1#2
Change 18 submitted.
C:\Users\Bryan\perforce\client>p4 edit B3/f2
//depot/B3/f2#1 - opened for edit
C:\Users\Bryan\perforce\client>vim B3\f2
C:\Users\Bryan\perforce\client>p4 submit -d insert_to_B3
Submitting change 19.
Locking 1 files ...
edit //depot/B3/f2#2
Change 19 submitted.
C:\Users\Bryan\perforce\client>p4 populate //depot/B1/... //depot/B4/...
2 files branched (change 20).
C:\Users\Bryan\perforce\client>p4 integrate -n //depot/B2/... //depot/B1/...
//depot/B1/f1#1 - integrate from //depot/B2/f1#2
C:\Users\Bryan\perforce\client>p4 integrate -n //depot/B3/... //depot/B1/...
//depot/B1/f2#1 - integrate from //depot/B3/f2#2
C:\Users\Bryan\perforce\client>p4 integrate -n //depot/B2/... //depot/B4/...
//depot/B4/f1#1 - sync/integrate from //depot/B2/f1#2
C:\Users\Bryan\perforce\client>p4 integrate -n //depot/B3/... //depot/B4/...
//depot/B4/f2#1 - sync/integrate from //depot/B3/f2#2