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.
Size: 9.97 MB
Language: en
Added: Sep 16, 2014
Slides: 21 pages
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
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