List of commits:
Subject Hash Author Date (UTC)
Cosmetic cbe42130692ed9b876746e6c97f4fb32439c6190 Catalin(ux) M. BOIE 2020-08-23 13:59:00
Default statistics are now per month c312ad532190fe566f2243881a883568b4f77c23 Catalin(ux) M. BOIE 2020-08-23 12:35:36
events: when splitting an event we need a transaction e685c800814365661b348c0d04aa8c0b3605ed7e Catalin(ux) M. BOIE 2020-08-21 04:35:17
Fix for a bug preventing partition table to be created in advance 51049495934efa8c7bca710c6f2538f34bc4de9a Catalin(ux) M. BOIE 2020-08-20 04:03:49
cron fixes 910c74f83740da015d654193025cd6433324a1da Catalin(ux) M. BOIE 2020-08-20 03:41:07
replaced 'slave' with 'part' 348a2afcaedd77c7513b5e7dd05364f5e9ae7a87 Catalin(ux) M. BOIE 2020-08-20 03:40:43
Make cron tasks more resilient in case the machine is stopped afbe8607b4608862787bf696f71027beb345701f Catalin(ux) M. BOIE 2020-08-19 06:08:34
Cosmetic 21956573027d83eb45913b6bf30eeb57e602aea4 Catalin(ux) M. BOIE 2020-08-19 06:07:45
Added time of upload for artifacts fd33fe0aeef09f66d74f3ec1554312a2fa5e2642 Catalin(ux) M. BOIE 2020-08-19 06:06:54
css fixes for table scroll 77e486f3c9e3c9356985d3c21bc713d8a8d0e223 Catalin(ux) M. BOIE 2020-08-19 06:02:09
Added git repo size 9828b1fe96e2217ead8863f7a7c0ee3599d16633 Catalin(ux) M. BOIE 2020-08-19 06:01:27
Change artifacts path to be able to compute correct sizes efff16c88415dfca0a4b52981b44620e52778c03 Catalin(ux) M. BOIE 2020-08-19 05:56:17
Some state was not under transaction fd51b92442fb83fc6941f94b22236f5014f0062c Catalin(ux) M. BOIE 2020-08-19 03:24:28
Added artifacts size to repos and users tables 2a8469e3416e63e9bb21ba0e412583fc69fea115 Catalin(ux) M. BOIE 2020-08-19 03:23:58
No need to invalidate last part ts because we already check 75cf0ae1721d9473bb8df780cc61f5c6247a7a6c Catalin(ux) M. BOIE 2020-08-19 03:20:19
Fixed some spaces in profiling 929b95c5d842ffe306031f2ba99d23e435855155 Catalin(ux) M. BOIE 2020-08-18 07:11:30
Added a link to tutorials in the welcome mail 2ef5795e53a26fdc1f9a2adda7bbf7a4f4ccb81f Catalin(ux) M. BOIE 2020-08-17 07:08:15
Change the mail goal bffa2a1f9a4b185916b700b3e8455bbf6f7a82bf Catalin(ux) M. BOIE 2020-08-17 06:59:35
One of the tests was not ran bb295b59daee2158c1a9c435a267d4d2377d36e9 Catalin(ux) M. BOIE 2020-08-17 06:47:52
Doc improvement 039b77222a8fb6e38be0b9a35329c13f86c890af Catalin(ux) M. BOIE 2020-08-17 06:47:27
Commit cbe42130692ed9b876746e6c97f4fb32439c6190 - Cosmetic
Author: Catalin(ux) M. BOIE
Author date (UTC): 2020-08-23 13:59
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2020-08-23 13:59
Parent(s): c312ad532190fe566f2243881a883568b4f77c23
Signing key:
Tree: 805b19e74c23b653e2d6b5a1450e836ea01b50e9
File Lines added Lines deleted
inc/admin.inc.php 4 2
inc/events.inc.php 3 4
inc/git.inc.php 3 2
inc/repo.inc.php 3 3
inc/repo/repo.php 0 1
inc/user.inc.php 1 3
root/themes/default/main.css 0 2
root/themes/default/repo/tree/line.html 1 7
scripts/cron.php 1 1
tests/git2.php 2 1
tests/repo.php 0 13
File inc/admin.inc.php changed (mode: 100644) (index 96106d2..2cabba6)
... ... function rg_admin_report_big_users($db)
457 457 return FALSE; return FALSE;
458 458
459 459 while (($row = rg_sql_fetch_array($res))) { while (($row = rg_sql_fetch_array($res))) {
460 $ret .= "\t" . $row['username']
461 . "\t" . $row['disk_used_mb'] . ' MiB'
460 $ret .= ' ' . $row['username']
461 . ' ' . $row['disk_used_mb']
462 . ' ' . $row['git_mb']
463 . ' ' . $row['artifacts_mb']
462 464 . "\n"; . "\n";
463 465 } }
464 466 rg_sql_free_result($res); rg_sql_free_result($res);
File inc/events.inc.php changed (mode: 100644) (index 191e2ae..3546fe5)
... ... function rg_event_notify(&$notify_list, $ev_id, $misc)
224 224 function rg_event_process_queue($db, &$notify_list) function rg_event_process_queue($db, &$notify_list)
225 225 { {
226 226 rg_prof_start("event_process_queue"); rg_prof_start("event_process_queue");
227 rg_log_enter("event_process_queue: notify_list: "
228 . rg_array2string($notify_list));
227 rg_log_enter('event_process_queue: notify_list: '
228 . rg_array2string($notify_list) . '.');
229 229
230 230 $ret = FALSE; $ret = FALSE;
231 231 while (1) { while (1) {
 
... ... function rg_event_process_queue($db, &$notify_list)
234 234 // We limit to be able to deal with high prio tasks // We limit to be able to deal with high prio tasks
235 235 $sql = "SELECT * FROM events" $sql = "SELECT * FROM events"
236 236 . " WHERE fail = 0" . " WHERE fail = 0"
237 . " AND next_try < $now"
237 . " AND next_try < " . $now
238 238 . " ORDER BY prio, id" . " ORDER BY prio, id"
239 239 . " FOR UPDATE" . " FOR UPDATE"
240 240 . " LIMIT 100"; . " LIMIT 100";
 
... ... function rg_event_process_queue($db, &$notify_list)
295 295 return $ret; return $ret;
296 296 } }
297 297
298 ?>
File inc/git.inc.php changed (mode: 100644) (index df69983..0272b3a)
... ... function rg_git_short($ref)
185 185 } }
186 186
187 187 /* /*
188 * 'master' -> 'refs/heads/master'
189 * 'refs/heads/master' -> same
188 * 'main' -> 'refs/heads/main'
189 * 'refs/heads/main' -> same as above
190 190 */ */
191 191 function rg_git_name2ref($name) function rg_git_name2ref($name)
192 192 { {
 
... ... function rg_git_update_branch($db, $a)
2196 2196 . $a['old_rev'] . ' to ' . $a['new_rev']; . $a['old_rev'] . ' to ' . $a['new_rev'];
2197 2197 } }
2198 2198 } }
2199 // TODO: move this to event to make push faster.
2199 2200 rg_repo_history_insert($db, $history); rg_repo_history_insert($db, $history);
2200 2201 break; break;
2201 2202 } }
File inc/repo.inc.php changed (mode: 100644) (index d42a15c..7e4ffa7)
... ... function rg_repo_cosmetic($db, &$row)
160 160 */ */
161 161 function rg_repo_info($db, $repo_id, $uid, $repo_name) function rg_repo_info($db, $repo_id, $uid, $repo_name)
162 162 { {
163 rg_prof_start("repo_info");
164 rg_log_enter("repo_info: repo_id=$repo_id uid=$uid repo_name=$repo_name.");
163 rg_prof_start('repo_info');
165 164
166 165 $ret['ok'] = 0; $ret['ok'] = 0;
167 166 $ret['exists'] = 0; $ret['exists'] = 0;
 
... ... function rg_repo_info($db, $repo_id, $uid, $repo_name)
236 235 break; break;
237 236 } }
238 237
239 rg_log_exit();
240 238 rg_prof_end("repo_info"); rg_prof_end("repo_info");
241 239 return $ret; return $ret;
242 240 } }
 
