Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into...

31
Migrating to Git: Let's Git this party started @K im_ Moir @paulweb515 IBM Ottawa

Transcript of Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into...

Page 1: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate

Migrating to Git:Let's Git this party started

@Kim_ Moir@paulweb515

IBM Ottawa

Page 2: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate

Git Happens

@Kim_ Moir@paulweb515

IBM Ottawa

Page 3: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate
Page 4: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate

About Us

• 10 year old code repository

• Around 40 active committers

• Produce approximately 600 bundles a build

• Limited Git experience before migration

Page 5: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate

Active development streams: 4.2, 4.1.x, 3.8, 3.7.x

Page 6: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate
Page 7: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate

Unix group (guid) -> Git repo

2 CVS repos -> ~25 Git repos

Page 8: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate
Page 9: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate
Page 10: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate
Page 11: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate

CVS :

• Condition

• Copy to temporary location

• Run cvs2git

Page 12: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate

Git:

• git fast-import CVS content into temporary Git repository

• Git-move-refs

• git prune, repack, gc and repack

• Validate the git repo

• Run a script to remove delete only tags

Page 13: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate

• Add gitignore file via git filter-branch

• Clone into bare repo

• git prune, repack, gc and repack

• copy repo into final location

Page 14: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate

“It’s one thing to migrate to Git, it’s another thing to use it”

-Olivier Thomann

Page 15: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate

“Git: The command line is where it’s at”

-Bogdan Gheorge

Page 16: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate
Page 17: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate

“Patches are like dumping a database into a text file. You need to think in terms of releasing fixes to branches instead of passing around patches. Patches also lose some Git provenance information such as author and parent.”

-J ohn Arthorne

Page 18: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate

“That operation is four pay-grade levels above my current git-foo.”

-Paul Webster

Page 19: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate

“I have broken the platform-ui git repository.”

-Bug 361707

“Better policy to guard against deleting all branches and tags from our public repos”

-Bug 362076

Page 20: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate
Page 21: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate
Page 22: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate
Page 23: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate
Page 24: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate

“There are three categories of costs that we incurred during the Git migration:

The migration process itself, the developer learning curve and dealing with EGit issues”

-Mike Wilson

Page 25: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate

•Read•Test migration•Communicate

Page 26: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate

“The complexity of our code is the barrier to contribution, not the S CM”.

-Paul Webster

Page 27: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate

Useful links• Git parable http://tom.preston-werner.com/2009/05/19/the-git-parable.html

• Pro Git Book http://progit.org/

• Think like a git http://think-like-a-git.net/

• Managing large binary files with Git http://stackoverflow.com/questions/540535/managing-large-binary-files-with-git

• Git workflows for CVS users http://wiki.eclipse.org/Platform-releng/Git_ Workflows

[email protected] mailing list

• E Git Documentation http://eclipse.org/egit/documentation/

• Migration scripts we used git://git.eclipse.org/e4/org.eclipse.migration.git

• Git flow discussion http://dev.eclipse.org/mhonarc/lists/eclipse-dev/msg09229.html

Page 28: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate

Questions?

“Git happens”

-Kim Moir

-Paul Webster

Page 29: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate

Give F eedbac k on the S es s ions

1 S ign In: w w w .ec lips ec on.org

2 S elec t S es s ion E va luate

3 Vote

Page 30: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate

Image credits• Beach http://www.flickr.com/photos/archer10/2218592521/sizes/

• Reading room in British Museum http://www.flickr.com/photos/cliveabrown/2258478542/

• Blackbirds at dusk http://www.flickr.com/photos/moonjazz/1216783552/

• Binary bridge at Georgia Tech http://www.flickr.com/photos/mcclanahoochie/5068845349/sizes/l/in/photostream/

• Branches http://www.flickr.com/photos/e_ phots/3012896283/

• Git stash http://www.flickr.com/photos/dealingwith/4295488113/

• Fork you http://www.flickr.com/photos/sunfox/4365495446/sizes/l/in/photostream/

• Rethink http://www.flickr.com/photos/venegas/5549123/

• Gears http://www.flickr.com/photos/wwarby/4782904694

• Git gas station http://www.flickr.com/photos/soo/6047596987/

• Advice http://www.flickr.com/photos/wurzle/659315/

• Fraser river delta http://www.flickr.com/photos/ecstaticist/3055718118/

Page 31: Migrating to Git: Let's Git this party started · Git: •git fast-import CVS content into temporary Git repository •Git-move-refs •git prune, repack, gc and repack •Validate

Legal notice

• Copyright © IBM Corp., 2007-2012. All rights reserved.  This presentation and the source code in it are made available under the Creative Commons Att. Nc Nd 3.0 license.

• J ava and all J ava-based trademarks are trademarks of Sun Microsystems, Inc. in the United S tates, other countries, or both.

• E clipse and the E clipse logo are trademarks of E clipse Foundation, Inc.

• IBM and the IBM logo are trademarks or registered trademarks of IBM Corporation, in the United S tates, other countries or both.

• Other company, product, or service names may be trademarks or service marks of others.

• THE INF ORMATION DIS C US S E D IN THIS PRE S E NTATION IS PROVIDE D F OR INF ORMATIONAL PURPOS E S ONLY.  WHILE EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION, IT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, AND IBM SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF THE USE OF, OR OTHERWISE RELATED TO, SUCH INFORMATION.  ANY INFORMATION CONCERNING IBM'S PRODUCT PLANS OR STRATEGY IS SUBJECT TO CHANGE BY IBM WITHOUT NOTICE