Indefero

Indefero Commit Details

Date:2009-01-20 17:31:55 (5 years 9 months ago)
Author:Loïc d'Anterroches
Branch:dev, develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, release-1.1, release-1.2, release-1.3
Commit:5d3ce34c4bfd2b3e642230c6edc9ca305ba76d7e
Parents: 8cfc5ec026eac94ca24ea2af5366de3fe5f4fec2
Message:Fixed to correctly update the git daemon export flag as needed.

Changes:
Msrc/IDF/Plugin/SyncGit/Cron.php (2 diffs)
Msrc/IDF/Plugin/SyncGit/Serve.php (2 diffs)
Msrc/IDF/relations.php (1 diff)

File differences

src/IDF/Plugin/SyncGit/Cron.php
5858
5959
6060
61
62
63
64
65
66
67
68
69
70
71
6172
6273
6374
......
6677
6778
6879
80
6981
7082
7183
}
/**
* Mark export of git repositories for the daemon.
*/
public static function markExport()
{
foreach (Pluf::factory('IDF_Project')->getList() as $project) {
$rep = sprintf(Pluf::f('git_repositories'), $project->shortname);
IDF_Plugin_SyncGit_Serve::setGitExport($project->shortname, $rep);
}
}
/**
* Check if a sync is needed.
*
*/
if (file_exists(Pluf::f('idf_plugin_syncgit_sync_file'))) {
@unlink(Pluf::f('idf_plugin_syncgit_sync_file'));
self::sync();
self::markExport();
}
}
}
src/IDF/Plugin/SyncGit/Serve.php
231231
232232
233233
234
235
236
234237
235238
236239
......
245248
246249
247250
251
252
253
248254
249255
250256
*/
public function gitExportDeny($fullpath)
{
if (!file_exists($fullpath)) {
return; // Not created yet.
}
@unlink($fullpath.DIRECTORY_SEPARATOR.'git-daemon-export-ok');
if (file_exists($fullpath.DIRECTORY_SEPARATOR.'git-daemon-export-ok')) {
throw new Exception('Cannot remove git-daemon-export-ok file.');
*/
public function gitExportAllow($fullpath)
{
if (!file_exists($fullpath)) {
return; // Not created yet.
}
touch($fullpath.DIRECTORY_SEPARATOR.'git-daemon-export-ok');
if (!file_exists($fullpath.DIRECTORY_SEPARATOR.'git-daemon-export-ok')) {
throw new Exception('Cannot create git-daemon-export-ok file.');
src/IDF/relations.php
6363
6464
6565
66
67
6668
6769
6870
#
# Git synchronization
Pluf_Signal::connect('IDF_Project::membershipsUpdated',
array('IDF_Plugin_SyncGit', 'entry'));
Pluf_Signal::connect('IDF_Key::postSave',
array('IDF_Plugin_SyncGit', 'entry'));

Archive Download the corresponding diff file