Branch view for a file that has been split into multiple files
Posted
by ScottJ
on Stack Overflow
See other posts from Stack Overflow
or by ScottJ
Published on 2010-03-23T22:12:09Z
Indexed on
2010/03/24
14:43 UTC
Read the original article
Hit count: 292
I have a large source file in Perforce that has been split up into several smaller files in a branch. I want to create a branch view that can handle this, but perforce (2009.1) only sees the last of the multiple files. For example, I created:
p4 integrate //depot/original/huge_file.c //depot/new/huge_file.c
Later I split the huge file into smaller ones:
p4 integrate //depot/new/huge_file.c //depot/new/small_file_one.c
p4 integrate //depot/new/huge_file.c //depot/new/small_file_two.c
p4 integrate //depot/new/huge_file.c //depot/new/small_file_three.c
Then edit each of those (including //depot/new/huge_file.c
) and submit.
Now I make changes to //depot/original/huge_file.c
and I want to integrate those changes to //depot/new
. If I do this manually, it works fine:
p4 integrate //depot/original/huge_file.c //depot/new/huge_file.c
p4 integrate //depot/original/huge_file.c //depot/new/small_file_one.c
p4 integrate //depot/original/huge_file.c //depot/new/small_file_two.c
p4 integrate //depot/original/huge_file.c //depot/new/small_file_three.c
But I don't want to do that every time I integrate -- this kind of thing belongs in a branch view.
Unfortunately if the branch view includes the same source file multiple times, the subsequent lines override the earlier ones. How can I create a branch view like this:
//depot/original/huge_file.c //depot/new/huge_file.c
//depot/original/huge_file.c //depot/new/small_file_one.c
//depot/original/huge_file.c //depot/new/small_file_two.c
//depot/original/huge_file.c //depot/new/small_file_three.c
When I integrate using this branch spec, I get only small_file_three.c integrated.
© Stack Overflow or respective owner