Difference between revisions of "git migration"
From Free Pascal wiki
Jump to navigationJump to searchGgeldenhuys (talk | contribs) |
|||
Line 69: | Line 69: | ||
== Migrate SVN repo. == | == Migrate SVN repo. == | ||
− | * 2017-12-16: A first test conversion by Florian using subgit was attempted: completed in 5 hours 1 | + | * 2017-12-16: A first test conversion by Florian using subgit was attempted: completed in 5 hours, 1 crash. Looks OK |
+ | |||
+ | === Branch mapping for subgit === | ||
+ | |||
+ | Proposal for branch mapping | ||
+ | |||
+ | <pre> | ||
+ | excludeBranches = branches/aspect | ||
+ | excludeBranches = branches/avr32 | ||
+ | excludeBranches = branches/blaise | ||
+ | excludeBranches = branches/cpstr | ||
+ | excludeBranches = branches/cpstrnew | ||
+ | excludeBranches = branches/ctypes | ||
+ | excludeBranches = branches/dodi | ||
+ | excludeBranches = branches/florian | ||
+ | excludeBranches = branches/foxsen | ||
+ | excludeBranches = branches/fcl-web_joost | ||
+ | excludeBranches = branches/generics | ||
+ | excludeBranches = branches/genfunc | ||
+ | excludeBranches = branches/janbruns | ||
+ | excludeBranches = branches/linker | ||
+ | excludeBranches = branches/newthreading | ||
+ | excludeBranches = branches/peterjan | ||
+ | excludeBranches = branches/ssa | ||
+ | excludeBranches = branches/tg74/rtl | ||
+ | excludeBranches = branches/tg74/tests | ||
+ | excludeBranches = branches/tg74/utils | ||
+ | excludeBranches = branches/unitrw | ||
+ | excludeBranches = branches/wkrenn | ||
+ | excludeBranches = branches/FIXES_2_2 | ||
+ | |||
+ | branches = branches/merged/*:refs/heads/merged/* | ||
+ | branches = branches/joost/*:refs/heads/joost/* | ||
+ | branches = branches/laksen/*:refs/heads/laksen/* | ||
+ | branches = branches/maciej/*:refs/heads/maciej/* | ||
+ | branches = branches/olivier/*:refs/heads/olivier/* | ||
+ | branches = branches/paul/*:refs/heads/paul/* | ||
+ | branches = branches/*:refs/heads/svn/* | ||
+ | branches = branches/svenbarth/*:refs/heads/svenbarth/* | ||
+ | branches = branches/tg74/*:refs/heads/tg74/* | ||
+ | </pre> | ||
== Set up user management and permissions. == | == Set up user management and permissions. == | ||
== Set up and automate github mirror == | == Set up and automate github mirror == |
Revision as of 16:53, 17 December 2017
This page is about migrating FPC from SVN to git
Concerns/Questions
What part of SVN to migrate ?
- More is better.
Jonas has a very complete git mirror of the SVN+CVS part.
(care needs to be taken: there used to be a time when copyrighted code was checked in)
A first test conversion by Florian using subgit was attempted: completed in 5 hours 1, creash. Looks OK. - In order to save on diskspace, find ways to tell user how to clone only a part.
Use git clone --depth 1
to get only the latest revision (with fetch, later on more revisions can be fetched if needed)
Build repository
The fpc build repository uses svn:external references.
Git has modules, which is in essence the same. This needs to be properly set up.
Branching model ?
Various workflow models exist:
A successful Git branching model
Also known as "git-flow" model.
- Advantages
- A simple and logical workflow that plays to the strengths of Git - branching and merging.
- 'master', 'develop' and 'release' are good branch names which immediately makes it obvious what they are for. Many developers clone a repo and want or expect a stable version. This workflow allows just that - the 'master' branch is the default branch, and is always the latest stable release of the product.
- Disadvantages
- // to be written
The cactus model
Also known as the anti-"A successful Git branching Model".
- Advantages
- // to be written
- Disadvantages
- Git was designed to work well with branches and handle merging as a common task. This workflow suggests merging as a bad idea, which is crazy.
- This model recommends that a human must now keep track of which commits to cherry-pick into other branches. This is bounds to fail in the long run and vital commits will be missed at some point. Merging two or more branches on the contrary will automatically handle all commits in a branch seamlessly, so why not use what Git was designed to do well.
- This model suggests that you can also cherry-pick from an unstable branch back into a stable release branch. This is just the wrong way round.
- This model sees some of its own flaws and suggests a 3rd party tool to help keep track of things like cherry-picking. This simply isn't needed if you use a better workflow.
- It suggests that 'rebase' get used often. This has always been frowned upon in the Git committed, and it is widely known to use rebase sparingly as it rewrites history and doesn't result in a logical evolution of the code history.
See the Git project itself
- Advantages
- // to be written
- Disadvantages
- // to be written
User management ?
Git has no concept of users. To manage permissions on a server, a separate program is needed.
gitorious
- Advantages
- uses git repo for administration
- No server binary
- Disadvantages
- No web interface
- administration needs ssh key, only ssh possible.
- Web integration ?
gitea
- Advantages
- Web based
- Fine tuning possible
- Disadvantages
- Separate config
- Requires running binary all the time, on a separate port.
What about Lazarus ?
Tool for migration
subgit
Advantages
- very flexible
- very fast (remote cloning of the whole FPC repository takes ?)
Disadvantages
- external java-based tool, so some dependencies
git-svn
Advantages
- included in git it self
Disadvantages
- less flexible
Work to do
Migrate SVN repo.
- 2017-12-16: A first test conversion by Florian using subgit was attempted: completed in 5 hours, 1 crash. Looks OK
Branch mapping for subgit
Proposal for branch mapping
excludeBranches = branches/aspect excludeBranches = branches/avr32 excludeBranches = branches/blaise excludeBranches = branches/cpstr excludeBranches = branches/cpstrnew excludeBranches = branches/ctypes excludeBranches = branches/dodi excludeBranches = branches/florian excludeBranches = branches/foxsen excludeBranches = branches/fcl-web_joost excludeBranches = branches/generics excludeBranches = branches/genfunc excludeBranches = branches/janbruns excludeBranches = branches/linker excludeBranches = branches/newthreading excludeBranches = branches/peterjan excludeBranches = branches/ssa excludeBranches = branches/tg74/rtl excludeBranches = branches/tg74/tests excludeBranches = branches/tg74/utils excludeBranches = branches/unitrw excludeBranches = branches/wkrenn excludeBranches = branches/FIXES_2_2 branches = branches/merged/*:refs/heads/merged/* branches = branches/joost/*:refs/heads/joost/* branches = branches/laksen/*:refs/heads/laksen/* branches = branches/maciej/*:refs/heads/maciej/* branches = branches/olivier/*:refs/heads/olivier/* branches = branches/paul/*:refs/heads/paul/* branches = branches/*:refs/heads/svn/* branches = branches/svenbarth/*:refs/heads/svenbarth/* branches = branches/tg74/*:refs/heads/tg74/*