tag module in svn
committracker runs after commit using file plugins/scmhook/library/scmsvn/hooks/committracker/post.php:
/usr/bin/php -d include_path=/usr/share/php5/PEAR:/etc/gforge//custom:/etc/gforge/:/usr/share/fusionforge/common:/usr/share/fusionforge/www:/usr/share/fusionforge/plugins:/usr/share/fusionforge:/usr/share/fusionforge/www/include:/usr/share/fusionforge/common/include:.:/usr/share/php:/usr/share/pear /usr/share/fusionforge/plugins/scmhook/library/scmsvn/hooks/committracker/post.php /var/lib/gforge/scmrepos/svn/testmodule 26369
The program finds out changed files with 'svnlook changed -r 26369 /var/lib/gforge/scmrepos/svn/testmodule'
Result is:
A tags/TEST234/Test/
D tags/TEST234/Test/src/Kaputt.java
A tags/TEST23_4/Test/src/Kaputt.java
The result is filtered to get the list of changed files only and looped through:
foreach ($changed as $onefile) {
Starting with the given revision minus one, all change sets for each revision is retrieved using 'svnlook changed'
The result is searched for the current file. If it is found, the revision is used as last revision. Otherwise the revision is decremented by one and it is retried.
Given the above example, the first "file" is the project directory itself that was created with the tag itself and never appears in the change log
Using the above example, the revision before states:
fusionforge:~ # svnlook changed -r 26368 /var/lib/gforge/scmrepos/svn/testmodule
A tags/TEST23_4/
The loop iterates over each revision, invocating svnlook more than 26000 times for each file.
At my setup, it takes about 30minutes to perform the tag.
As far as I see, the same procedure is used with scmgit
|