Discard profiles concept in SVN repository
In-Portal repository has following structure:
|-- in-portal | |-- branches | |-- releases | |-- trunk |-- modules | |-- module-name1 | | |-- branches | | |-- releases | | |-- trunk | |-- ... |-- profiles | |-- profile-name1 | | |-- branches | | |-- releases | | |-- trunk | |-- ... |-- themes | |-- theme-name1 | | |-- branches | | |-- releases | | |-- trunk | |-- ...
So there is:
- single "in-portal" folder
- a folder per module
- a folder per profile
- a folder per theme
However during development having just In-Portal SVN checkout isn't enough. Usually there needs to be a combination of existing modules & themes checked out as well so the changes can be properly tested. To automate this currently we employ concept of "profiles". Basically profile is an empty folder where different modules are pulled in via "svn:externals" property on root folder of that profile. Such properly might look like that:
# in-portal own folders ^/in-portal/branches/5.2.x/admin admin ^/in-portal/branches/5.2.x/core core ^/in-portal/branches/5.2.x/system system ^/in-portal/branches/5.2.x/tools tools # modules ^/modules/in-link/branches/5.2.x modules/in-link ^/modules/in-news/branches/5.2.x modules/in-news ^/modules/in-bulletin/branches/5.2.x modules/in-bulletin ^/modules/custom/branches/1.2.x modules/custom # themes ^/themes/default/branches/5.2.x themes/default ^/themes/simple/branches/1.2.x themes/simple ^/themes/advanced/branches/1.2.x themes/advanced # in-portal files in root folder ^/in-portal/branches/5.2.x/COPYRIGHT COPYRIGHT ^/in-portal/branches/5.2.x/CREDITS CREDITS ^/in-portal/branches/5.2.x/INSTALL INSTALL ^/in-portal/branches/5.2.x/LICENSE LICENSE ^/in-portal/branches/5.2.x/LICENSES LICENSES ^/in-portal/branches/5.2.x/README README ^/in-portal/branches/5.2.x/index.php index.php ^/in-portal/branches/5.2.x/robots.txt robots.txt ^/in-portal/branches/5.2.x/.htaccess .htaccess ^/in-portal/branches/5.2.x/favicon.ico favicon.ico
As you can see it's pretty complex to be manageable by hand and that's why we have a script to generate that "svn:externals" property in each release.
What I propose
- remove the profiles concept from repository
- create the "configure_profile.php" file within "tools" folder that accepts single argument "profile name"
Script will set "svn:externals" property of current SVN working copy to this:
# modules ^/modules/in-link/branches/5.2.x modules/in-link ^/modules/in-news/branches/5.2.x modules/in-news ^/modules/in-bulletin/branches/5.2.x modules/in-bulletin ^/modules/custom/branches/1.2.x modules/custom # themes ^/themes/default/branches/5.2.x themes/default ^/themes/simple/branches/1.2.x themes/simple ^/themes/advanced/branches/1.2.x themes/advanced
How this will work
- checkout main in-portal folder from svn://source.in-portal.org/in-portal/branches/5.2.x instead of checking out profile-name from svn://source.in-portal.org/profiles/profile-name/branches/5.2.x
- run "
php /tools/configure_profile.php profile-name
", which will set needed "svn:externals
" property - run "
svn update
" once to checkout modules/themes that were added
The same script, that currently handles "svn:externals
" property generation for profiles needs to be updated to generate the "configure_profile.php
" file.
More benefits
Since now we checkout main in-portal repository, then it becomes possible to use Phabricator's tool called Arcanist: https://secure.phabricator.com/book/phabricator/article/arcanist/ which is basically a CLI tool for http://qa.in-portal.org/ website to simplify code contribution.