Five Real-World Strategies for Perforce Streams
-
Upload
perforce -
Category
Technology
-
view
1.398 -
download
3
description
Transcript of Five Real-World Strategies for Perforce Streams
![Page 1: Five Real-World Strategies for Perforce Streams](https://reader038.fdocuments.us/reader038/viewer/2022102621/5537f4c14a79596f718b462a/html5/thumbnails/1.jpg)
#
Erik van NooijenTechnical Lead at TomTom
Five Real-World Strategies for Perforce Streams
![Page 2: Five Real-World Strategies for Perforce Streams](https://reader038.fdocuments.us/reader038/viewer/2022102621/5537f4c14a79596f718b462a/html5/thumbnails/2.jpg)
#
Erik van NooijenTechnical LeadTomTom International B.V.10 years as contractor
• (senior) developer
5 years in TomTom - Netherlands
• 3 years senior developer
• 2 years technical lead
![Page 3: Five Real-World Strategies for Perforce Streams](https://reader038.fdocuments.us/reader038/viewer/2022102621/5537f4c14a79596f718b462a/html5/thumbnails/3.jpg)
#
TomTom background information
![Page 4: Five Real-World Strategies for Perforce Streams](https://reader038.fdocuments.us/reader038/viewer/2022102621/5537f4c14a79596f718b462a/html5/thumbnails/4.jpg)
#
TomTom total Perforce installation
size 780 Gb database3.2 TB versioned files
#proxies 10
#replicas 4
#users ~700
#workspaces ~19000
#changes ~1.000.000
Main server 32 core284 Gb ram4* Fusion IO (ssd) 8.6 Tb
TomTom Perforce installation numbers
Streamed depot
size 52 Gb
#streams 360
#mainlines 1
#release streams 20
#users ~150
#changes ~80000
![Page 5: Five Real-World Strategies for Perforce Streams](https://reader038.fdocuments.us/reader038/viewer/2022102621/5537f4c14a79596f718b462a/html5/thumbnails/5.jpg)
#
Educate your user base on streams
![Page 6: Five Real-World Strategies for Perforce Streams](https://reader038.fdocuments.us/reader038/viewer/2022102621/5537f4c14a79596f718b462a/html5/thumbnails/6.jpg)
#
Educate user base• Parent / child stream relationship
– predefined integration flows
• Merge-down / copy-up– resolve-on-child paradigm
• Stream specification vs branch mapping• Moving workspace• Naming conventions
– Renaming a stream does not rename the underlying branch
• Deleting streams
![Page 7: Five Real-World Strategies for Perforce Streams](https://reader038.fdocuments.us/reader038/viewer/2022102621/5537f4c14a79596f718b462a/html5/thumbnails/7.jpg)
#
Cherry-picking integrations
![Page 8: Five Real-World Strategies for Perforce Streams](https://reader038.fdocuments.us/reader038/viewer/2022102621/5537f4c14a79596f718b462a/html5/thumbnails/8.jpg)
#
• Integrate 1 (or few) specific changelists up, without doing a full copy-up
• Examples:– Quick propagation of a bug fix
– Selective moving finished work to prep stream
Cherry-picking integrations
![Page 9: Five Real-World Strategies for Perforce Streams](https://reader038.fdocuments.us/reader038/viewer/2022102621/5537f4c14a79596f718b462a/html5/thumbnails/9.jpg)
#
Cross stream integrations
![Page 10: Five Real-World Strategies for Perforce Streams](https://reader038.fdocuments.us/reader038/viewer/2022102621/5537f4c14a79596f718b462a/html5/thumbnails/10.jpg)
#
• Integrations that are not following pre-defined flow
• Using ‘p4 integrate //source/…@11,11 //dest/…’
• Example: integrate specific changelist into existing release. Most often happens for bug fixes.
Xstream integration: dev-to-release
![Page 11: Five Real-World Strategies for Perforce Streams](https://reader038.fdocuments.us/reader038/viewer/2022102621/5537f4c14a79596f718b462a/html5/thumbnails/11.jpg)
#
• Integrations that are not following pre-defined flow
• Using ‘p4 integrate //source/…@11,11 //dest/…’
• Example: integrate specific changelist across development streams, without going via main. Usually for inter-dependencies between developments.
• Alternative; use stream specification with ‘import’– Defined imports with ‘import @’ available with p4d
2014.1
– Writable imports become available with p4d 2014.2
Xstream integration: dev-to-dev
![Page 12: Five Real-World Strategies for Perforce Streams](https://reader038.fdocuments.us/reader038/viewer/2022102621/5537f4c14a79596f718b462a/html5/thumbnails/12.jpg)
#
Stream specifications can be overruled with branch mapping
![Page 13: Five Real-World Strategies for Perforce Streams](https://reader038.fdocuments.us/reader038/viewer/2022102621/5537f4c14a79596f718b462a/html5/thumbnails/13.jpg)
#
Stream: //depot/main
Type: mainline
Paths: share //…
Stream: //depot/dev-X
Type: development
Parent: //depot/main
Paths: share //…
import versions.txt //depot/main/versions.txt
Stream spec vs branch mappingClient: depot_dev_wsView: //depot/dev-X/… // depot_dev_ws/…
!! No ‘Stream:’ but using branch mappings
$ p4 edit versions.txt
$ p4 submit –d “my own development identifiers in versions.txt”
$ p4 copy //depot/dev-X/… //depot/main/…
$ p4 submit -d “copy up from dev stream”
!! No –S <stream> for copy argument, but branch mappings
Result: versions.txt changed on main!
Final solution:
1. RW permission group on main for this file
2. educating users on p4 copy
![Page 14: Five Real-World Strategies for Perforce Streams](https://reader038.fdocuments.us/reader038/viewer/2022102621/5537f4c14a79596f718b462a/html5/thumbnails/14.jpg)
#
Task- and Virtual streams
![Page 15: Five Real-World Strategies for Perforce Streams](https://reader038.fdocuments.us/reader038/viewer/2022102621/5537f4c14a79596f718b462a/html5/thumbnails/15.jpg)
#
• Most benefit on server side, less so for end-users
• Can be confusing when used with branch mapping
• When to use regular development stream vs task stream ?– Task streams can be converted to type development, but conversion back is not possible
• We decided not to use them, instead we use development streams only
Task streams
![Page 16: Five Real-World Strategies for Perforce Streams](https://reader038.fdocuments.us/reader038/viewer/2022102621/5537f4c14a79596f718b462a/html5/thumbnails/16.jpg)
#
• Reduce the amount of data that gets pulled into a workspace
• Compose product combinations with only imports– One mainline with all imports for ‘mainlines’
– Many virtual streams based on the mainline that overrule the imports with various ‘release’ imports
– Easy and cheap to make many combinations
Virtual streams
![Page 17: Five Real-World Strategies for Perforce Streams](https://reader038.fdocuments.us/reader038/viewer/2022102621/5537f4c14a79596f718b462a/html5/thumbnails/17.jpg)
#
canary-main (type: mainline)import os/… //depot-os/main/…
import engine/… //depot-engine/main/…
import ui/… //depot-ui/main/…
import engine/ui-tweaks/… //depot-ui/main/tweaks/…
canary-ui-rel1 (type: virtual)share …
import ui/… //depot-ui/rel-1/…
import engine/ui-tweaks/… //depot-ui/rel-1/tweaks/…
canary-ui-rel2 (type: virtual)share …
import ui/… //depot-engine/rel-2/…
import engine/ui-tweaks/… //depot-ui/rel-2/tweaks/…
Virtual streams
![Page 18: Five Real-World Strategies for Perforce Streams](https://reader038.fdocuments.us/reader038/viewer/2022102621/5537f4c14a79596f718b462a/html5/thumbnails/18.jpg)
#
Addendum
![Page 19: Five Real-World Strategies for Perforce Streams](https://reader038.fdocuments.us/reader038/viewer/2022102621/5537f4c14a79596f718b462a/html5/thumbnails/19.jpg)
#
• ‘p4 integrate –f’ is evil !– alternative is ‘p4 copy’
• Use ‘integ.engine = 3’– engine 3 is default, but maybe you have engine 2 specifically configured
• Import with stream specification not (yet) supported– ‘import //… -S //depot/stream’
Addendum
![Page 20: Five Real-World Strategies for Perforce Streams](https://reader038.fdocuments.us/reader038/viewer/2022102621/5537f4c14a79596f718b462a/html5/thumbnails/20.jpg)
#
• Educate your user base
• Cherry picking integrations
• Cross integrations
• Stream specification versus branch mapping
• Task and virtual streams
Summary