[perforce] tasks - the holy hand grenade of branching

66
1 Tasks The Holy Hand Grenade of Branching Gabe Weiss Technical Lead Steph Turner Software Engineer

Upload: perforce

Post on 05-Dec-2014

192 views

Category:

Technology


1 download

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.

TRANSCRIPT

Page 1: [Perforce] Tasks - The Holy Hand Grenade of Branching

1  

Tasks The Holy Hand Grenade of Branching

Gabe Weiss Technical Lead

Steph Turner Software Engineer

Page 2: [Perforce] Tasks - The Holy Hand Grenade of Branching

2  

Page 3: [Perforce] Tasks - The Holy Hand Grenade of Branching

3  

Page 4: [Perforce] Tasks - The Holy Hand Grenade of Branching

4  

Scene 1

Page 5: [Perforce] Tasks - The Holy Hand Grenade of Branching

5  

Together they formed a band

Page 6: [Perforce] Tasks - The Holy Hand Grenade of Branching

6  

Inter-file Branching

Page 7: [Perforce] Tasks - The Holy Hand Grenade of Branching

7  

Branches!

Page 8: [Perforce] Tasks - The Holy Hand Grenade of Branching

8  

Branches! Branches!

Page 9: [Perforce] Tasks - The Holy Hand Grenade of Branching

9  

Branches! Branches! Branches!

Page 10: [Perforce] Tasks - The Holy Hand Grenade of Branching

10  

It’s only a model!

Page 11: [Perforce] Tasks - The Holy Hand Grenade of Branching

11  

Crushed by performance and administration

Page 12: [Perforce] Tasks - The Holy Hand Grenade of Branching

12  

No more anarcho-syndicalism branching

Page 13: [Perforce] Tasks - The Holy Hand Grenade of Branching

13  

Code base has archive files & revision records

revx revcx revhx revdx

100K   300K  

Revs 3x Archive Files

Page 14: [Perforce] Tasks - The Holy Hand Grenade of Branching

14  

Branch creates revision & integ records

100K  

200K  

Revs 3x Archive Files

Integ 2x To and From

300K  

300K  

Page 15: [Perforce] Tasks - The Holy Hand Grenade of Branching

15  

for every branch

100K  

200K  

Revs 3x Archive Files

Integ 2x To and From

300K  

300K  

300K   200K  

Page 16: [Perforce] Tasks - The Holy Hand Grenade of Branching

16  

even if

100K  

200K  

Revs 3x Archive Files

Integ 2x To and From

300K  

300K  

300K  

300K   200K  

200K  

Page 17: [Perforce] Tasks - The Holy Hand Grenade of Branching

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  

Page 18: [Perforce] Tasks - The Holy Hand Grenade of Branching

18  

Hello_Idyllic_Vision.cpp

