srchub

srchub Commit Details


Date:2016-03-20 14:15:51 (8 years 9 months ago)
Author:Natalie Adams
Branch:master
Commit:f6d60fdc35b38030f83730768ef7418640a61f9a
Parents: 0e252b19b522f2ad78a872623da6ea5b821c01d0
Message:Issue 117: git projects are added to mercurial Apache config

Changes:

File differences

indefero/scripts/SyncMercurial.sh
1
1
22
33
44
#!/bin/sh
#!/bin/bash
private_notify="/home/mercurial/tmp/notify.tmp"
indefero/src/IDF/Plugin/SyncMercurial.php
130130
131131
132132
133
134
135
136
137
138
139
140
141
142
133
143134
144135
145136
......
152143
153144
154145
155
156
157
146
158147
159148
160149
161150
162151
163
164152
165153
166154
......
215203
216204
217205
206
207
208
218209
219210
220211
* Get the repository password for the user
*/
function getMercurialPass($user){
//echo $user->password.Pluf::f('secret_key');
# return base64_encode(sha1($_POST["password"], true));
#file_put_contents("/tmp/test3", "test");
//return sha1($_POST["password"], true);
//if (isset($_POST["password"])) return $_POST["password"];
//return $_POST["password"];
//file_put_contents("/tmp/test", $user->password.Pluf::f('secret_key'));
//file_put_contents("/tmp/test", $user->password);
//return substr(sha1($user->password.Pluf::f('secret_key')), 0, 8);
return $user->password;
return $user->password;
}
/**
throw new Exception (sprintf(__('%s does not exist or is not writable.'), $passwd_file));
}
$ht = new File_Passwd_Authbasic($passwd_file);
//$ht->setMode(Pluf::f('idf_plugin_syncmercurial_passwd_mode',
// FILE_PASSWD_SHA));
$ht->setMode("plain");
$ht->setMode("plain");
$ht->load();
$mem = $project->getMembershipData();
$members = array_merge((array)$mem['members'], (array)$mem['owners'],
(array)$mem['authorized']);
foreach($members as $user) {
//file_put_contents("/tmp/test", $this->getMercurialPass($user));
if ($ht->userExists($user->login)) {
$ht->changePasswd($user->login, "{SHA}" . $this->getMercurialPass($user));
} else {
$notify_file = Pluf::f('idf_plugin_syncmercurial_private_notify');
$fcontent = '';
foreach (Pluf::factory('IDF_Project')->getList() as $project) {
if ($project->getConf()->getVal('scm') != "mercurial") {
continue;
}
$conf = new IDF_Conf();
$conf->setProject($project);
$hide_file = Pluf::f('idf_plugin_syncmercurial_path').sprintf('/%s/.hide', $project->shortname);

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.05535s using 20 queries.