Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Further minor tweaks to configuration sync. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | config-sync |
| Files: | files | file ages | folders |
| SHA1: |
b5aa3bfe88d1848ea46b2b5c55a14f20 |
| User & Date: | drh 2011-04-27 01:35:56.825 |
Context
|
2011-04-27
| ||
| 01:40 | Fix an out-of-order local variable declaration. Ticket [a659e233cd79a0d]. check-in: 7b45d101dd user: drh tags: config-sync | |
| 01:35 | Further minor tweaks to configuration sync. check-in: b5aa3bfe88 user: drh tags: config-sync | |
| 00:49 | Simple test cases for configuration sync are now working. check-in: bef34a6940 user: drh tags: config-sync | |
Changes
Changes to src/db.c.
| ︙ | ︙ | |||
1308 1309 1310 1311 1312 1313 1314 |
zHash[n] = 0;
}else{
sha1sum_step_text(zContent, n);
sha1sum_finish(&out);
sqlite3_snprintf(sizeof(zHash), zHash, "%s", blob_str(&out));
blob_reset(&out);
db_multi_exec(
| | > | 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 |
zHash[n] = 0;
}else{
sha1sum_step_text(zContent, n);
sha1sum_finish(&out);
sqlite3_snprintf(sizeof(zHash), zHash, "%s", blob_str(&out));
blob_reset(&out);
db_multi_exec(
"INSERT OR IGNORE INTO concealed(hash,content,mtime)"
" VALUES(%Q,%#Q,now())",
zHash, n, zContent
);
}
return zHash;
}
/*
|
| ︙ | ︙ |
Changes to src/report.c.
| ︙ | ︙ | |||
358 359 360 361 362 363 364 365 366 367 368 |
if( zSQL[0]==0 ){
zErr = "Please supply an SQL query statement";
}else if( (zTitle = trim_string(zTitle))[0]==0 ){
zErr = "Please supply a title";
}else{
zErr = verify_sql_statement(zSQL);
}
if( zErr==0 ){
login_verify_csrf_secret();
if( rn>0 ){
db_multi_exec("UPDATE reportfmt SET title=%Q, sqlcode=%Q,"
| > > > > > > | | | | 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 |
if( zSQL[0]==0 ){
zErr = "Please supply an SQL query statement";
}else if( (zTitle = trim_string(zTitle))[0]==0 ){
zErr = "Please supply a title";
}else{
zErr = verify_sql_statement(zSQL);
}
if( zErr==0
&& db_exists("SELECT 1 FROM reportfmt WHERE title=%Q and rn<>%d",
zTitle, rn)
){
zErr = mprintf("There is already another report named \"%h\"", zTitle);
}
if( zErr==0 ){
login_verify_csrf_secret();
if( rn>0 ){
db_multi_exec("UPDATE reportfmt SET title=%Q, sqlcode=%Q,"
" owner=%Q, cols=%Q, mtime=now() WHERE rn=%d",
zTitle, zSQL, zOwner, zClrKey, rn);
}else{
db_multi_exec("INSERT INTO reportfmt(title,sqlcode,owner,cols,mtime) "
"VALUES(%Q,%Q,%Q,%Q,now())",
zTitle, zSQL, zOwner, zClrKey);
rn = db_last_insert_rowid();
}
cgi_redirect(mprintf("rptview?rn=%d", rn));
return;
}
}else if( rn==0 ){
|
| ︙ | ︙ |
Changes to src/shun.c.
| ︙ | ︙ | |||
83 84 85 86 87 88 89 |
}
}
if( zUuid && P("add") ){
int rid, tagid;
login_verify_csrf_secret();
db_multi_exec(
"INSERT OR IGNORE INTO shun(uuid,mtime)"
| | | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
}
}
if( zUuid && P("add") ){
int rid, tagid;
login_verify_csrf_secret();
db_multi_exec(
"INSERT OR IGNORE INTO shun(uuid,mtime)"
" VALUES('%s', now())", zUuid);
@ <p class="shunned">Artifact
@ <a href="%s(g.zTop)/artifact/%s(zUuid)">%s(zUuid)</a> has been
@ shunned. It will no longer be pushed.
@ It will be removed from the repository the next time the respository
@ is rebuilt using the <b>fossil rebuild</b> command-line</p>
db_multi_exec("DELETE FROM attachment WHERE src=%Q", zUuid);
rid = db_int(0, "SELECT rid FROM blob WHERE uuid=%Q", zUuid);
|
| ︙ | ︙ |