Fossil SCM

Merge in the latest changes from trunk.

drh 2011-08-23 15:27 symlinks merge
Commit 6c880a4f5e664bafd06a2510adfaae8c66b875e9
4 files changed +1 -1 +24 -3 +24 -3 +2 -1
+1 -1
--- src/branch.c
+++ src/branch.c
@@ -174,11 +174,11 @@
174174
175175
/* Commit */
176176
db_end_transaction(0);
177177
178178
/* Do an autosync push, if requested */
179
- autosync(AUTOSYNC_PUSH);
179
+ if( !isPrivate ) autosync(AUTOSYNC_PUSH);
180180
}
181181
182182
/*
183183
** Prepare a query that will list all branches.
184184
*/
185185
--- src/branch.c
+++ src/branch.c
@@ -174,11 +174,11 @@
174
175 /* Commit */
176 db_end_transaction(0);
177
178 /* Do an autosync push, if requested */
179 autosync(AUTOSYNC_PUSH);
180 }
181
182 /*
183 ** Prepare a query that will list all branches.
184 */
185
--- src/branch.c
+++ src/branch.c
@@ -174,11 +174,11 @@
174
175 /* Commit */
176 db_end_transaction(0);
177
178 /* Do an autosync push, if requested */
179 if( !isPrivate ) autosync(AUTOSYNC_PUSH);
180 }
181
182 /*
183 ** Prepare a query that will list all branches.
184 */
185
+24 -3
--- src/db.c
+++ src/db.c
@@ -1435,15 +1435,30 @@
14351435
** .fossil-settings/<name> , and emits warnings if necessary.
14361436
** Returns the non-versioned value without modification if there is no
14371437
** versioned value.
14381438
*/
14391439
static char *db_get_do_versionable(const char *zName, char *zNonVersionedSetting){
1440
- /* Attempt to load the versioned setting from a checked out file */
14411440
char *zVersionedSetting = 0;
14421441
int noWarn = 0;
1443
-
1444
- if( db_open_local() ){
1442
+ struct _cacheEntry {
1443
+ struct _cacheEntry *next;
1444
+ const char *zName, *zValue;
1445
+ } *cacheEntry = 0;
1446
+ static struct _cacheEntry *cache = 0;
1447
+
1448
+ /* Look up name in cache */
1449
+ cacheEntry = cache;
1450
+ while( cacheEntry!=0 ){
1451
+ if( fossil_strcmp(cacheEntry->zName, zName)==0 ){
1452
+ zVersionedSetting = fossil_strdup(cacheEntry->zValue);
1453
+ break;
1454
+ }
1455
+ cacheEntry = cacheEntry->next;
1456
+ }
1457
+ /* Attempt to read value from file in checkout if there wasn't a cache hit
1458
+ ** and a checkout is open. */
1459
+ if( cacheEntry==0 && db_open_local() ){
14451460
Blob versionedPathname;
14461461
char *zVersionedPathname;
14471462
blob_zero(&versionedPathname);
14481463
blob_appendf(&versionedPathname, "%s/.fossil-settings/%s",
14491464
g.zLocalRoot, zName);
@@ -1464,10 +1479,16 @@
14641479
if( file_size(blob_str(&versionedPathname))>=0 ){
14651480
noWarn = 1;
14661481
}
14671482
}
14681483
blob_reset(&versionedPathname);
1484
+ /* Store result in cache, which can be the value or 0 if not found */
1485
+ cacheEntry = (struct _cacheEntry*)fossil_malloc(sizeof(struct _cacheEntry));
1486
+ cacheEntry->next = cache;
1487
+ cacheEntry->zName = zName;
1488
+ cacheEntry->zValue = fossil_strdup(zVersionedSetting);
1489
+ cache = cacheEntry;
14691490
}
14701491
/* Display a warning? */
14711492
if( zVersionedSetting!=0 && zNonVersionedSetting!=0
14721493
&& zNonVersionedSetting[0]!='\0' && !noWarn
14731494
){
14741495
--- src/db.c
+++ src/db.c
@@ -1435,15 +1435,30 @@
1435 ** .fossil-settings/<name> , and emits warnings if necessary.
1436 ** Returns the non-versioned value without modification if there is no
1437 ** versioned value.
1438 */
1439 static char *db_get_do_versionable(const char *zName, char *zNonVersionedSetting){
1440 /* Attempt to load the versioned setting from a checked out file */
1441 char *zVersionedSetting = 0;
1442 int noWarn = 0;
1443
1444 if( db_open_local() ){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1445 Blob versionedPathname;
1446 char *zVersionedPathname;
1447 blob_zero(&versionedPathname);
1448 blob_appendf(&versionedPathname, "%s/.fossil-settings/%s",
1449 g.zLocalRoot, zName);
@@ -1464,10 +1479,16 @@
1464 if( file_size(blob_str(&versionedPathname))>=0 ){
1465 noWarn = 1;
1466 }
1467 }
1468 blob_reset(&versionedPathname);
 
 
 
 
 
 
1469 }
1470 /* Display a warning? */
1471 if( zVersionedSetting!=0 && zNonVersionedSetting!=0
1472 && zNonVersionedSetting[0]!='\0' && !noWarn
1473 ){
1474
--- src/db.c
+++ src/db.c
@@ -1435,15 +1435,30 @@
1435 ** .fossil-settings/<name> , and emits warnings if necessary.
1436 ** Returns the non-versioned value without modification if there is no
1437 ** versioned value.
1438 */
1439 static char *db_get_do_versionable(const char *zName, char *zNonVersionedSetting){
 
1440 char *zVersionedSetting = 0;
1441 int noWarn = 0;
1442 struct _cacheEntry {
1443 struct _cacheEntry *next;
1444 const char *zName, *zValue;
1445 } *cacheEntry = 0;
1446 static struct _cacheEntry *cache = 0;
1447
1448 /* Look up name in cache */
1449 cacheEntry = cache;
1450 while( cacheEntry!=0 ){
1451 if( fossil_strcmp(cacheEntry->zName, zName)==0 ){
1452 zVersionedSetting = fossil_strdup(cacheEntry->zValue);
1453 break;
1454 }
1455 cacheEntry = cacheEntry->next;
1456 }
1457 /* Attempt to read value from file in checkout if there wasn't a cache hit
1458 ** and a checkout is open. */
1459 if( cacheEntry==0 && db_open_local() ){
1460 Blob versionedPathname;
1461 char *zVersionedPathname;
1462 blob_zero(&versionedPathname);
1463 blob_appendf(&versionedPathname, "%s/.fossil-settings/%s",
1464 g.zLocalRoot, zName);
@@ -1464,10 +1479,16 @@
1479 if( file_size(blob_str(&versionedPathname))>=0 ){
1480 noWarn = 1;
1481 }
1482 }
1483 blob_reset(&versionedPathname);
1484 /* Store result in cache, which can be the value or 0 if not found */
1485 cacheEntry = (struct _cacheEntry*)fossil_malloc(sizeof(struct _cacheEntry));
1486 cacheEntry->next = cache;
1487 cacheEntry->zName = zName;
1488 cacheEntry->zValue = fossil_strdup(zVersionedSetting);
1489 cache = cacheEntry;
1490 }
1491 /* Display a warning? */
1492 if( zVersionedSetting!=0 && zNonVersionedSetting!=0
1493 && zNonVersionedSetting[0]!='\0' && !noWarn
1494 ){
1495
+24 -3
--- src/db.c
+++ src/db.c
@@ -1435,15 +1435,30 @@
14351435
** .fossil-settings/<name> , and emits warnings if necessary.
14361436
** Returns the non-versioned value without modification if there is no
14371437
** versioned value.
14381438
*/
14391439
static char *db_get_do_versionable(const char *zName, char *zNonVersionedSetting){
1440
- /* Attempt to load the versioned setting from a checked out file */
14411440
char *zVersionedSetting = 0;
14421441
int noWarn = 0;
1443
-
1444
- if( db_open_local() ){
1442
+ struct _cacheEntry {
1443
+ struct _cacheEntry *next;
1444
+ const char *zName, *zValue;
1445
+ } *cacheEntry = 0;
1446
+ static struct _cacheEntry *cache = 0;
1447
+
1448
+ /* Look up name in cache */
1449
+ cacheEntry = cache;
1450
+ while( cacheEntry!=0 ){
1451
+ if( fossil_strcmp(cacheEntry->zName, zName)==0 ){
1452
+ zVersionedSetting = fossil_strdup(cacheEntry->zValue);
1453
+ break;
1454
+ }
1455
+ cacheEntry = cacheEntry->next;
1456
+ }
1457
+ /* Attempt to read value from file in checkout if there wasn't a cache hit
1458
+ ** and a checkout is open. */
1459
+ if( cacheEntry==0 && db_open_local() ){
14451460
Blob versionedPathname;
14461461
char *zVersionedPathname;
14471462
blob_zero(&versionedPathname);
14481463
blob_appendf(&versionedPathname, "%s/.fossil-settings/%s",
14491464
g.zLocalRoot, zName);
@@ -1464,10 +1479,16 @@
14641479
if( file_size(blob_str(&versionedPathname))>=0 ){
14651480
noWarn = 1;
14661481
}
14671482
}
14681483
blob_reset(&versionedPathname);
1484
+ /* Store result in cache, which can be the value or 0 if not found */
1485
+ cacheEntry = (struct _cacheEntry*)fossil_malloc(sizeof(struct _cacheEntry));
1486
+ cacheEntry->next = cache;
1487
+ cacheEntry->zName = zName;
1488
+ cacheEntry->zValue = fossil_strdup(zVersionedSetting);
1489
+ cache = cacheEntry;
14691490
}
14701491
/* Display a warning? */
14711492
if( zVersionedSetting!=0 && zNonVersionedSetting!=0
14721493
&& zNonVersionedSetting[0]!='\0' && !noWarn
14731494
){
14741495
--- src/db.c
+++ src/db.c
@@ -1435,15 +1435,30 @@
1435 ** .fossil-settings/<name> , and emits warnings if necessary.
1436 ** Returns the non-versioned value without modification if there is no
1437 ** versioned value.
1438 */
1439 static char *db_get_do_versionable(const char *zName, char *zNonVersionedSetting){
1440 /* Attempt to load the versioned setting from a checked out file */
1441 char *zVersionedSetting = 0;
1442 int noWarn = 0;
1443
1444 if( db_open_local() ){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1445 Blob versionedPathname;
1446 char *zVersionedPathname;
1447 blob_zero(&versionedPathname);
1448 blob_appendf(&versionedPathname, "%s/.fossil-settings/%s",
1449 g.zLocalRoot, zName);
@@ -1464,10 +1479,16 @@
1464 if( file_size(blob_str(&versionedPathname))>=0 ){
1465 noWarn = 1;
1466 }
1467 }
1468 blob_reset(&versionedPathname);
 
 
 
 
 
 
1469 }
1470 /* Display a warning? */
1471 if( zVersionedSetting!=0 && zNonVersionedSetting!=0
1472 && zNonVersionedSetting[0]!='\0' && !noWarn
1473 ){
1474
--- src/db.c
+++ src/db.c
@@ -1435,15 +1435,30 @@
1435 ** .fossil-settings/<name> , and emits warnings if necessary.
1436 ** Returns the non-versioned value without modification if there is no
1437 ** versioned value.
1438 */
1439 static char *db_get_do_versionable(const char *zName, char *zNonVersionedSetting){
 
1440 char *zVersionedSetting = 0;
1441 int noWarn = 0;
1442 struct _cacheEntry {
1443 struct _cacheEntry *next;
1444 const char *zName, *zValue;
1445 } *cacheEntry = 0;
1446 static struct _cacheEntry *cache = 0;
1447
1448 /* Look up name in cache */
1449 cacheEntry = cache;
1450 while( cacheEntry!=0 ){
1451 if( fossil_strcmp(cacheEntry->zName, zName)==0 ){
1452 zVersionedSetting = fossil_strdup(cacheEntry->zValue);
1453 break;
1454 }
1455 cacheEntry = cacheEntry->next;
1456 }
1457 /* Attempt to read value from file in checkout if there wasn't a cache hit
1458 ** and a checkout is open. */
1459 if( cacheEntry==0 && db_open_local() ){
1460 Blob versionedPathname;
1461 char *zVersionedPathname;
1462 blob_zero(&versionedPathname);
1463 blob_appendf(&versionedPathname, "%s/.fossil-settings/%s",
1464 g.zLocalRoot, zName);
@@ -1464,10 +1479,16 @@
1479 if( file_size(blob_str(&versionedPathname))>=0 ){
1480 noWarn = 1;
1481 }
1482 }
1483 blob_reset(&versionedPathname);
1484 /* Store result in cache, which can be the value or 0 if not found */
1485 cacheEntry = (struct _cacheEntry*)fossil_malloc(sizeof(struct _cacheEntry));
1486 cacheEntry->next = cache;
1487 cacheEntry->zName = zName;
1488 cacheEntry->zValue = fossil_strdup(zVersionedSetting);
1489 cache = cacheEntry;
1490 }
1491 /* Display a warning? */
1492 if( zVersionedSetting!=0 && zNonVersionedSetting!=0
1493 && zNonVersionedSetting[0]!='\0' && !noWarn
1494 ){
1495
+2 -1
--- src/timeline.c
+++ src/timeline.c
@@ -1081,11 +1081,12 @@
10811081
}else if( zType[0]=='e' ){
10821082
zEType = "event";
10831083
}
10841084
}
10851085
if( zUser ){
1086
- blob_appendf(&sql, " AND event.user=%Q", zUser);
1086
+ blob_appendf(&sql, " AND (event.user=%Q OR event.euser=%Q)",
1087
+ zUser, zUser);
10871088
url_add_parameter(&url, "u", zUser);
10881089
zThisUser = zUser;
10891090
}
10901091
if ( zSearch ){
10911092
blob_appendf(&sql,
10921093
--- src/timeline.c
+++ src/timeline.c
@@ -1081,11 +1081,12 @@
1081 }else if( zType[0]=='e' ){
1082 zEType = "event";
1083 }
1084 }
1085 if( zUser ){
1086 blob_appendf(&sql, " AND event.user=%Q", zUser);
 
1087 url_add_parameter(&url, "u", zUser);
1088 zThisUser = zUser;
1089 }
1090 if ( zSearch ){
1091 blob_appendf(&sql,
1092
--- src/timeline.c
+++ src/timeline.c
@@ -1081,11 +1081,12 @@
1081 }else if( zType[0]=='e' ){
1082 zEType = "event";
1083 }
1084 }
1085 if( zUser ){
1086 blob_appendf(&sql, " AND (event.user=%Q OR event.euser=%Q)",
1087 zUser, zUser);
1088 url_add_parameter(&url, "u", zUser);
1089 zThisUser = zUser;
1090 }
1091 if ( zSearch ){
1092 blob_appendf(&sql,
1093

Keyboard Shortcuts

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