[Perforce] Tasks - The Holy Hand Grenade of Branching

Preview:

DESCRIPTION

Task branching, or true sparse branching, is a game changer. Learn how, why, when, and where to use all of the different types of Perforce branching models.

Citation preview

1  

Tasks The Holy Hand Grenade of Branching

Gabe Weiss Technical Lead

Steph Turner Software Engineer

2  

3  

4  

Scene 1

5  

Together they formed a band

6  

Inter-file Branching

7  

Branches!

8  

Branches! Branches!

9  

Branches! Branches! Branches!

10  

It’s only a model!

11  

Crushed by performance and administration

12  

No more anarcho-syndicalism branching

13  

Code base has archive files & revision records

revx revcx revhx revdx

100K   300K  

Revs 3x Archive Files

14  

Branch creates revision & integ records

100K  

200K  

Revs 3x Archive Files

Integ 2x To and From

300K  

300K  

15  

for every branch

100K  

200K  

Revs 3x Archive Files

Integ 2x To and From

300K  

300K  

300K   200K  

16  

even if

100K  

200K  

Revs 3x Archive Files

Integ 2x To and From

300K  

300K  

300K  

300K   200K  

200K  

17  

you don’t change a single file!

100K  

200K  

Revs 3x Archive Files

Integ 2x To and From

300K  

300K  

300K  

300K  

300K   200K  

200K  

200K  

18  

Hello_Idyllic_Vision.cpp

switch (branchType) { case full_branches: {

++metadata; --performance; ++administration; break;

} default: { // back to the dark ages of // sccs? exit (0); } }

                       

19  

Camelot is a silly place.

20  

Scene 2

21  

I am a not so brave developer

22  

Overlay (+) Mappings

23  

Overlays involve the branch and workspace

Revs Archived

Files Code Base

24  

Branch part of the code

Revs Archived

Files Code Base

25  

Controls growth of revision and integration records

branched  

Revs Integ 2x

To and From Archived

Files Code Base

26  

Workspace maps the initial code base

branched  

Revs Integ 2x

To and From Workspace Archived

Files Code Base

27  

Overlay rules map the branched code on top

branched  

Revs Integ 2x

To and From Workspace Archived

Files Code Base

28  

Well what do you think?

29  

Spanked by twisted client maps

30  

When danger reared its ugly head…

31  

Scene 3

32  

I move for no man

33  

Obliterate

34  

Obliterate Dismembering Technique

ArchiveFiles Revs

Code

35  

Branches add metadata

ArchiveFiles

Integs To and From

Dev Branch

Code

Revs

36  

Submitted file adds archive and metadata

ArchiveFiles

Integs To and From

Dev Branch

Code

Revs

37  

Identify interesting files & metadata

ArchiveFiles

Integs To and From

Dev Branch

Code

Revs

38  

Obliterate the useless data

Integs To and From

Dev Branch

Code

ArchiveFiles Revs

39  

It’s not just a flesh wound

40  

Scene 4

41  

What is your quest?

42  

Escape the Gorge of Eternal Peril

Naming Schemes Branch Mappings Client Mappings Client Templates Client Updates

Change Propagation Renames

Moves Splits

Ancestry

43  

Streams puts code into a container

P4V  

Revs Archive

Files Swarm  Server  

Code Base

44  

Stream import carries no rev or integ cost

P4V  

Revs Archive

Files Swarm  Server  

Code Base

Swarm  Server  

45  

Workspaces generated from stream rules

P4V  

Revs Archive

Files Swarm  Server  

Swarm  Server  

P4V  

Swarm  Server  

Workspace

46  

Streams controls metadata growth

File Archive Revs

Integ To and From

P4V  

Swarm  Server  

P4V  

Swarm  Server  

 Swarm  Server  

Child Stream

Parent Stream

47  

Cross the Bridge of Death with Streams

48  

Scene 5

49  

Bring out yer dead

50  

He says he’s not dead

51  

Archive

Revs Code Base

#1   #1  

ArchiveFiles

#2  #2  

52  

Archive

ArchiveFiles Revs

#2  

#1  #1  

Code Base

#2  

Archive Depot

53  

Not integrated or copied files!

54  

Final Scene

55  

Bring out the Holy Hand Grenade

56  

57  

Before task streams

Dev Stream

Parent Stream

ArchiveFiles Revs

Integs To and From

58  

Now task metadata is put into shadow tables

Archive Files Revs

Integs To and From

Task Stream

Parent Stream

59  

Archive and metadata for file

Task Stream

Parent Stream

t#1  

p#3  

Archive Files Revs

Integs To and From

p#3,  t#1  

t#1  

p#3  

60  

Submit a new version of file …

Task Stream t#2  

ArchiveFiles Revs

Integs To and From

p#3,  t#1  

t#2  

t#1  

p#3  

t#2  

t#1  

61  

Shadow integ & rev metadata copied to real table

Task Stream t#2  

ArchiveFiles Revs

Integs To and From

p#3,  t#1  

t#1  

p#3  

t#2  

t#2  t#1  t#2  

62  

Only interesting metadata gets copied!

Task Stream t#2  

ArchiveFiles Revs

Integs To and From

p#3,  t#1  

t#1  

p#3  

t#2  

t#1  t#2  t#2  

63  

Contact information

64  

Delete Task Stream

Task Stream

Parent Stream

t#2  

p#3  

ArchiveFiles Revs

Integs To and From

p#3,  t#1  

t#1  

p#3  

t#2  

t#1  t#2  t#2  

65  

Removes shadow metadata

Task Stream

Parent Stream

t#2  

p#3  

ArchiveFiles Revs

Integs To and From

p#3,  t#1   p#3  

t#1  t#2  t#2  

66  

P4IdeaX   Forums  

Questions? See us in the Demo Lounge Connect with us Steph Turner: sturner@perforce.com Gabe Weiss: gweiss@perforce.com

Recommended