Re: [SVN-MIGRATION] git, submodules and extensions
[email protected] (Travis Swicegood) Sat, 21 Mar 2009 00:12:21 -0500
| Newsgroups | svn.migration |
|---|---|
| Message-ID | <[email protected]> |
Hi Johannes; On Mar 17, 2009, at 1:54 PM, Johannes Schlüter wrote: > In PHP we have our extensions. Over the recent years we got used to > use > PECL as incubator platform and as place to dump unmaintained > extensions. > For adding/dropping extensions to/from the core we did some cp/symlink > magic on the CVS server and, by doing this, kept the commit history of > the extensions - at least more or less. > This isn't possible with the DVCSs as all files of the tree build the > project. Actually, this isn't the case. Git happily fetches commits from multiple repositories, then you can merge them together at will. I actually have a pretty good demonstration of this on a project I was playing with because I forgot to rebase. In the network graph[1] of the project, you'll notice that the master branch starts back in November, then a new, parallel branch is created and merged in some months later. This was caused by a case very similar to PECL. I created my own local repository and started hacking away. Once I had finished up a few pieces and wanted to share it, I added the remote repo on GitHub, then fetched the remote master repository and merged my master into it. That created that merge commit on the end (where the arrow in red goes back into black). Had I been paying attention, I would have rebased my master onto the remote master and called it a day, but I didn't and now it serves as a good example :-) This is how PECL extensions would work as well. I, as a new PECL developer, would start working on my project, get it listed on pecl.php.net, and make it useful. Once it was useful enough to be pulled into PHP, whoever was going to pull it into php-src would just add my original repository as a remote repo, fetch the changes, then merge them into whatever branch they were going to be added into. The full history would transfer and there'd be a nice merge commit just like the one noted in YABT's history[2]. As has been discussed both about submodules and svn:externals, there's some extra steps that those introduce that I don't think very many people want. For example, do we really want someone who has full access to ext/mysql to have to commit to a separate repository, then get someone with a php-src commit bit to update which commit php-src uses? The ACL system that Rasmus has requested and GitHub said they would deliver removes the need for that type of system, though, so I think that's a moot point. -T [1]: http://github.com/tswicegood/yabt/network [2]: http://github.com/tswicegood/yabt/commits/