Difference between revisions of "Git"
(→Comparison) |
(→Comparison) |
||
Line 57: | Line 57: | ||
|Size of checkout [OOo sources] | |Size of checkout [OOo sources] | ||
|1.6G | |1.6G | ||
− | |2.8G | + | |2.8G [files you can hack on + the history] |
− | | | + | | -"- |
|- | |- | ||
|Size of checkout [3rd party] | |Size of checkout [3rd party] | ||
|98M | |98M | ||
− | |688M | + | |688M [files you can hack on + the history] |
| -"- | | -"- | ||
|- | |- | ||
Line 98: | Line 98: | ||
| -"- | | -"- | ||
|10sec [new branch with few changes], <3min [long living branch, harder scenario] | |10sec [new branch with few changes], <3min [long living branch, harder scenario] | ||
+ | | -"- | ||
+ | |- | ||
+ | |Resync | ||
+ | | -"- | ||
+ | |Same as 'Merge' | ||
| -"- | | -"- | ||
|} | |} | ||
− | '3rd party' in this context means the following modules: <tt>agg, beanshell, berkeleydb, bitstream_vera_fonts, boost, curl, dictionaries, epm, expat, freetype, hsqldb, icu, jpeg, libwpd, libxml2, moz, msfontextract, nas, neon, np_sdk, portaudio, python, sablot, sane, sndfile, stlport, vigra, xalan, xt, zlib</tt>. | + | '3rd party' in this context means the following modules: <tt>agg</tt>, <tt>beanshell</tt>, <tt>berkeleydb</tt>, <tt>bitstream_vera_fonts</tt>, <tt>boost</tt>, <tt>curl</tt>, <tt>dictionaries</tt>, <tt>epm</tt>, <tt>expat</tt>, <tt>freetype</tt>, <tt>hsqldb</tt>, <tt>icu</tt>, <tt>jpeg</tt>, <tt>libwpd</tt>, <tt>libxml2</tt>, <tt>moz</tt>, <tt>msfontextract</tt>, <tt>nas</tt>, <tt>neon</tt>, <tt>np_sdk</tt>, <tt>portaudio</tt>, <tt>python</tt>, <tt>sablot</tt>, <tt>sane</tt>, <tt>sndfile</tt>, <tt>stlport</tt>, <tt>vigra</tt>, <tt>xalan</tt>, <tt>xt</tt>, <tt>zlib</tt>. |
Commands used for the tests: | Commands used for the tests: | ||
Line 112: | Line 117: | ||
|checkout [OOo sources] | |checkout [OOo sources] | ||
| | | | ||
− | |git clone git://go-oo.org/git/openoffice.org/ooo.git openoffice.org | + | |<tt>git clone git://go-oo.org/git/openoffice.org/ooo.git openoffice.org</tt> |
| | | | ||
|- | |- | ||
|Branch creation | |Branch creation | ||
| | | | ||
− | |[all the following commands were issued in the openoffice.org subdir]<br>git branch test | + | |[all the following commands were issued in the openoffice.org subdir]<br> |
+ | <tt>git branch test</tt> | ||
| | | | ||
|- | |- | ||
|Branch switch | |Branch switch | ||
| | | | ||
− | |git checkout test | + | |<tt>git checkout test</tt> |
| | | | ||
|- | |- | ||
|Diff | |Diff | ||
| | | | ||
− | |vim vcl/unx/kde/salnativewidgets-kde.cxx [to do some changes] ; git diff | + | |<tt>vim vcl/unx/kde/salnativewidgets-kde.cxx</tt> [to do some changes] <tt>; git diff</tt> |
| | | | ||
|- | |- | ||
|Commit | |Commit | ||
| | | | ||
− | |[with the changes from 'Diff'] git commit -a | + | |[with the changes from 'Diff']<br> |
+ | <tt>git commit -a</tt> | ||
| | | | ||
|- | |- | ||
|Merge [the simple scenario] | |Merge [the simple scenario] | ||
| | | | ||
− | |git branch test2 ; git checkout test2 ; vim vcl/unx/kde/salnativewidgets-kde.cxx [another changes] ; git commit -a ; git checkout test | + | |<tt>git branch test2 ; git checkout test2 ; vim vcl/unx/kde/salnativewidgets-kde.cxx</tt> [another changes] <tt>; git commit -a ; git checkout test</tt> [preparation to have something to merge]<br> |
+ | <tt>git pull . test2</tt> [the merge itself] | ||
| | | | ||
|- | |- | ||
|Merge [the harder scenario] | |Merge [the harder scenario] | ||
| | | | ||
− | |git pull . unxsplash [an old CWS of mine - called cws_src680_unxsplash] | + | |<tt>git pull git://go-oo.org/git/openoffice.org/ooo.git unxsplash</tt><br> |
+ | [an old CWS of mine - called cws_src680_unxsplash in the CVS] | ||
| | | | ||
|- | |- | ||
|Resync | |Resync | ||
| | | | ||
− | |[it's usually not necessary to do resynces with git thanks to its advanced merging strategies; but when | + | |[it's usually not necessary to do resynces with git thanks to its advanced merging strategies; but when needed, it's just a merge from remote 'master'] |
| | | | ||
|} | |} |
Revision as of 13:40, 16 March 2007
Git is a popular version control system designed to handle very large projects with speed and efficiency. See http://git.or.cz/ for more info.
The Windows users might be interested in the MinGW git port.
Git and OpenOffice.org
A functional git tree with the entire OOo history for testing purposes is here: http://go-oo.org/git. It is an imported CVS tree that was split into two parts:
- The sources themselves - ooo.git
- The 3rd party stuff (binary mozilla, zlib, berkeleydb, ...) - 3rdparty.git
The size of the sources is about 1.3G, the size of the 3rd party stuff is 591M. Please follow the instructions on http://go-oo.org/git to get the tree.
Transformations
These transformations are done while converting from CVS:
- The OOo repository is split into the sources and 3rd party sources as described above
- 'cws_src680_xyz' branches are renamed to simple 'xyz'
- 'CWS_SRC680_XYZ_ANCHOR' tags are renamed to simple 'XYZ'
- 'INTEGRATION: CWS xyz' commits are grouped into one commit (they are generated by CWS tooling per-file), and treated as a merge in the git tree
- Tabs are converted to 4 spaces at the beginning of the lines in .c/.cxx/.h/.hxx/.mk/.src
- 'RESYNC:.*FILE MERGED', and 'RESYNC:.*FILE REMOVED' are grouped inside branches (with single 'RESYNC' log entry)
- May result in multiple 'RESYNC' commits inside the branch when a commit happened to another one in the middle of the resync
Requirements/TODO
- Convert CollabNet account names into real names
- maybe use the data from DomainDeveloper (complete that where necessary) if there's no easy way to extract the names from CollabNet
- Delete merged branches (from 'heads', not from history!)
- Evaluate the speed & compare with SVN (the RE preferred option) - checkout/clone, branch, resync, integration
- Translations to a separate git tree as well?
- URE to a separate git tree?
- .pdf version of developer's guide consume quite some space as well - any chance to do something with it?
Comparison
Comparison of git with Mercurial and BitKeeper: http://www.selenic.com/pipermail/mercurial/2005-May/000334.html
Comparison of git with Subversion: http://git.or.cz/gitwiki/GitSvnComparsion
What | CVS | git | SVN |
---|---|---|---|
Size of data on the server [OOo sources] | 8.5G | 1.3G | Not measured yet |
Size of data on the server [3rd party] | 1.1G | 591M | -"- |
Size of checkout [OOo sources] | 1.6G | 2.8G [files you can hack on + the history] | -"- |
Size of checkout [3rd party] | 98M | 688M [files you can hack on + the history] | -"- |
Checkout time [OOo sources] | Not measured yet | 1-2 hours [from go-oo.org] | -"- |
Checkout time [3rd party] | -"- | Not measured yet | -"- |
Branch creation | -"- | Immediately | -"- |
Branch switch | -"- | <15sec [to newly created], 3min to an old one | -"- |
Diff | -"- | Immediately | -"- |
Commit | -"- | 13-25sec | -"- |
Merge | -"- | 10sec [new branch with few changes], <3min [long living branch, harder scenario] | -"- |
Resync | -"- | Same as 'Merge' | -"- |
'3rd party' in this context means the following modules: agg, beanshell, berkeleydb, bitstream_vera_fonts, boost, curl, dictionaries, epm, expat, freetype, hsqldb, icu, jpeg, libwpd, libxml2, moz, msfontextract, nas, neon, np_sdk, portaudio, python, sablot, sane, sndfile, stlport, vigra, xalan, xt, zlib.
Commands used for the tests:
What | CVS | git | SVN |
---|---|---|---|
checkout [OOo sources] | git clone git://go-oo.org/git/openoffice.org/ooo.git openoffice.org | ||
Branch creation | [all the following commands were issued in the openoffice.org subdir] git branch test |
||
Branch switch | git checkout test | ||
Diff | vim vcl/unx/kde/salnativewidgets-kde.cxx [to do some changes] ; git diff | ||
Commit | [with the changes from 'Diff'] git commit -a |
||
Merge [the simple scenario] | git branch test2 ; git checkout test2 ; vim vcl/unx/kde/salnativewidgets-kde.cxx [another changes] ; git commit -a ; git checkout test [preparation to have something to merge] git pull . test2 [the merge itself] |
||
Merge [the harder scenario] | git pull git://go-oo.org/git/openoffice.org/ooo.git unxsplash [an old CWS of mine - called cws_src680_unxsplash in the CVS] |
||
Resync | [it's usually not necessary to do resynces with git thanks to its advanced merging strategies; but when needed, it's just a merge from remote 'master'] |