egit in eclipse · eclipse democamp london 2010 - dvcs and egit - alex blewitt dvcs vs cvcs •...

28
EGit in Eclipse Distributed Verzion Control Systems 1 Monday, 21 June 2010

Upload: others

Post on 09-Aug-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

EGit in EclipseDistributed Verzion Control Systems

1Monday, 21 June 2010

Page 2: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

EGit in EclipseDistributed Verzion Control SystemsDistributed Verizon Control Systems

1.11.2

2Monday, 21 June 2010

Page 3: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

EGit in EclipseDistributed Verzion Control SystemsDistributed Verizon Control SystemsDistributed Venison Control Systems

1.11.21.3

3Monday, 21 June 2010

Page 4: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

EGit in EclipseDistributed Verzion Control SystemsDistributed Verizon Control SystemsDistributed Venison Control SystemsDistributed Version Control Systems

1.11.21.31.4

4Monday, 21 June 2010

Page 5: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

History of VCS

rcs

cvs

svn

Single file branching, locked

Centralised server, shared

Repository revisioning

1.1 ➔ 1.2

1.1 ➔ 1.2

r1 ➔ r2

5Monday, 21 June 2010

Page 6: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

Centralised Version Control Systems

6Monday, 21 June 2010

Page 7: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

Distributed Version Control Systems

clone clone

cloneclone

7Monday, 21 June 2010

Page 8: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

DVCS vs CVCS

• Each user has the entire history checked out

? Doesn’t that take a lot of space?

• A Git repository uses about 2.5x CVS space

• A Git repository uses about 1.2x SVN space

• Tend to have one or a few projects per repository

‣ Many repositories is easier to manage than one

8Monday, 21 June 2010

Page 9: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

How does it work?

+Verzion +Control

-Verzion+Verizon Control

-Verizon+Venison Control

-Venison+Version Control

1.1 1.2 1.3 1.4

9Monday, 21 June 2010

Page 10: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

-Verzion+Version Control

-Verzion+Verizon Control

How does it work?+Verzion +Control

-Verizon+Venison Control

-Venison+Version Control

?10Monday, 21 June 2010

Page 11: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

How does it work?1eb242 793f12

(1eb242)

ac390b(1eb242)

0249bc(ac390b)

?93r2d2(793f12,0249bc)

Merge nodes havetwo (or more) parents

SHA Hash identifies node

Each node has a parent(except the first)

11Monday, 21 June 2010

Page 12: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

Pull and Push1eb242 793f12

(1eb242)

ac390b(1eb242)

0249bc(ac390b)

ac390b(1eb242)

0249bc(ac390b)

1eb242 793f12(1eb242)

Both repositories generatethe same merge node

Pull copies nodes fromanother repository

Push copies nodes toanother repository

93r2d2(793f12,0249bc)

93r2d2(793f12,0249bc)

12Monday, 21 June 2010

Page 13: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

Branching is easy

• CVCS discourages branching

• Mostly because the merge is impossible

• DVCS merging becomes trivial

• Simply replays the patch sets after each other

• Branching becomes a way of life for DVCS

• Think of it as auto-save for work in progress

13Monday, 21 June 2010

Page 14: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

Merging is easy

• CVCS discourages branching

• Mostly because the merge is impossible

• DVCS merging becomes trivial

• Simply replays the patch sets after each other

• Branching becomes a way of life for DVCS

• Think of it as auto-save for work in progress

14Monday, 21 June 2010

Page 15: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

EGit

15Monday, 21 June 2010

Page 16: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

EGit

• Builds upon JGit (Java library for manipulating Git)

• Both transferred to Eclipse.org under EGit

• JGit has special dispensation to be EDL

• EGit is regular EPL

• Both can be shipped as part of Eclipse

• EGit 0.8 released with Helios

16Monday, 21 June 2010

Page 17: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

EGit 0.8 Status

• EGit 0.8 was released in time for Helios

• Full compatibility with git command line tools

• Commit (and commit amends)

• Pull from and push to remote repositories

• Comparison of individual files against history

17Monday, 21 June 2010

Page 18: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

EGit 0.8 Status

• EGit 0.8 is not feature complete

• .gitignore support missing (for non-derived files)

• Non-fast-forward merges not implemented

• Rebasing not implemented

• EGit 0.8 is ready for Git users who know the CLI

• Team GUI-only users should wait for 0.9

18Monday, 21 June 2010

Page 19: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

Fast-forward merges

1eb242 ac390b(1eb242)

0249bc(ac390b)

HEAD

used by git pullwhen updatingto latest version

19Monday, 21 June 2010

Page 20: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

Non- fast-forward

1eb242 ac390b(1eb242)

0249bc(ac390b)

HEAD

used by git pullwhen merging two

or more nodes

793f12(1eb242)

93r2d2(793f12,ac390b)

20Monday, 21 June 2010

Page 21: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

Rebase

1eb242 ac390b(1eb242)

0249bc(ac390b)

HEAD

used by git pullwhen merging two

or more nodes

793f12(1eb242)

1492ad(0249bc)

21Monday, 21 June 2010

Page 22: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

Rebase - squash

1eb242 ac390b(1eb242)

0249bc(ac390b)

HEAD

used to concatenate multiple small

commits into one larger commit

2012ad(0249bc)

a54001(1eb242)

22Monday, 21 June 2010

Page 23: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

EGit future

• EGit 0.9 due to be released in September 2010

• Separate update site, like Mylyn

• Can use 0.9+ with Helios later this year

• May have EGit 0.10+ as well

• EGit 1.0 planned for release as part of Indigo

• Will be fully featured replacement for SVN/CVS

23Monday, 21 June 2010

Page 24: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

Git at Eclipse

• http://dev.eclipse.org/git/index.html tracks CVS

• Read-only copies kept up-to-date

• Can checkout with git:// or http://

• http://git.eclipse.org/ hosts live Eclipse Git repos

• Virgo, Mylyn Review, ScalaModules, SWTBot

• EGit/JGit developed at http://egit.eclipse.org

24Monday, 21 June 2010

Page 25: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

Other git tools

• Gerrit

• Gerrit is an on-line review/commit tool for Git

• Used by Android and EGit/JGit

• GitHub

• Public git repository hosting provider

• Provides SVN and CVS access for Git repos

25Monday, 21 June 2010

Page 26: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

EGit Demo

26Monday, 21 June 2010

Page 27: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt27Monday, 21 June 2010

Page 28: EGit in Eclipse · Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt DVCS vs CVCS • Each user has the entire history checked out Doesn’t that take a lot of space? •

Eclipse DemoCamp London 2010 - DVCS and EGit - Alex Blewitt

Summary

• DVCS are the future

• Git is generally considered the fastest DVCS

• EGit will ship with Helios

• Some Eclipse projects already use Git

• EGit, Virgo, MarketPlaceClient, ScalaModules

• Others are looking to convert in Indigo timeline

28Monday, 21 June 2010