perforce unplugged: central and distributed versioning and distributed versioning

41
Perforce Unplugged: Distributed and Central Versioning Alan H. Teague Technical Director

Upload: perforce

Post on 17-Jul-2015

584 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

Perforce Unplugged: Distributed and Central Versioning

Alan H. TeagueTechnical Director

Page 2: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

PERFORCE UNPLUGGED

Imag

e: Id

ea g

o / F

reeD

igita

lPho

tos.n

et

Page 3: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

SURVEY SAYS...

Page 4: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

WINNING FEATURES FOR DVCSs

Imag

e: Id

ea g

o / F

reeD

igita

lPho

tos.n

et

“The envelope please...”

Page 5: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

CONNECTION INDEPENDENT VERSIONING

Imag

e: Id

ea g

o / F

reeD

igita

lPho

tos.n

et

Page 6: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

PRIVATE LOCAL BRANCHING

Page 7: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

TASK BRANCHING

Page 8: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

INTRODUCING...

P4Sandbox*

Page 9: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

SOLUTION ONE: Connection Independent Versioning

Page 10: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

SOLUTION TWO: Private Local Branching

I decide...

Page 11: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

SOLUTION THREE: Task Branching

% p4 switch story_one Current branch is story_one

% p4 switch story_two Current branch is story_two

hero.png

Page 12: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

HOW IT REALLY WORKS...

Page 13: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

Zig ZichtermanTechnical Lead

P4SandboxHow it Works

Page 14: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

What is P4Sandbox?

Broker P4D

Page 15: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

What is P4Sandbox?

Sandbox Server

Page 16: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

Local Stream

What is P4Sandbox?

Sandbox Server

Page 17: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

Local Stream

Central Stream

What is P4Sandbox?

Central Server

Sandbox Server

Page 18: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

Local Stream

Central Stream

Mirror Stream

What is P4Sandbox?

Central Server

Sandbox Server

Page 19: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

Remote Depot?

Page 20: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

Remote Depot.

2010.2

Page 21: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

Remote Depot.

2010.22011.1

Page 22: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

Remote Depot

Performance

Authenticated Remote User

Service User

2010.2

2011.1

Page 23: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

Pull = Merge Down

Local Stream

Central Stream

Mirror Stream

How Does It Work?

p4 integrate: merge

Page 24: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

Pull = Merge Down

Local Stream

Central Stream

Mirror Stream

How Does It Work?

p4 integrate (not yet)

p4 integrate: copy

Page 25: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

Pull = Merge Down

Local Stream

Central Stream

Mirror Stream

How Does It Work?

p4 integrate (now)

Page 26: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

Push = Copy Up

Local Stream

Central Stream

Mirror Stream

How Does It Work?

p4 integrate: copyp4 submit

Page 27: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

Push = Copy Up

Local Stream

Central Stream

Mirror Stream

How Does It Work?

p4 submit (not yet)

p4 addp4 editp4 delete

p4 submit

branchintegratedelete

Page 28: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

Push = Copy Up

Local Stream

Central Stream

Mirror Stream

How Does It Work?

p4 submit (okay, now)

Page 29: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

Automatic Copy

Local Stream

Central Stream

Mirror Stream

How Does It Work?

p4 integrate: copy

Page 30: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

Lightweight Branches

Page 31: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

main

a

workspace

a

d d

=+c

b b

c

branch

Lightweight Branches

b! !

Page 32: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

Just-in-Time Branching

Page 33: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

Fast Branching

Page 34: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

Easy Branching

1. p4 branch2. //depot/main/... //depot/branch/...

3. p4 client4. //depot/branch/... //client/branch/...

5. p4 integrate //depot/main/... //depot/branch/...6. p4 submit

p4 edit

Page 35: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

Task/Feature Branches

Page 36: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

Fast Context Switch

Page 37: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

main

a

workspace

a

d d

=+c

b b

c

branch 1

Fast Context Switch

b

a

b

c

! !

d

Page 38: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

main

a

workspace

a

d d

=+c

b b

c

branch 2

Fast Context Switch

c! !

Page 39: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

main

a

workspace

a

d d

Fast Context Switch

Same depot files.

Do nothing.

Page 40: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

Fast Context Switch

2011.1p4 client -s -S <stream>

p4 sync 10x

Faster *

* for unbranched files in lightweight branches

Page 41: Perforce Unplugged: Central and Distributed Versioning and distributed versioning

Connection Independent Versioning

Local Private Branching

Task Branching