Fossil SCM

Pull in the latest fixes from the trunk.

drh 2010-01-20 15:55 clear-title merge
Commit a3161f5f1f7d8bbb8bf3d88e6468608e7373c9d0
+4 -3
--- src/db.c
+++ src/db.c
@@ -1463,13 +1463,14 @@
14631463
** With a value argument it changes the property for the current repository.
14641464
**
14651465
** The "unset" command clears a property setting.
14661466
**
14671467
**
1468
-** autosync If enabled, automatically pull prior to
1469
-** commit or update and automatically push
1470
-** after commit or tag or branch creation.
1468
+** autosync If enabled, automatically pull prior to commit
1469
+** or update and automatically push after commit or
1470
+** tag or branch creation. If the the value is "pullonly"
1471
+** then only pull operations occur automatically.
14711472
**
14721473
** clearsign When enabled (the default), fossil will attempt to
14731474
** sign all commits with gpg. When disabled, commits will
14741475
** be unsigned.
14751476
**
14761477
--- src/db.c
+++ src/db.c
@@ -1463,13 +1463,14 @@
1463 ** With a value argument it changes the property for the current repository.
1464 **
1465 ** The "unset" command clears a property setting.
1466 **
1467 **
1468 ** autosync If enabled, automatically pull prior to
1469 ** commit or update and automatically push
1470 ** after commit or tag or branch creation.
 
1471 **
1472 ** clearsign When enabled (the default), fossil will attempt to
1473 ** sign all commits with gpg. When disabled, commits will
1474 ** be unsigned.
1475 **
1476
--- src/db.c
+++ src/db.c
@@ -1463,13 +1463,14 @@
1463 ** With a value argument it changes the property for the current repository.
1464 **
1465 ** The "unset" command clears a property setting.
1466 **
1467 **
1468 ** autosync If enabled, automatically pull prior to commit
1469 ** or update and automatically push after commit or
1470 ** tag or branch creation. If the the value is "pullonly"
1471 ** then only pull operations occur automatically.
1472 **
1473 ** clearsign When enabled (the default), fossil will attempt to
1474 ** sign all commits with gpg. When disabled, commits will
1475 ** be unsigned.
1476 **
1477
+4 -3
--- src/db.c
+++ src/db.c
@@ -1463,13 +1463,14 @@
14631463
** With a value argument it changes the property for the current repository.
14641464
**
14651465
** The "unset" command clears a property setting.
14661466
**
14671467
**
1468
-** autosync If enabled, automatically pull prior to
1469
-** commit or update and automatically push
1470
-** after commit or tag or branch creation.
1468
+** autosync If enabled, automatically pull prior to commit
1469
+** or update and automatically push after commit or
1470
+** tag or branch creation. If the the value is "pullonly"
1471
+** then only pull operations occur automatically.
14711472
**
14721473
** clearsign When enabled (the default), fossil will attempt to
14731474
** sign all commits with gpg. When disabled, commits will
14741475
** be unsigned.
14751476
**
14761477
--- src/db.c
+++ src/db.c
@@ -1463,13 +1463,14 @@
1463 ** With a value argument it changes the property for the current repository.
1464 **
1465 ** The "unset" command clears a property setting.
1466 **
1467 **
1468 ** autosync If enabled, automatically pull prior to
1469 ** commit or update and automatically push
1470 ** after commit or tag or branch creation.
 