switch (branchType) { case full_branches: {

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

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

                       

Page 19: [Perforce] Tasks - The Holy Hand Grenade of Branching

19  

Camelot is a silly place.

Page 20: [Perforce] Tasks - The Holy Hand Grenade of Branching

20  

Scene 2

Page 21: [Perforce] Tasks - The Holy Hand Grenade of Branching

21  

I am a not so brave developer

Page 22: [Perforce] Tasks - The Holy Hand Grenade of Branching

22  

Overlay (+) Mappings

Page 23: [Perforce] Tasks - The Holy Hand Grenade of Branching

23  

Overlays involve the branch and workspace

Revs Archived

Files Code Base

Page 24: [Perforce] Tasks - The Holy Hand Grenade of Branching

24  

Branch part of the code

Revs Archived

Files Code Base

Page 25: [Perforce] Tasks - The Holy Hand Grenade of Branching

25  

Controls growth of revision and integration records

branched  

Revs Integ 2x

To and From Archived

Files Code Base

Page 26: [Perforce] Tasks - The Holy Hand Grenade of Branching

26  

Workspace maps the initial code base

branched  

Revs Integ 2x

To and From Workspace Archived

Files Code Base

Page 27: [Perforce] Tasks - The Holy Hand Grenade of Branching

27  

Overlay rules map the branched code on top

branched  

Revs Integ 2x

To and From Workspace Archived

Files Code Base

Page 28: [Perforce] Tasks - The Holy Hand Grenade of Branching

28  

Well what do you think?

Page 29: [Perforce] Tasks - The Holy Hand Grenade of Branching

29  

Spanked by twisted client maps

Page 30: [Perforce] Tasks - The Holy Hand Grenade of Branching

30  

When danger reared its ugly head…

Page 31: [Perforce] Tasks - The Holy Hand Grenade of Branching

31  

Scene 3

Page 32: [Perforce] Tasks - The Holy Hand Grenade of Branching

32  

I move for no man

Page 33: [Perforce] Tasks - The Holy Hand Grenade of Branching

33  

Obliterate

Page 34: [Perforce] Tasks - The Holy Hand Grenade of Branching

34  

Obliterate Dismembering Technique

ArchiveFiles Revs

Code

Page 35: [Perforce] Tasks - The Holy Hand Grenade of Branching

35  

Branches add metadata

ArchiveFiles

Integs To and From

Dev Branch

Code

Revs

Page 36: [Perforce] Tasks - The Holy Hand Grenade of Branching

36  

Submitted file adds archive and metadata

ArchiveFiles

Integs To and From

Dev Branch

Code

Revs

Page 37: [Perforce] Tasks - The Holy Hand Grenade of Branching

37  

Identify interesting files & metadata

ArchiveFiles

Integs To and From

Dev Branch

Code

Revs

Page 38: [Perforce] Tasks - The Holy Hand Grenade of Branching

38  

Obliterate the useless data

Integs To and From

Dev Branch

Code

ArchiveFiles Revs

Page 39: [Perforce] Tasks - The Holy Hand Grenade of Branching

39  

It’s not just a flesh wound

Page 40: [Perforce] Tasks - The Holy Hand Grenade of Branching

40  

Scene 4

Page 41: [Perforce] Tasks - The Holy Hand Grenade of Branching

41  

What is your quest?

Page 42: [Perforce] Tasks - The Holy Hand Grenade of Branching

42  

Escape the Gorge of Eternal Peril

Naming Schemes Branch Mappings Client Mappings Client Templates Client Updates

Change Propagation Renames

Moves Splits

Ancestry

Page 43: [Perforce] Tasks - The Holy Hand Grenade of Branching

43  

Streams puts code into a container

P4V  

Revs Archive

Files Swarm  Server  

Code Base

Page 44: [Perforce] Tasks - The Holy Hand Grenade of Branching

44  

Stream import carries no rev or integ cost

P4V  

Revs Archive

Files Swarm  Server  

Code Base

Swarm  Server  

Page 45: [Perforce] Tasks - The Holy Hand Grenade of Branching

45  

Workspaces generated from stream rules

P4V  

Revs Archive

Files Swarm  Server  

Swarm  Server  

P4V  

Swarm  Server  

Workspace

Page 46: [Perforce] Tasks - The Holy Hand Grenade of Branching

46  

Streams controls metadata growth

File Archive Revs

Integ To and From

P4V  

Swarm  Server  

P4V  

Swarm  Server  

 Swarm  Server  

Child Stream

Parent Stream

Page 47: [Perforce] Tasks - The Holy Hand Grenade of Branching

47  

Cross the Bridge of Death with Streams

Page 48: [Perforce] Tasks - The Holy Hand Grenade of Branching

48  

Scene 5

Page 49: [Perforce] Tasks - The Holy Hand Grenade of Branching

49  

Bring out yer dead

Page 50: [Perforce] Tasks - The Holy Hand Grenade of Branching

50  

He says he’s not dead

Page 51: [Perforce] Tasks - The Holy Hand Grenade of Branching

51  

Archive

Revs Code Base

#1   #1  

ArchiveFiles

#2  #2  

Page 52: [Perforce] Tasks - The Holy Hand Grenade of Branching

52  

Archive

ArchiveFiles Revs

#2  

#1  #1  

Code Base

#2  

Archive Depot

Page 53: [Perforce] Tasks - The Holy Hand Grenade of Branching

53  

Not integrated or copied files!

Page 54: [Perforce] Tasks - The Holy Hand Grenade of Branching

54  

Final Scene

Page 55: [Perforce] Tasks - The Holy Hand Grenade of Branching

55  

Bring out the Holy Hand Grenade

Page 56: [Perforce] Tasks - The Holy Hand Grenade of Branching

56  

Page 57: [Perforce] Tasks - The Holy Hand Grenade of Branching

57  

Before task streams

Dev Stream

Parent Stream

ArchiveFiles Revs

Integs To and From

Page 58: [Perforce] Tasks - The Holy Hand Grenade of Branching

58  

Now task metadata is put into shadow tables

Archive Files Revs

Integs To and From

Task Stream

Parent Stream

Page 59: [Perforce] Tasks - The Holy Hand Grenade of Branching

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  

Page 60: [Perforce] Tasks - The Holy Hand Grenade of Branching

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  

Page 61: [Perforce] Tasks - The Holy Hand Grenade of Branching

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  

Page 62: [Perforce] Tasks - The Holy Hand Grenade of Branching

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  

Page 63: [Perforce] Tasks - The Holy Hand Grenade of Branching

63  

Contact information

Page 64: [Perforce] Tasks - The Holy Hand Grenade of Branching

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  

Page 65: [Perforce] Tasks - The Holy Hand Grenade of Branching

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  

Page 66: [Perforce] Tasks - The Holy Hand Grenade of Branching

66  

P4IdeaX   Forums  

Questions? See us in the Demo Lounge Connect with us Steph Turner: [email protected] Gabe Weiss: [email protected]