Fossil SCM

Merged in [0c0f268ff3], minor th1-internal doc addition.

stephan 2012-07-19 18:03 th1-query-api merge
Commit 56db35330d0e19569e38f56647866bed64c3cff4
5 files changed +1 -1 +1 -1 +20 -5 +4 -1 +4 -1
+1 -1
--- src/db.c
+++ src/db.c
@@ -1027,11 +1027,11 @@
10271027
10281028
/*
10291029
** Return true if the database is writeable
10301030
*/
10311031
int db_is_writeable(const char *zName){
1032
- return !sqlite3_db_readonly(g.db, db_name(zName));
1032
+ return g.db!=0 && !sqlite3_db_readonly(g.db, db_name(zName));
10331033
}
10341034
10351035
/*
10361036
** Verify that the repository schema is correct. If it is not correct,
10371037
** issue a fatal error and die.
10381038
--- src/db.c
+++ src/db.c
@@ -1027,11 +1027,11 @@
1027
1028 /*
1029 ** Return true if the database is writeable
1030 */
1031 int db_is_writeable(const char *zName){
1032 return !sqlite3_db_readonly(g.db, db_name(zName));
1033 }
1034
1035 /*
1036 ** Verify that the repository schema is correct. If it is not correct,
1037 ** issue a fatal error and die.
1038
--- src/db.c
+++ src/db.c
@@ -1027,11 +1027,11 @@
1027
1028 /*
1029 ** Return true if the database is writeable
1030 */
1031 int db_is_writeable(const char *zName){
1032 return g.db!=0 && !sqlite3_db_readonly(g.db, db_name(zName));
1033 }
1034
1035 /*
1036 ** Verify that the repository schema is correct. If it is not correct,
1037 ** issue a fatal error and die.
1038
+1 -1
--- src/db.c
+++ src/db.c
@@ -1027,11 +1027,11 @@
10271027
10281028
/*
10291029
** Return true if the database is writeable
10301030
*/
10311031
int db_is_writeable(const char *zName){
1032
- return !sqlite3_db_readonly(g.db, db_name(zName));
1032
+ return g.db!=0 && !sqlite3_db_readonly(g.db, db_name(zName));
10331033
}
10341034
10351035
/*
10361036
** Verify that the repository schema is correct. If it is not correct,
10371037
** issue a fatal error and die.
10381038
--- src/db.c
+++ src/db.c
@@ -1027,11 +1027,11 @@
1027
1028 /*
1029 ** Return true if the database is writeable
1030 */
1031 int db_is_writeable(const char *zName){
1032 return !sqlite3_db_readonly(g.db, db_name(zName));
1033 }
1034
1035 /*
1036 ** Verify that the repository schema is correct. If it is not correct,
1037 ** issue a fatal error and die.
1038
--- src/db.c
+++ src/db.c
@@ -1027,11 +1027,11 @@
1027
1028 /*
1029 ** Return true if the database is writeable
1030 */
1031 int db_is_writeable(const char *zName){
1032 return g.db!=0 && !sqlite3_db_readonly(g.db, db_name(zName));
1033 }
1034
1035 /*
1036 ** Verify that the repository schema is correct. If it is not correct,
1037 ** issue a fatal error and die.
1038
+20 -5
--- src/info.c
+++ src/info.c
@@ -479,19 +479,23 @@
479479
char *zEUser, *zEComment;
480480
const char *zUser;
481481
const char *zComment;
482482
const char *zDate;
483483
const char *zOrigDate;
484
+ const char *zBranch;
484485
style_header(zTitle);
485486
login_anonymous_available();
486487
free(zTitle);
487488
zEUser = db_text(0,
488489
"SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
489490
TAG_USER, rid);
490491
zEComment = db_text(0,
491492
"SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
492493
TAG_COMMENT, rid);
494
+ zBranch = db_text("trunk",
495
+ "SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
496
+ TAG_BRANCH, rid);
493497
zUser = db_column_text(&q, 2);
494498
zComment = db_column_text(&q, 3);
495499
zDate = db_column_text(&q,1);
496500
zOrigDate = db_column_text(&q, 4);
497501
@ <div class="section">Overview</div>
@@ -559,22 +563,33 @@
559563
while( db_step(&q)==SQLITE_ROW ){
560564
const char *zTagName = db_column_text(&q, 0);
561565
@ | %z(href("%R/timeline?r=%T",zTagName))%h(zTagName)</a>
562566
}
563567
db_finalize(&q);
564
- @ </td></tr>
565
- @ <tr><th>Other&nbsp;Links:</th>
566
- @ <td>
567
- @ %z(href("%R/dir?ci=%S",zUuid))files</a>
568568
if( g.perm.Zip ){
569569
char *zUrl = mprintf("%R/tarball/%s-%S.tar.gz?uuid=%s",
570570
zProjName, zUuid, zUuid);
571
- @ | %z(href("%s",zUrl))Tarball</a>
571
+ @ </td></tr>
572
+ @ <tr><th>Downloads:</th><td>
573
+ @ %z(href("%s",zUrl))Tarball</a>
572574
@ | %z(href("%R/zip/%s-%S.zip?uuid=%s",zProjName,zUuid,zUuid))
573575
@ ZIP archive</a>
574576
fossil_free(zUrl);
575577
}
578
+#if 0
579
+ if( isLeaf && fossil_strcmp(zBranch,"trunk")!=0 ){
580
+ @ </td></tr>
581
+ @ <tr><th>Diffs:</th><td>
582
+ @ %z(href("%R/vdiff?branch=%t",zBranch))Changes in %h(zBranch)</a>
583
+ @ | %z(href("%R/vdiff?from=trunk&to=%t",zBranch))Changes
584
+ @ from trunk</a>
585
+ }
586
+#endif
587
+ @ </td></tr>
588
+ @ <tr><th>Other&nbsp;Links:</th>
589
+ @ <td>
590
+ @ %z(href("%R/dir?ci=%S",zUuid))files</a>
576591
@ | %z(href("%R/artifact/%S",zUuid))manifest</a>
577592
if( g.perm.Write ){
578593
@ | %z(href("%R/ci_edit?r=%S",zUuid))edit</a>
579594
}
580595
@ </td>
581596
--- src/info.c
+++ src/info.c
@@ -479,19 +479,23 @@
479 char *zEUser, *zEComment;
480 const char *zUser;
481 const char *zComment;
482 const char *zDate;
483 const char *zOrigDate;
 
484 style_header(zTitle);
485 login_anonymous_available();
486 free(zTitle);
487 zEUser = db_text(0,
488 "SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
489 TAG_USER, rid);
490 zEComment = db_text(0,
491 "SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
492 TAG_COMMENT, rid);
 
 
 
493 zUser = db_column_text(&q, 2);
494 zComment = db_column_text(&q, 3);
495 zDate = db_column_text(&q,1);
496 zOrigDate = db_column_text(&q, 4);
497 @ <div class="section">Overview</div>
@@ -559,22 +563,33 @@
559 while( db_step(&q)==SQLITE_ROW ){
560 const char *zTagName = db_column_text(&q, 0);
561 @ | %z(href("%R/timeline?r=%T",zTagName))%h(zTagName)</a>
562 }
563 db_finalize(&q);
564 @ </td></tr>
565 @ <tr><th>Other&nbsp;Links:</th>
566 @ <td>
567 @ %z(href("%R/dir?ci=%S",zUuid))files</a>
568 if( g.perm.Zip ){
569 char *zUrl = mprintf("%R/tarball/%s-%S.tar.gz?uuid=%s",
570 zProjName, zUuid, zUuid);
571 @ | %z(href("%s",zUrl))Tarball</a>
 
 
572 @ | %z(href("%R/zip/%s-%S.zip?uuid=%s",zProjName,zUuid,zUuid))
573 @ ZIP archive</a>
574 fossil_free(zUrl);
575 }
 
 
 
 
 
 
 
 
 
 
 
 
 
576 @ | %z(href("%R/artifact/%S",zUuid))manifest</a>
577 if( g.perm.Write ){
578 @ | %z(href("%R/ci_edit?r=%S",zUuid))edit</a>
579 }
580 @ </td>
581
--- src/info.c
+++ src/info.c
@@ -479,19 +479,23 @@
479 char *zEUser, *zEComment;
480 const char *zUser;
481 const char *zComment;
482 const char *zDate;
483 const char *zOrigDate;
484 const char *zBranch;
485 style_header(zTitle);
486 login_anonymous_available();
487 free(zTitle);
488 zEUser = db_text(0,
489 "SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
490 TAG_USER, rid);
491 zEComment = db_text(0,
492 "SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
493 TAG_COMMENT, rid);
494 zBranch = db_text("trunk",
495 "SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
496 TAG_BRANCH, rid);
497 zUser = db_column_text(&q, 2);
498 zComment = db_column_text(&q, 3);
499 zDate = db_column_text(&q,1);
500 zOrigDate = db_column_text(&q, 4);
501 @ <div class="section">Overview</div>
@@ -559,22 +563,33 @@
563 while( db_step(&q)==SQLITE_ROW ){
564 const char *zTagName = db_column_text(&q, 0);
565 @ | %z(href("%R/timeline?r=%T",zTagName))%h(zTagName)</a>
566 }
567 db_finalize(&q);
 
 
 
 
568 if( g.perm.Zip ){
569 char *zUrl = mprintf("%R/tarball/%s-%S.tar.gz?uuid=%s",
570 zProjName, zUuid, zUuid);
571 @ </td></tr>
572 @ <tr><th>Downloads:</th><td>
573 @ %z(href("%s",zUrl))Tarball</a>
574 @ | %z(href("%R/zip/%s-%S.zip?uuid=%s",zProjName,zUuid,zUuid))
575 @ ZIP archive</a>
576 fossil_free(zUrl);
577 }
578 #if 0
579 if( isLeaf && fossil_strcmp(zBranch,"trunk")!=0 ){
580 @ </td></tr>
581 @ <tr><th>Diffs:</th><td>
582 @ %z(href("%R/vdiff?branch=%t",zBranch))Changes in %h(zBranch)</a>
583 @ | %z(href("%R/vdiff?from=trunk&to=%t",zBranch))Changes
584 @ from trunk</a>
585 }
586 #endif
587 @ </td></tr>
588 @ <tr><th>Other&nbsp;Links:</th>
589 @ <td>
590 @ %z(href("%R/dir?ci=%S",zUuid))files</a>
591 @ | %z(href("%R/artifact/%S",zUuid))manifest</a>
592 if( g.perm.Write ){
593 @ | %z(href("%R/ci_edit?r=%S",zUuid))edit</a>
594 }
595 @ </td>
596
+4 -1
--- src/th.c
+++ src/th.c
@@ -2477,19 +2477,22 @@
24772477
return *z==0;
24782478
}
24792479
24802480
/*
24812481
** The string z[] is an ascii representation of a real number.
2482
-** Convert this string to a double.
2482
+** Convert this string to a double and assigns its value to
2483
+** pResult.
24832484
**
24842485
** This routine assumes that z[] really is a valid number. If it
24852486
** is not, the result is undefined.
24862487
**
24872488
** This routine is used instead of the library atof() function because
24882489
** the library atof() might want to use "," as the decimal point instead
24892490
** of "." depending on how locale is set. But that would cause problems
24902491
** for SQL. So this routine always uses "." regardless of locale.
2492
+**
2493
+** Returns the number of bytes of z consumed in parsing the value.
24912494
*/
24922495
static int sqlite3AtoF(const char *z, double *pResult){
24932496
int sign = 1;
24942497
const char *zBegin = z;
24952498
LONGDOUBLE_TYPE v1 = 0.0;
24962499
--- src/th.c
+++ src/th.c
@@ -2477,19 +2477,22 @@
2477 return *z==0;
2478 }
2479
2480 /*
2481 ** The string z[] is an ascii representation of a real number.
2482 ** Convert this string to a double.
 
2483 **
2484 ** This routine assumes that z[] really is a valid number. If it
2485 ** is not, the result is undefined.
2486 **
2487 ** This routine is used instead of the library atof() function because
2488 ** the library atof() might want to use "," as the decimal point instead
2489 ** of "." depending on how locale is set. But that would cause problems
2490 ** for SQL. So this routine always uses "." regardless of locale.
 
 
2491 */
2492 static int sqlite3AtoF(const char *z, double *pResult){
2493 int sign = 1;
2494 const char *zBegin = z;
2495 LONGDOUBLE_TYPE v1 = 0.0;
2496
--- src/th.c
+++ src/th.c
@@ -2477,19 +2477,22 @@
2477 return *z==0;
2478 }
2479
2480 /*
2481 ** The string z[] is an ascii representation of a real number.
2482 ** Convert this string to a double and assigns its value to
2483 ** pResult.
2484 **
2485 ** This routine assumes that z[] really is a valid number. If it
2486 ** is not, the result is undefined.
2487 **
2488 ** This routine is used instead of the library atof() function because
2489 ** the library atof() might want to use "," as the decimal point instead
2490 ** of "." depending on how locale is set. But that would cause problems
2491 ** for SQL. So this routine always uses "." regardless of locale.
2492 **
2493 ** Returns the number of bytes of z consumed in parsing the value.
2494 */
2495 static int sqlite3AtoF(const char *z, double *pResult){
2496 int sign = 1;
2497 const char *zBegin = z;
2498 LONGDOUBLE_TYPE v1 = 0.0;
2499
+4 -1
--- src/th.c
+++ src/th.c
@@ -2477,19 +2477,22 @@
24772477
return *z==0;
24782478
}
24792479
24802480
/*
24812481
** The string z[] is an ascii representation of a real number.
2482
-** Convert this string to a double.
2482
+** Convert this string to a double and assigns its value to
2483
+** pResult.
24832484
**
24842485
** This routine assumes that z[] really is a valid number. If it
24852486
** is not, the result is undefined.
24862487
**
24872488
** This routine is used instead of the library atof() function because
24882489
** the library atof() might want to use "," as the decimal point instead
24892490
** of "." depending on how locale is set. But that would cause problems
24902491
** for SQL. So this routine always uses "." regardless of locale.
2492
+**
2493
+** Returns the number of bytes of z consumed in parsing the value.
24912494
*/
24922495
static int sqlite3AtoF(const char *z, double *pResult){
24932496
int sign = 1;
24942497
const char *zBegin = z;
24952498
LONGDOUBLE_TYPE v1 = 0.0;
24962499
--- src/th.c
+++ src/th.c
@@ -2477,19 +2477,22 @@
2477 return *z==0;
2478 }
2479
2480 /*
2481 ** The string z[] is an ascii representation of a real number.
2482 ** Convert this string to a double.
 
2483 **
2484 ** This routine assumes that z[] really is a valid number. If it
2485 ** is not, the result is undefined.
2486 **
2487 ** This routine is used instead of the library atof() function because
2488 ** the library atof() might want to use "," as the decimal point instead
2489 ** of "." depending on how locale is set. But that would cause problems
2490 ** for SQL. So this routine always uses "." regardless of locale.
 
 
2491 */
2492 static int sqlite3AtoF(const char *z, double *pResult){
2493 int sign = 1;
2494 const char *zBegin = z;
2495 LONGDOUBLE_TYPE v1 = 0.0;
2496
--- src/th.c
+++ src/th.c
@@ -2477,19 +2477,22 @@
2477 return *z==0;
2478 }
2479
2480 /*
2481 ** The string z[] is an ascii representation of a real number.
2482 ** Convert this string to a double and assigns its value to
2483 ** pResult.
2484 **
2485 ** This routine assumes that z[] really is a valid number. If it
2486 ** is not, the result is undefined.
2487 **
2488 ** This routine is used instead of the library atof() function because
2489 ** the library atof() might want to use "," as the decimal point instead
2490 ** of "." depending on how locale is set. But that would cause problems
2491 ** for SQL. So this routine always uses "." regardless of locale.
2492 **
2493 ** Returns the number of bytes of z consumed in parsing the value.
2494 */
2495 static int sqlite3AtoF(const char *z, double *pResult){
2496 int sign = 1;
2497 const char *zBegin = z;
2498 LONGDOUBLE_TYPE v1 = 0.0;
2499

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button