Suppose I have a file A.txt
in my Perforce client workspace, which already exists on the server as //depot/A.txt
. Now, suppose I want to make a copy of A.txt, call it B.txt
, and make some changes to B.txt before I commit it to the server. I might do this like so:
p4 integrate A.txt B.txt
p4 edit B.txt
vim B.txt
p4 submit
Will Perforce remember that B.txt started out as a copy of A.txt? For example, if I run p4 filelog B.txt
, will it show that //depot/B.txt was originally branched from //depot/A.txt ?
(Actually, I already know the answer, but it was not so easy to figure out without actually trying it completely, thanks to p4
's characteristically confusing output. So I figure I'll ask the question so that someone can provide an answer for the record.)
The answer, for the record, is yes. Remember to use the -i
("inherited history") flag on p4 filelog
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With