Contemporary source control for pharo

40
Contemporary source control for Pharo This is the talk about Git. ESUG, 2014-08-10 Max Leske

description

Title: Contemporary source control for Pharo Speaker: Max Leske Wed, August 20, 2:30pm – 3:00pm Video Part1: https://www.youtube.com/watch?v=fa9Zpxyt_no Video Part2: https://www.youtube.com/watch?v=vpag70LmGrY Description Abstract: SVN [1], Mercurial [2] and Git [3] probably are the predominant source control systems used for open source software. Each of these systems brings many tools to the table to visualize meta data, search for versions and content and, most importantly, manage versions and changes to versionable entities. Unfortunately for us, Pharo does not natively support any of these systems which makes access for newcomers harder and inhibits our sharing abilities. In this talk I want to: - show what support for different source control systems can do for us - present the work that is being done on integrating Git into Pharo - discuss how this work will enable the integration of arbitrary source control systems into Pharo - touch upon the future of Monticello and Metacello in Pharo [1] http://subversion.apache.org [2] http://mercurial.selenic.com [3] http://git-scm.com Bio: Max Leske is a master student of University of Bern and working with netstyle.ch

Transcript of Contemporary source control for pharo

Page 1: Contemporary source control for pharo

Contemporary source control for Pharo

This is the talk about Git.

ESUG, 2014-08-10 Max Leske

Page 2: Contemporary source control for pharo

Overviewbackground

current state

the future

(Git)

(Git)

(Git)

Page 3: Contemporary source control for pharo

A bit of history

Page 4: Contemporary source control for pharo

Revision control systems

RCS (1982)

CVS (1990)

SVN (2000)

BitKeeper (1999)

Git (2005)Mercurial (2005)

Monotone (2003)

SCCS (1972) Random selection

distributed

centralized

Page 5: Contemporary source control for pharo

Source control in Squeak and Pharo

RCS

CVS

DVS

Monticello

Monticello 2

Greatly exaggerated

Page 6: Contemporary source control for pharo

A bit about Git

“The stupid content tracker from hell”

Page 7: Contemporary source control for pharo

Git objectsreference

commit

treetree

blobblob blob

tree

Page 8: Contemporary source control for pharo

Git repositories

local remote other locals

Synchronization point (usually)

repository repository

repository

repository

Page 9: Contemporary source control for pharo

Git protocolsfile protocol file:///path/to/repo.git

/path/to/repo.gi

git://server.com/path/to/repo.gitGit protocol

ssh://user@server/path/to/repo.gitSSH [email protected]:path/to/repo.git

http://server.com/path/to/repo.gitHTTP(S) protocolhttps://server.com/path/to/repo.git

Page 10: Contemporary source control for pharo

A bit about the now

Page 11: Contemporary source control for pharo

How Monticello works (in my mind)

.mcz

Cypress + Git

Monticello

black hole

Page 12: Contemporary source control for pharo

Monticello problems

• file instead of objects

• chunk file format

• version tracking / ancestry by filename

• hard to understand

Page 13: Contemporary source control for pharo

Cypress (FileTree)

source

meta data

package version categorization

commit blobtree

Page 14: Contemporary source control for pharo

Cypress problems• moves / renames not tracked

• very deep directory structures

• files instead of objects

• checked out version = only visible version

• hard to merge

Page 15: Contemporary source control for pharo

Metacellospecification

platform package versions+

fixed loadable unit

Page 16: Contemporary source control for pharo

Metacello problems

• complex implementation

• hard to maintain for big projects

• very steep learning curve

Page 17: Contemporary source control for pharo

A bit on the future

Page 18: Contemporary source control for pharo

How Monticello might work

Monticello

arbitrary backend

Page 19: Contemporary source control for pharo

Support for arbitrary backends

Matthias Kleine, Robert Hirschfeld, Gilad Bracha

https://www.hpi.uni-potsdam.de/hirschfeld/publications/media/KleineHirschfeldBracha_2012_AnAbstractionForVersionControlSystems_HPI54.pdf

An abstraction for version control systems:

Page 20: Contemporary source control for pharo

Monticello

Metacello

Pharo 2 architecture

Monticello meta model

Page 21: Contemporary source control for pharo

Current architecture

Monticello

Metacello

Monticello meta model

Page 22: Contemporary source control for pharo

Possible future architecture

Git

Git bindings

Git adaptor

Monticello

Metacello

Ring

Page 23: Contemporary source control for pharo

Mercurial

Mercurial bindings

Mercurial adaptor

Git

Git bindings

Git adaptor

Possible future architecture

Monticello

Metacello

Ring

?

? bindings

? adaptor

Page 24: Contemporary source control for pharo

Model over matter (mostly)Versioning model

commit tree blob reference

changelog manifest filelog

tag

onesinglefile™

? adaptorMercurial adaptorGit adaptor

Page 25: Contemporary source control for pharo

Why libgit2?• well documented

• easy to understand

• fast response from community

• Git not required on host

• not maintained by us

• compiled to target platform

• no shell

Page 26: Contemporary source control for pharo

Showing-off a bit(Demo)

Page 27: Contemporary source control for pharo

Some more bits(random thoughts)

Page 28: Contemporary source control for pharo

P2P backend

super node

peer

Page 29: Contemporary source control for pharo

P2P backend: the good

• resilient

• independent

• don’t care about locality

Page 30: Contemporary source control for pharo

P2P backend: the bad

• not visible to outsiders

• not searchable from outside

• maintained by the community (super nodes)

Page 31: Contemporary source control for pharo

Revision meta data in Git

commit

tree

#printOn: - v0

Page 32: Contemporary source control for pharo

Revision meta data in Git

commit

tree

#printOn: - v0

tree

#printOn: - v3

#printOn: - v2

#printOn: - v1

reference

Page 33: Contemporary source control for pharo

Revision meta data in Git: the bad

• not manageable through Git

• need extra tools

• information only available to select few

• overhead (who will look at it)

Page 34: Contemporary source control for pharo

Revision meta data in Git: the good

• collect data for research

• fine grained history

• don’t have to look at it if you don’t want to

Page 35: Contemporary source control for pharo

A bit of a wrap up

Page 36: Contemporary source control for pharo

A bit of a wrap up

• come a long way

• still a long way to go

Page 37: Contemporary source control for pharo

A bit of a wrap up

• choice of storage backend

• better modularity (changing components)

• use existing solutions

• take load off community

Page 38: Contemporary source control for pharo

A bit of a wrap up

• Git + abstractions: first step

• access to Git important (not just for revision control)

Page 39: Contemporary source control for pharo

Acknowledgements• Esteban Lorenzano

• Martin Dias

• Stéphane Ducasse

• Dale Henrichs

• Camillo Bruni

Page 40: Contemporary source control for pharo

No more bits.Thanks for your

attention