1471 **
1472 ** clearsign When enabled (the default), fossil will attempt to
1473 ** sign all commits with gpg. When disabled, commits will
1474 ** be unsigned.
1475 **
1476
--- src/db.c
+++ src/db.c
@@ -1463,13 +1463,14 @@
1463 ** With a value argument it changes the property for the current repository.
1464 **
1465 ** The "unset" command clears a property setting.
1466 **
1467 **
1468 ** autosync If enabled, automatically pull prior to commit
1469 ** or update and automatically push after commit or
1470 ** tag or branch creation. If the the value is "pullonly"
1471 ** then only pull operations occur automatically.
1472 **
1473 ** clearsign When enabled (the default), fossil will attempt to
1474 ** sign all commits with gpg. When disabled, commits will
1475 ** be unsigned.
1476 **
1477
+5 -4
--- src/info.c
+++ src/info.c
@@ -1060,19 +1060,20 @@
10601060
Blob uuid;
10611061
int rid;
10621062
10631063
zName = P("name");
10641064
if( zName==0 ) fossil_redirect_home();
1065
+ if( validate16(zName, strlen(zName))
1066
+ && db_exists("SELECT 1 FROM ticket WHERE tkt_uuid LIKE '%q%%'", zName) ){
1067
+ tktview_page();
1068
+ return;
1069
+ }
10651070
blob_set(&uuid, zName);
10661071
if( name_to_uuid(&uuid, 1) ){
10671072
fossil_redirect_home();
10681073
}
10691074
zName = blob_str(&uuid);
1070
- if( db_exists("SELECT 1 FROM ticket WHERE tkt_uuid='%s'", zName) ){
1071
- tktview_page();
1072
- return;
1073
- }
10741075
rid = db_int(0, "SELECT rid FROM blob WHERE uuid='%s'", zName);
10751076
if( rid==0 ){
10761077
style_header("Broken Link");
10771078
@ <p>No such object: %h(zName)</p>
10781079
style_footer();
10791080
--- src/info.c
+++ src/info.c
@@ -1060,19 +1060,20 @@
1060 Blob uuid;
1061 int rid;
1062
1063 zName = P("name");
1064 if( zName==0 ) fossil_redirect_home();
 
 
 
 
 
1065 blob_set(&uuid, zName);
1066 if( name_to_uuid(&uuid, 1) ){
1067 fossil_redirect_home();
1068 }
1069 zName = blob_str(&uuid);
1070 if( db_exists("SELECT 1 FROM ticket WHERE tkt_uuid='%s'", zName) ){
1071 tktview_page();
1072 return;
1073 }
1074 rid = db_int(0, "SELECT rid FROM blob WHERE uuid='%s'", zName);
1075 if( rid==0 ){
1076 style_header("Broken Link");
1077 @ <p>No such object: %h(zName)</p>
1078 style_footer();
1079
--- src/info.c
+++ src/info.c
@@ -1060,19 +1060,20 @@
1060 Blob uuid;
1061 int rid;
1062
1063 zName = P("name");
1064 if( zName==0 ) fossil_redirect_home();
1065 if( validate16(zName, strlen(zName))
1066 && db_exists("SELECT 1 FROM ticket WHERE tkt_uuid LIKE '%q%%'", zName) ){
1067 tktview_page();
1068 return;
1069 }
1070 blob_set(&uuid, zName);
1071 if( name_to_uuid(&uuid, 1) ){
1072 fossil_redirect_home();
1073 }
1074 zName = blob_str(&uuid);
 
 
 
 
1075 rid = db_int(0, "SELECT rid FROM blob WHERE uuid='%s'", zName);
1076 if( rid==0 ){
1077 style_header("Broken Link");
1078 @ <p>No such object: %h(zName)</p>
1079 style_footer();
1080
+11 -2
--- src/sync.c
+++ src/sync.c
@@ -41,15 +41,24 @@
4141
** autosync. This will be a pull if the argument is true or a push
4242
** if the argument is false.
4343
*/
4444
void autosync(int flags){
4545
const char *zUrl;
46
+ const char *zAutosync;
4647
if( g.fNoSync ){
4748
return;
4849
}
49
- if( db_get_boolean("autosync", 0)==0 ){
50
- return;
50
+ zAutosync = db_get("autosync", 0);
51
+ if( zAutosync ){
52
+ if( (flags & AUTOSYNC_PUSH)!=0 && memcmp(zAutosync,"pull",4)==0 ){
53
+ return; /* Do not auto-push when autosync=pullonly */
54
+ }
55
+ if( is_false(zAutosync) ){
56
+ return; /* Autosync is completely off */
57
+ }
58
+ }else{
59
+ /* Autosync defaults on. To make it default off, "return" here. */
5160
}
5261
zUrl = db_get("last-sync-url", 0);
5362
if( zUrl==0 ){
5463
return; /* No default server */
5564
}
5665
--- src/sync.c
+++ src/sync.c
@@ -41,15 +41,24 @@
41 ** autosync. This will be a pull if the argument is true or a push
42 ** if the argument is false.
43 */
44 void autosync(int flags){
45 const char *zUrl;
 
46 if( g.fNoSync ){
47 return;
48 }
49 if( db_get_boolean("autosync", 0)==0 ){
50 return;
 
 
 
 
 
 
 
 
51 }
52 zUrl = db_get("last-sync-url", 0);
53 if( zUrl==0 ){
54 return; /* No default server */
55 }
56
--- src/sync.c
+++ src/sync.c
@@ -41,15 +41,24 @@
41 ** autosync. This will be a pull if the argument is true or a push
42 ** if the argument is false.
43 */
44 void autosync(int flags){
45 const char *zUrl;
46 const char *zAutosync;
47 if( g.fNoSync ){
48 return;
49 }
50 zAutosync = db_get("autosync", 0);
51 if( zAutosync ){
52 if( (flags & AUTOSYNC_PUSH)!=0 && memcmp(zAutosync,"pull",4)==0 ){
53 return; /* Do not auto-push when autosync=pullonly */
54 }
55 if( is_false(zAutosync) ){
56 return; /* Autosync is completely off */
57 }
58 }else{
59 /* Autosync defaults on. To make it default off, "return" here. */
60 }
61 zUrl = db_get("last-sync-url", 0);
62 if( zUrl==0 ){
63 return; /* No default server */
64 }
65
--- src/vfile.c
+++ src/vfile.c
@@ -235,10 +235,11 @@
235235
zName = db_column_text(&q, 1);
236236
rid = db_column_int(&q, 2);
237237
content_get(rid, &content);
238238
if( verbose ) printf("%s\n", &zName[nRepos]);
239239
blob_write_to_file(&content, zName);
240
+ blob_reset(&content);
240241
db_multi_exec("UPDATE vfile SET mtime=%lld WHERE id=%d",
241242
file_mtime(zName), id);
242243
}
243244
db_finalize(&q);
244245
}
245246
--- src/vfile.c
+++ src/vfile.c
@@ -235,10 +235,11 @@
235 zName = db_column_text(&q, 1);
236 rid = db_column_int(&q, 2);
237 content_get(rid, &content);
238 if( verbose ) printf("%s\n", &zName[nRepos]);
239 blob_write_to_file(&content, zName);
 
240 db_multi_exec("UPDATE vfile SET mtime=%lld WHERE id=%d",
241 file_mtime(zName), id);
242 }
243 db_finalize(&q);
244 }
245
--- src/vfile.c
+++ src/vfile.c
@@ -235,10 +235,11 @@
235 zName = db_column_text(&q, 1);
236 rid = db_column_int(&q, 2);
237 content_get(rid, &content);
238 if( verbose ) printf("%s\n", &zName[nRepos]);
239 blob_write_to_file(&content, zName);
240 blob_reset(&content);
241 db_multi_exec("UPDATE vfile SET mtime=%lld WHERE id=%d",
242 file_mtime(zName), id);
243 }
244 db_finalize(&q);
245 }
246

Keyboard Shortcuts

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