... ... function rg_repo_event_push($db, $event)
765 763 $ret[] = $x; $ret[] = $x;
766 764 } }
767 765
766 // TODO: notify watchers?
767
768 768 // webhook // webhook
769 769 $x = $event; $x = $event;
770 770 $x['category'] = 'wh_send'; $x['category'] = 'wh_send';
File inc/repo/repo.php changed (mode: 100644) (index 9adb817..3dba116)
... ... case 'list':
35 35 } }
36 36
37 37 $_repo .= '</div>' . "\n"; $_repo .= '</div>' . "\n";
38 ?>
File inc/user.inc.php changed (mode: 100644) (index 9336edb..a60a9e0)
... ... function rg_user_remove($db, $rg, $uid)
751 751 */ */
752 752 function rg_user_info($db, $uid, $user, $email) function rg_user_info($db, $uid, $user, $email)
753 753 { {
754 rg_prof_start("user_info");
755 rg_log_enter("user_info: uid=$uid user=$user email=$email");
754 rg_prof_start('user_info');
756 755
757 756 $ret = rg_user_empty(); $ret = rg_user_empty();
758 757 while (1) { while (1) {
 
... ... function rg_user_info($db, $uid, $user, $email)
833 832 break; break;
834 833 } }
835 834
836 rg_log_exit();
837 835 rg_prof_end("user_info"); rg_prof_end("user_info");
838 836 return $ret; return $ret;
839 837 } }
File root/themes/default/main.css changed (mode: 100644) (index 0f4af56..fc927c6)
... ... thead tr {
50 50 tbody tr:nth-child(even) { tbody tr:nth-child(even) {
51 51 background-color: #e9e9e9; background-color: #e9e9e9;
52 52 } }
53
54 53 tbody tr:hover { tbody tr:hover {
55 54 background-color: #fff; background-color: #fff;
56 55 } }
 
... ... x.buttons form input[type="submit"], x.buttons form input, x.buttons form select
695 694 margin-top: 8pt; margin-top: 8pt;
696 695 } }
697 696
698
File root/themes/default/repo/tree/line.html changed (mode: 100644) (index c0125c4..7c7897d)
3 3 <td>@@type@@</td> <td>@@type@@</td>
4 4 <td>@@size@@</td> <td>@@size@@</td>
5 5 <td>@@ref@@</td> <td>@@ref@@</td>
6 <td>
7 @@if(@@is_link@@ == 0){{
8 <a href="@@url_repo@@/source/tree/@@ref_url@@/@@type@@@@path@@/@@URL_ESCAPE:file@@">@@file@@</a>
9 }}{{
10 @@file@@ (link to other git tree)
11 }}
12 </td>
6 <td>@@if(@@is_link@@ == 0){{<a href="@@url_repo@@/source/tree/@@ref_url@@/@@type@@@@path@@/@@URL_ESCAPE:file@@">@@file@@</a>}}{{@@file@@ (link to other git tree)}}</td>
13 7 </tr> </tr>
File scripts/cron.php changed (mode: 100644) (index 8226f50..11e10b2)
... ... while (($ldru < $today_00) && (rg_load() < 30)) {
80 80
81 81 $ok = TRUE; $ok = TRUE;
82 82 while (($row = rg_sql_fetch_array($res))) { while (($row = rg_sql_fetch_array($res))) {
83 rg_log('Processing repo ' . $row['repo_id'] . '...');
84 83 $di = rg_repo_size($row['uid'], $row['repo_id']); $di = rg_repo_size($row['uid'], $row['repo_id']);
85 84 if ($di === FALSE) { if ($di === FALSE) {
86 85 rg_internal_error('Cannot compute the repo size: ' rg_internal_error('Cannot compute the repo size: '
 
... ... while (($r < $today_00) && (rg_load() < 50)) {
261 260
262 261 $r = rg_state_get($db, 'report1'); $r = rg_state_get($db, 'report1');
263 262 while (($now >= $today_01) && ($r < $today_01) && (rg_load() < 30)) { while (($now >= $today_01) && ($r < $today_01) && (rg_load() < 30)) {
263 rg_log('Sending report1...');
264 264 $r = rg_admin_report1($db, $rg); $r = rg_admin_report1($db, $rg);
265 265 if ($r === FALSE) if ($r === FALSE)
266 266 break; break;
File tests/git2.php changed (mode: 100644) (index a7a2724..2dd0490)
... ... $r = do_req($test_url . '/user/' . rawurlencode($rg_ui['username'])
138 138 . '/' . rawurlencode($repo['name']) . '/' . rawurlencode($repo['name'])
139 139 . '/source/tree/tag/unannot1/blob/a', $data, $headers); . '/source/tree/tag/unannot1/blob/a', $data, $headers);
140 140 if (strstr($r['body'], 'a signature') === FALSE) { if (strstr($r['body'], 'a signature') === FALSE) {
141 rg_log_ml("Cannot see the tag: " . print_r($r, TRUE));
141 rg_log_ml("r: " . print_r($r, TRUE));
142 rg_log_ml('Cannot see \'a signature\'!');
142 143 exit(1); exit(1);
143 144 } }
144 145 rg_log_exit(); rg_log_exit();
File tests/repo.php changed (mode: 100644) (index 50eaf8f..e7760dc)
... ... if ($r === FALSE) {
352 352 rg_log_exit(); rg_log_exit();
353 353
354 354
355 rg_log('');
356 rg_log_enter('disk size');
357 $size = rg_repo_size("size", TRUE);
358 $e = 13;
359 if ($size != $e) {
360 rg_log("Dir 'size' has an unexpected size ($e != $r)!");
361 exit(1);
362 }
363 rg_log_exit();
364
365
366 rg_sql_close($db);
367
368 355 rg_log('OK!'); rg_log('OK!');
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/catalinux/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/catalinux/rocketgit

Clone this repository using git:
git clone git://git.rocketgit.com/user/catalinux/rocketgit

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main