List of commits:
Subject Hash Author Date (UTC)
Fix state bug which triggered a not needed update of the structure f6118c456bfc960782a53b9dc090046d542f9db9 Catalin(ux) M. BOIE 2017-11-24 19:12:38
Some free_result and unlock only if successfully locked 64666ca1371c004f74376fce2e2a67ee9f608a34 Catalin(ux) M. BOIE 2017-10-01 06:10:47
If git_log_simple returns error, just return error acbbacda0947a3f8496c9b15870db574c08db715 Catalin(ux) M. BOIE 2017-08-31 03:43:25
Be less verbose in rg_rights_test 3cb2d12960b059b61f7c2c47c6198fbbdee8bccd Catalin(ux) M. BOIE 2017-08-10 04:19:34
Remove rg_log_buf stuff because of performance issues e85f70b38c197d44a9b4878dcff78da4f4f56562 Catalin(ux) M. BOIE 2017-08-08 20:08:56
Use a more efficient way to log multi line strings 67923e6760bf26923bd7ce9c9bced7a3f526cecf Catalin(ux) M. BOIE 2017-08-08 19:54:00
css: make border more visible 378b328cde875d1584f3df6d8635b340ee23207a Catalin(ux) M. BOIE 2017-07-22 23:27:29
struct: add itime for commit_labels 67d189b9d3330ab4dc3b6a0580a736522b6c1d36 Catalin(ux) M. BOIE 2017-07-22 23:05:02
wh: builder: we need repo info for clone_url_ssh info 6e95861b22476b0857f98a49025fc060302c2a3f Catalin(ux) M. BOIE 2017-07-22 12:35:52
hints: ssh: make more clear that ssh must be restarted 8c35f89b323d3ea28fad79f4c32d78aadc8618f6 Catalin(ux) M. BOIE 2017-07-22 08:17:37
rg_authorize must be run as rocketgit user - fix permissions to 0755 80db46ae953b72ba521b3cd96c91602e127fc8f8 Catalin(ux) M. BOIE 2017-07-22 08:07:56
build_jobs: Columns with no defaults must be specified bbb1c0036be3c6180d84e0641f41aa60ae1905f1 Catalin(ux) M. BOIE 2017-07-20 20:34:32
Show the suggestion to use https correctly 9656ff5ec3bfe65fc7a573fae254483c31d88501 Catalin(ux) M. BOIE 2017-07-10 20:57:26
rg_template_eval_cond: now supports more operations 2155bedec6e82343d84c8c504c0beb68fdf01dea Catalin(ux) M. BOIE 2017-07-10 20:55:48
Minor corrections dc3ce904f00ce5903ac5614ac870a0529d22ee4a Catalin(ux) M. BOIE 2017-07-10 20:55:03
state_get: Return empty if the state table does not exists 35822bff104ba2133f29a0a69cff4603d990a721 Catalin(ux) M. BOIE 2017-07-09 19:18:11
duilder: add 'samples' dir to the docs 8762f7dbfcec1f3ed5d6d7ba7dbf0ed547a894b7 Catalin(ux) M. BOIE 2017-07-09 06:54:06
Bump version to 0.70 a3524c87b21d22d734626503683e80e51abd574c Catalin(ux) M. BOIE 2017-07-09 06:40:24
Added nginx next to apache 982e6536f5204a07c939b01229784a46c18cdada Catalin(ux) M. BOIE 2017-07-09 06:38:55
rg_exec: when stdout closes, we should not try to get input anymore from the external program b550d45c19c48235eddbd5b6fdcadcec2689065b Catalin(ux) M. BOIE 2017-07-09 06:38:32
Commit f6118c456bfc960782a53b9dc090046d542f9db9 - Fix state bug which triggered a not needed update of the structure
Author: Catalin(ux) M. BOIE
Author date (UTC): 2017-11-24 19:12
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2017-11-24 19:12
Parent(s): 64666ca1371c004f74376fce2e2a67ee9f608a34
Signer:
Signing key:
Signing status: N
Tree: c24e83766fff4627f351166aea90be770d40e862
File Lines added Lines deleted
inc/state.inc.php 12 27
File inc/state.inc.php changed (mode: 100644) (index 343f4e6..e80b7ab)
... ... function rg_state_get($db, $var)
29 29 { {
30 30 global $rg_state_debug; global $rg_state_debug;
31 31
32 rg_prof_start("state_get");
32 rg_prof_start('state_get');
33 33 if ($rg_state_debug) if ($rg_state_debug)
34 rg_log_enter("state_get: var=$var");
34 rg_log_enter('state_get: var=' . $var);
35 35
36 36 $ret = FALSE; $ret = FALSE;
37 37 while (1) { while (1) {
38 38 // Try cache first // Try cache first
39 $r = rg_cache_get("state::" . $var);
39 $r = rg_cache_get('state::' . $var);
40 40 if ($r !== FALSE) { if ($r !== FALSE) {
41 41 $ret = $r; $ret = $r;
42 42 break; break;
43 43 } }
44 44
45 // It may be possible the database was not created
46 // We return an empty string
47 $k = '__internal' . '::' . 'STATE_TABLE_EXISTS';
48 $r = rg_cache_get($k);
49 if ($r === FALSE) {
50 // Let's see if the 'state' table is present
51 $r = rg_sql_rel_exists($db, 'state');
52 if ($r === FALSE) {
53 $ret = FALSE;
54 break;
55 }
56 if ($r === 0) {
57 $ret = '';
58 break;
59 }
60 rg_cache_set($k, 1, RG_SOCKET_NO_WAIT);
61 }
45 // So, we get an error from the cache daemon.
46 // The only way is to go to database directly.
62 47
63 if ($r === 2) { // state table was loaded
64 // but the var is not there
48 // Let's see if the 'state' table is present
49 $r = rg_sql_rel_exists($db, 'state');
50 if ($r === FALSE)
51 break;
52 if ($r === 0) {
65 53 $ret = ''; $ret = '';
66 54 break; break;
67 55 } }
68 56
69 // We have to go in the database...
70 57 $sql = 'SELECT * FROM state'; $sql = 'SELECT * FROM state';
71 58 $res = rg_sql_query($db, $sql); $res = rg_sql_query($db, $sql);
72 59 if ($res === FALSE) { if ($res === FALSE) {
 
... ... function rg_state_get($db, $var)
83 70 $v = $row['var']; $v = $row['var'];
84 71 $rows[$v] = $row['value']; $rows[$v] = $row['value'];
85 72 } }
86 $r = rg_cache_set('state', $rows, RG_SOCKET_NO_WAIT);
87 if ($r !== FALSE)
88 rg_cache_set($k, 2, RG_SOCKET_NO_WAIT);
73 rg_cache_set('state', $rows, RG_SOCKET_NO_WAIT);
89 74
90 75 if (isset($rows[$var])) if (isset($rows[$var]))
91 76 $ret = $rows[$var]; $ret = $rows[$var];
 
... ... function rg_state_get($db, $var)
98 83
99 84 if ($rg_state_debug) if ($rg_state_debug)
100 85 rg_log_exit(); rg_log_exit();
101 rg_prof_end("state_get");
86 rg_prof_end('state_get');
102 87 return $ret; return $ret;
103 88 } }
104 89
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