rfc:dvcs
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:dvcs [2011/08/07 23:37] – general cleanup and a small amount of Bazaar information gwynne | rfc:dvcs [2011/09/05 09:39] – dsp | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Request for Comments: Choosing a distributed version control system for PHP ====== | ====== Request for Comments: Choosing a distributed version control system for PHP ====== | ||
- | * Version: | + | * Version: 1.0 |
* Date: 2011-07-30 | * Date: 2011-07-30 | ||
* Author: David Soria Parra <dsp at php dot net> | * Author: David Soria Parra <dsp at php dot net> | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
Line 250: | Line 250: | ||
contains all extensions and their full history. | contains all extensions and their full history. | ||
+ | == Git == | ||
+ | Git supports Subtree merges, this can be used to merge stuff into an ext directory. | ||
+ | To get an extension out of core and back into pecl, you will need to use git filter-branch to extract | ||
+ | the subdirectory and regularly remove the extension with a git rm from the repo. | ||
+ | |||
+ | == Mercurial == | ||
+ | To move an extension into core you will first need hg convert to create a repository that | ||
+ | contains the pecl extension in a ext/ folder. Than you can merge it. If you want to move | ||
+ | an extension from core to pecl, you will need to use hg convert to extract the history | ||
+ | of the repository from php-src and then regularly remove the ext/< | ||
+ | with hg remove. | ||
===== Tools and Platform Support ===== | ===== Tools and Platform Support ===== | ||
Line 262: | Line 273: | ||
Windows. This situation is slowly improving. | Windows. This situation is slowly improving. | ||
- | ==== CLRF -> LF ==== | + | ==== CRLF -> LF ==== |
Git supports CRLF to LF conversion. This can be configured using the variables | Git supports CRLF to LF conversion. This can be configured using the variables | ||
core.autocrlf, | core.autocrlf, | ||
Line 299: | Line 310: | ||
Mercurial can use HTTP basic auth. We can use HTTP Digest for authentication and | Mercurial can use HTTP basic auth. We can use HTTP Digest for authentication and | ||
a hook to check if the user has the necessary access rights. | a hook to check if the user has the necessary access rights. | ||
+ | An implementation of the PHP karma system as a Mercurial plugin exists. It can be found here: | ||
+ | https:// | ||
+ | ==== General Server Layout ==== | ||
+ | |||
+ | user <-- KARMA CHECK --> hg/ | ||
+ | | ||
===== Unqiue features ===== | ===== Unqiue features ===== | ||
==== Git ==== | ==== Git ==== | ||
Line 429: | Line 445: | ||
not allow checkouts of subdirectories, | not allow checkouts of subdirectories, | ||
modules, a move which is already desired. To guarantee minimal downtimes and a | modules, a move which is already desired. To guarantee minimal downtimes and a | ||
- | smooth transition, we will move one module at at ime. The first module will | + | smooth transition, we will move one module at a time. The first module will |
be php-src and the karma system. Other modules like systems will follow. | be php-src and the karma system. Other modules like systems will follow. | ||
+ | |||
+ | As DVCS does not support cloning of subtrees of a repository, we will split the | ||
+ | repository similar to the old CVS structure. References to other repositories can | ||
+ | be maintained using the submodules/ | ||
+ | subtree merges will be done to maintain better history and easier cloning. | ||
+ | |||
+ | For every module like phpdoc, php-src, web and so on an own implementation RFC will be written. | ||
+ | |||
+ | In general, modules will be accessible via HTTP on git/ | ||
+ | http:// | ||
+ | A web interface to browse the code will be available. Note that a combined checkout of PECL modules or similar | ||
+ | SVN directories will not be available. If necessary, we can create meta repositories that have | ||
+ | references to those repositories manually. | ||
+ | |||
+ | ==== php-src ==== | ||
+ | The first source to be moved to the chosen DVCS will be php-src. Other modules, such as web, | ||
+ | pecl and phpdoc will follow later. | ||
+ | |||
+ | ==== PECL, PHPdoc and co ==== | ||
+ | Modules like PECL can use submodules/ | ||
+ | modules moves to php-src it will be either done as a submodules/ | ||
+ | to maintain a combined history and ease the cloning process. To easy the process, if PECL modules are | ||
+ | maintained outside of php.net they should try to use the same VCS as PHP. | ||
==== Migration RFC ==== | ==== Migration RFC ==== | ||
The migration of modules is handled through the following RFCs: | The migration of modules is handled through the following RFCs: | ||
- | - Migration of php-src | + | - Migration of php-src |
+ | - Migration of phpdoc | ||
+ | - Migration of PECL | ||
more to follow. | more to follow. | ||
- | ===== Discussion ==== | + | ===== Discussion |
In this section I'll try to outline some qualitative evaluation based on | In this section I'll try to outline some qualitative evaluation based on | ||
discussions that I had about this topic with people from the PHP community and | discussions that I had about this topic with people from the PHP community and | ||
Line 465: | Line 506: | ||
very easy for people to participate on a project. It is far more popular than | very easy for people to participate on a project. It is far more popular than | ||
Bitbucket. | Bitbucket. | ||
+ | |||
+ | Migrating history can be easily done in both DVCS. The Karma system can be implemented | ||
+ | in both DVCS. There is no show stopper on both DVCS. | ||
+ | |||
+ | My personal opinion is that Mercurial is easier to learn. SVN concepts | ||
+ | translate better to Mercurials concepts, e.g. local incrementing revision numbers. | ||
+ | Developers. that already know Git won't have a big problem to use Mercurial. | ||
+ | I think Mercurial would be the better fit. It also gives us more flexibility | ||
+ | in case we want to write additional extensions for the phpdoc team or whatever. | ||
===== Further Readings and References ===== | ===== Further Readings and References ===== | ||
Line 470: | Line 520: | ||
Further Readings: | Further Readings: | ||
+ | * a successful git branching model http:// | ||
* http:// | * http:// | ||
* http:// | * http:// | ||
* http:// | * http:// | ||
* http:// | * http:// | ||
+ | * http:// | ||
+ | |||
+ | Discussion on internals: | ||
+ | * git anyone? - http:// | ||
+ | * DVCS - http:// | ||
+ | * Choosing a distributed version control system for PHP (or not). Call for Participation. - http:// | ||
+ | * moving forward - http:// | ||
+ | * Hold off 5.4 - http:// | ||
+ | * Project Management - http:// | ||
+ | * CVS to SVN Migration - http:// | ||
+ | * Volunteers for Subversion 1.5 conversion of cvs.php.net? | ||
===== Changelog ===== | ===== Changelog ===== | ||
Line 479: | Line 541: | ||
* 2011-07-30: initial revision | * 2011-07-30: initial revision | ||
* 2011-08-07: general cleanup and a small amount of Bazaar information | * 2011-08-07: general cleanup and a small amount of Bazaar information | ||
+ | * 2011-08-26: add reference to hginit.com |
rfc/dvcs.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1