Fossil SCM

Add the dont-push setting to help facilitate private branches.

drh 2009-09-04 19:28 trunk
Commit d1b948b0c73f24c143b0cc2f395754fcb3ffd695
2 files changed +4 +3
+4
--- src/db.c
+++ src/db.c
@@ -1432,10 +1432,13 @@
14321432
** after commit or tag or branch creation.
14331433
**
14341434
** diff-command External command to run when performing a diff.
14351435
** If undefined, the internal text diff will be used.
14361436
**
1437
+** dont-push Prevent this repository from pushing from client to
1438
+** server. Useful when setting up a private branch.
1439
+**
14371440
** editor Text editor command used for check-in comments.
14381441
**
14391442
** http-port The TCP/IP port number to use by the "server"
14401443
** and "ui" commands. Default: 8080
14411444
**
@@ -1469,10 +1472,11 @@
14691472
*/
14701473
void setting_cmd(void){
14711474
static const char *azName[] = {
14721475
"autosync",
14731476
"diff-command",
1477
+ "dont-push",
14741478
"editor",
14751479
"gdiff-command",
14761480
"http-port",
14771481
"localauth",
14781482
"clearsign",
14791483
--- src/db.c
+++ src/db.c
@@ -1432,10 +1432,13 @@
1432 ** after commit or tag or branch creation.
1433 **
1434 ** diff-command External command to run when performing a diff.
1435 ** If undefined, the internal text diff will be used.
1436 **
 
 
 
1437 ** editor Text editor command used for check-in comments.
1438 **
1439 ** http-port The TCP/IP port number to use by the "server"
1440 ** and "ui" commands. Default: 8080
1441 **
@@ -1469,10 +1472,11 @@
1469 */
1470 void setting_cmd(void){
1471 static const char *azName[] = {
1472 "autosync",
1473 "diff-command",
 
1474 "editor",
1475 "gdiff-command",
1476 "http-port",
1477 "localauth",
1478 "clearsign",
1479
--- src/db.c
+++ src/db.c
@@ -1432,10 +1432,13 @@
1432 ** after commit or tag or branch creation.
1433 **
1434 ** diff-command External command to run when performing a diff.
1435 ** If undefined, the internal text diff will be used.
1436 **
1437 ** dont-push Prevent this repository from pushing from client to
1438 ** server. Useful when setting up a private branch.
1439 **
1440 ** editor Text editor command used for check-in comments.
1441 **
1442 ** http-port The TCP/IP port number to use by the "server"
1443 ** and "ui" commands. Default: 8080
1444 **
@@ -1469,10 +1472,11 @@
1472 */
1473 void setting_cmd(void){
1474 static const char *azName[] = {
1475 "autosync",
1476 "diff-command",
1477 "dont-push",
1478 "editor",
1479 "gdiff-command",
1480 "http-port",
1481 "localauth",
1482 "clearsign",
1483
+3
--- src/xfer.c
+++ src/xfer.c
@@ -894,10 +894,13 @@
894894
Blob send; /* Text we are sending to the server */
895895
Blob recv; /* Reply we got back from the server */
896896
Xfer xfer; /* Transfer data */
897897
const char *zSCode = db_get("server-code", "x");
898898
const char *zPCode = db_get("project-code", 0);
899
+
900
+ if( db_get_boolean("dont-push", 0) ) pushFlag = 0;
901
+ if( pushFlag + pullFlag + cloneFlag == 0 ) return;
899902
900903
transport_stats(0, 0, 1);
901904
socket_global_init();
902905
memset(&xfer, 0, sizeof(xfer));
903906
xfer.pIn = &recv;
904907
--- src/xfer.c
+++ src/xfer.c
@@ -894,10 +894,13 @@
894 Blob send; /* Text we are sending to the server */
895 Blob recv; /* Reply we got back from the server */
896 Xfer xfer; /* Transfer data */
897 const char *zSCode = db_get("server-code", "x");
898 const char *zPCode = db_get("project-code", 0);
 
 
 
899
900 transport_stats(0, 0, 1);
901 socket_global_init();
902 memset(&xfer, 0, sizeof(xfer));
903 xfer.pIn = &recv;
904
--- src/xfer.c
+++ src/xfer.c
@@ -894,10 +894,13 @@
894 Blob send; /* Text we are sending to the server */
895 Blob recv; /* Reply we got back from the server */
896 Xfer xfer; /* Transfer data */
897 const char *zSCode = db_get("server-code", "x");
898 const char *zPCode = db_get("project-code", 0);
899
900 if( db_get_boolean("dont-push", 0) ) pushFlag = 0;
901 if( pushFlag + pullFlag + cloneFlag == 0 ) return;
902
903 transport_stats(0, 0, 1);
904 socket_global_init();
905 memset(&xfer, 0, sizeof(xfer));
906 xfer.pIn = &recv;
907

Keyboard Shortcuts

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