Five Real-World Strategies for Perforce Streams

perforce 8,910 views 21 slides Sep 16, 2014
Slide 1
Slide 1 of 21
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21

About This Presentation

Before you deploy Perforce Streams in your organization, you should have a plan in place. Get advice and hear the five strategies for using Streams and how to handle integration exceptions gracefully.


Slide Content

Erik van Nooijen Technical Lead at TomTom Five Real-World Strategies for Perforce Streams

Erik van Nooijen Technical Lead TomTom International B.V. 10 years as contractor (senior) developer 5 years in TomTom - Netherlands 3 years senior developer 2 years technical lead

TomTom background information

TomTom total Perforce installation size 780 Gb database 3.2 TB versioned files #proxies 10 #replicas 4 #users ~700 #workspaces ~19000 #changes ~1.000.000 Main server 32 core 284 Gb ram 4* 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

Educate your user base on streams

Educate user base Parent / child stream relationship p redefined integration flows Merge-down / copy-up r esolve-on-child paradigm Stream specification vs branch mapping Moving workspace Naming conventions Renaming a stream does not rename the underlying branch Deleting streams

Cherry-picking integrations

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

Cross stream integrations

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

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

Stream specifications can be overruled with branch mapping

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 mapping Client: depot_dev_ws View: //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: RW permission group on main for this file educating users on p4 copy

Task- and Virtual streams

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

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

c anary-main (type: mainline) import os /… //depot- os /main/… i mport engine/… //depot-engine/main/… i mport ui /… //depot- ui /main/… i mport engine/ ui -tweaks/… //depot- ui /main/tweaks/… c anary-ui-rel1 (type: virtual) s hare … import ui /… //depot- ui /rel-1/… i mport engine/ ui -tweaks/… //depot- ui /rel-1/tweaks/… c anary-ui-rel2 (type: virtual) s hare … i mport ui /… //depot-engine/rel-2/… import engine/ ui -tweaks/… // depot- ui /rel-2/tweaks /… Virtual streams

Addendum

‘ p4 integrate –f ’ is evil ! a lternative 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

Educate your user base Cherry picking integrations Cross integrations Stream specification versus branch mapping Task and virtual streams Summary

Thank you! Erik van Nooijen [email protected] # idonttweet