svn checkout suggestion
| From: | Rasmus Lerdorf | Date: | Thu, 16 Jul 2009 22:07:15 +0000 |
| Subject: | svn checkout suggestion | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-44993@lists.php.net to get a copy of this message | ||
One of the benefits of svn is that we can do cross-branch commit pretty
easily now and thus avoid multiple similar commits with annoying MFH/MFB
commit log messages that are hard to track.
Please don't attempt to check out all of php/php-src or pecl. I made
the mistake of checking out all of pecl and it was 3.4G because you get
copies of the code for every tag and branch and we have a bunch.
In order to do this better, I think the best way is to use the sparse
directory feature documented here:
http://svnbook.red-bean.com/en/1.5/svn.advanced.sparsedirs.html
It takes a bit of work to set up your checkout, but once you have done
it, it becomes easy to work with. Here are my steps to creating a
~/src/ directory with the parts of the repository I commit to:
# Create initial top-level src dir
svn co http://svn.php.net/repository --depth empty src
# Fetch the parts of the repository I care about
svn co http://svn.php.net/repository/php
http://svn.php.net/repository/pecl
http://svn.php.net/repository/pear
http://svn.php.net/repository/phpdoc
http://svn.php.net/repository/systems
http://svn.php.net/repository/web
--depth immediates src
# Now, in php-src get all tags and branch names, but only
# populate trunk and the PHP_5_2 and PHP_5_3 branches
cd ~/src/php/php-src
svn up branches tags --set-depth immediates
svn up trunk branches/PHP_5_2 branches/PHP_5_3 --set-depth infinity
# In pecl get all tags and branch names,
# but only checkout out trunk for each
cd ~/src/pecl
svn update * --set-depth immediates
svn update */tags */branches --set-depth immediates
svn update */trunk --set-depth infinity
# Same idea for pear
cd ~/src/pear
svn update * --set-depth immediates
svn update */tags */branches --set-depth immediates
svn update */trunk --set-depth infinity
cd ~/src/pear/packages
svn update * --set-depth immediates
svn update */tags */branches --set-depth immediates
svn update */trunk --set-depth infinity
# and pick up the remaining flat modules (systems, web)
cd ~/src
svn update */tags */branches --set-depth immediates
svn update */trunk --set-depth infinity
Once you have all this set up, you can then cd into any empty branch or
tag directory and run:
svn update --set-depth infinity
to fully populate that directory on demand.
and you can make changes across trunk and multiple branches and perhaps
even make the corresponding fixes in the phpdoc tree!
-Rasmus