Fossil SCM
Add the ability to create a child-project repository that can pull from its parent repository but never push back.
Commit
dddc58da657a1a7cf09e271fe3fc0c21c0936fd3
Parent
4f3054bcb396e1f…
8 files changed
+1
-1
+13
+8
-2
+5
+18
-6
+17
+2
-1
+2
+1
-1
| --- src/bundle.c | ||
| +++ src/bundle.c | ||
| @@ -313,11 +313,11 @@ | ||
| 313 | 313 | " VALUES('mtime',datetime('now'));" |
| 314 | 314 | ); |
| 315 | 315 | db_multi_exec( |
| 316 | 316 | "INSERT INTO bconfig(bcname,bcvalue)" |
| 317 | 317 | " SELECT name, value FROM config" |
| 318 | - " WHERE name IN ('project-code');" | |
| 318 | + " WHERE name IN ('project-code','parent-project-code');" | |
| 319 | 319 | ); |
| 320 | 320 | |
| 321 | 321 | /* Directly copy content from the repository into the bundle as long |
| 322 | 322 | ** as the repository content is a delta from some other artifact that |
| 323 | 323 | ** is also in the bundle. |
| 324 | 324 |
| --- src/bundle.c | |
| +++ src/bundle.c | |
| @@ -313,11 +313,11 @@ | |
| 313 | " VALUES('mtime',datetime('now'));" |
| 314 | ); |
| 315 | db_multi_exec( |
| 316 | "INSERT INTO bconfig(bcname,bcvalue)" |
| 317 | " SELECT name, value FROM config" |
| 318 | " WHERE name IN ('project-code');" |
| 319 | ); |
| 320 | |
| 321 | /* Directly copy content from the repository into the bundle as long |
| 322 | ** as the repository content is a delta from some other artifact that |
| 323 | ** is also in the bundle. |
| 324 |
| --- src/bundle.c | |
| +++ src/bundle.c | |
| @@ -313,11 +313,11 @@ | |
| 313 | " VALUES('mtime',datetime('now'));" |
| 314 | ); |
| 315 | db_multi_exec( |
| 316 | "INSERT INTO bconfig(bcname,bcvalue)" |
| 317 | " SELECT name, value FROM config" |
| 318 | " WHERE name IN ('project-code','parent-project-code');" |
| 319 | ); |
| 320 | |
| 321 | /* Directly copy content from the repository into the bundle as long |
| 322 | ** as the repository content is a delta from some other artifact that |
| 323 | ** is also in the bundle. |
| 324 |
+13
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -154,10 +154,21 @@ | ||
| 154 | 154 | db_column_text(&s, 1)); |
| 155 | 155 | } |
| 156 | 156 | db_finalize(&s); |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | +/* | |
| 160 | +** Show the parent project, if any | |
| 161 | +*/ | |
| 162 | +static void showParentProject(void){ | |
| 163 | + const char *zParentCode; | |
| 164 | + zParentCode = db_get("parent-project-code",0); | |
| 165 | + if( zParentCode ){ | |
| 166 | + fossil_print("derived-from: %s %s\n", zParentCode, db_get("parent-project-name","")); | |
| 167 | + } | |
| 168 | +} | |
| 169 | + | |
| 159 | 170 | |
| 160 | 171 | /* |
| 161 | 172 | ** COMMAND: info |
| 162 | 173 | ** |
| 163 | 174 | ** Usage: %fossil info ?VERSION | REPOSITORY_FILENAME? ?OPTIONS? |
| @@ -189,10 +200,11 @@ | ||
| 189 | 200 | db_open_config(0, 0); |
| 190 | 201 | db_open_repository(g.argv[2]); |
| 191 | 202 | db_record_repository_filename(g.argv[2]); |
| 192 | 203 | fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>")); |
| 193 | 204 | fossil_print("project-code: %s\n", db_get("project-code", "<none>")); |
| 205 | + showParentProject(); | |
| 194 | 206 | extraRepoInfo(); |
| 195 | 207 | return; |
| 196 | 208 | } |
| 197 | 209 | db_find_and_open_repository(0,0); |
| 198 | 210 | verify_all_options(); |
| @@ -208,10 +220,11 @@ | ||
| 208 | 220 | if( verboseFlag ) extraRepoInfo(); |
| 209 | 221 | if( g.zConfigDbName ){ |
| 210 | 222 | fossil_print("config-db: %s\n", g.zConfigDbName); |
| 211 | 223 | } |
| 212 | 224 | fossil_print("project-code: %s\n", db_get("project-code", "")); |
| 225 | + showParentProject(); | |
| 213 | 226 | vid = g.localOpen ? db_lget_int("checkout", 0) : 0; |
| 214 | 227 | if( vid ){ |
| 215 | 228 | show_common_info(vid, "checkout:", 1, 1); |
| 216 | 229 | } |
| 217 | 230 | fossil_print("check-ins: %d\n", |
| 218 | 231 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -154,10 +154,21 @@ | |
| 154 | db_column_text(&s, 1)); |
| 155 | } |
| 156 | db_finalize(&s); |
| 157 | } |
| 158 | |
| 159 | |
| 160 | /* |
| 161 | ** COMMAND: info |
| 162 | ** |
| 163 | ** Usage: %fossil info ?VERSION | REPOSITORY_FILENAME? ?OPTIONS? |
| @@ -189,10 +200,11 @@ | |
| 189 | db_open_config(0, 0); |
| 190 | db_open_repository(g.argv[2]); |
| 191 | db_record_repository_filename(g.argv[2]); |
| 192 | fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>")); |
| 193 | fossil_print("project-code: %s\n", db_get("project-code", "<none>")); |
| 194 | extraRepoInfo(); |
| 195 | return; |
| 196 | } |
| 197 | db_find_and_open_repository(0,0); |
| 198 | verify_all_options(); |
| @@ -208,10 +220,11 @@ | |
| 208 | if( verboseFlag ) extraRepoInfo(); |
| 209 | if( g.zConfigDbName ){ |
| 210 | fossil_print("config-db: %s\n", g.zConfigDbName); |
| 211 | } |
| 212 | fossil_print("project-code: %s\n", db_get("project-code", "")); |
| 213 | vid = g.localOpen ? db_lget_int("checkout", 0) : 0; |
| 214 | if( vid ){ |
| 215 | show_common_info(vid, "checkout:", 1, 1); |
| 216 | } |
| 217 | fossil_print("check-ins: %d\n", |
| 218 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -154,10 +154,21 @@ | |
| 154 | db_column_text(&s, 1)); |
| 155 | } |
| 156 | db_finalize(&s); |
| 157 | } |
| 158 | |
| 159 | /* |
| 160 | ** Show the parent project, if any |
| 161 | */ |
| 162 | static void showParentProject(void){ |
| 163 | const char *zParentCode; |
| 164 | zParentCode = db_get("parent-project-code",0); |
| 165 | if( zParentCode ){ |
| 166 | fossil_print("derived-from: %s %s\n", zParentCode, db_get("parent-project-name","")); |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | |
| 171 | /* |
| 172 | ** COMMAND: info |
| 173 | ** |
| 174 | ** Usage: %fossil info ?VERSION | REPOSITORY_FILENAME? ?OPTIONS? |
| @@ -189,10 +200,11 @@ | |
| 200 | db_open_config(0, 0); |
| 201 | db_open_repository(g.argv[2]); |
| 202 | db_record_repository_filename(g.argv[2]); |
| 203 | fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>")); |
| 204 | fossil_print("project-code: %s\n", db_get("project-code", "<none>")); |
| 205 | showParentProject(); |
| 206 | extraRepoInfo(); |
| 207 | return; |
| 208 | } |
| 209 | db_find_and_open_repository(0,0); |
| 210 | verify_all_options(); |
| @@ -208,10 +220,11 @@ | |
| 220 | if( verboseFlag ) extraRepoInfo(); |
| 221 | if( g.zConfigDbName ){ |
| 222 | fossil_print("config-db: %s\n", g.zConfigDbName); |
| 223 | } |
| 224 | fossil_print("project-code: %s\n", db_get("project-code", "")); |
| 225 | showParentProject(); |
| 226 | vid = g.localOpen ? db_lget_int("checkout", 0) : 0; |
| 227 | if( vid ){ |
| 228 | show_common_info(vid, "checkout:", 1, 1); |
| 229 | } |
| 230 | fossil_print("check-ins: %d\n", |
| 231 |
+8
-2
| --- src/stat.c | ||
| +++ src/stat.c | ||
| @@ -147,13 +147,19 @@ | ||
| 147 | 147 | " + 0.99"); |
| 148 | 148 | @ %d(n) days or approximately %.2f(n/365.2425) years. |
| 149 | 149 | @ </td></tr> |
| 150 | 150 | p = db_get("project-code", 0); |
| 151 | 151 | if( p ){ |
| 152 | - @ <tr><th>Project ID:</th><td>%h(p)</td></tr> | |
| 152 | + @ <tr><th>Project ID:</th> | |
| 153 | + @ <td>%h(p) %h(db_get("project-name",""))</td></tr> | |
| 154 | + } | |
| 155 | + p = db_get("parent-project-code", 0); | |
| 156 | + if( p ){ | |
| 157 | + @ <tr><th>Parent Project ID:</th> | |
| 158 | + @ <td>%h(p) %h(db_get("parent-project-name",""))</td></tr> | |
| 153 | 159 | } |
| 154 | - @ <tr><th>Server ID:</th><td>%h(db_get("server-code",""))</td></tr> | |
| 160 | + /* @ <tr><th>Server ID:</th><td>%h(db_get("server-code",""))</td></tr> */ | |
| 155 | 161 | @ <tr><th>Fossil Version:</th><td> |
| 156 | 162 | @ %h(MANIFEST_DATE) %h(MANIFEST_VERSION) |
| 157 | 163 | @ (%h(RELEASE_VERSION)) [compiled using %h(COMPILER_NAME)] |
| 158 | 164 | @ </td></tr> |
| 159 | 165 | @ <tr><th>SQLite Version:</th><td>%.19s(sqlite3_sourceid()) |
| 160 | 166 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -147,13 +147,19 @@ | |
| 147 | " + 0.99"); |
| 148 | @ %d(n) days or approximately %.2f(n/365.2425) years. |
| 149 | @ </td></tr> |
| 150 | p = db_get("project-code", 0); |
| 151 | if( p ){ |
| 152 | @ <tr><th>Project ID:</th><td>%h(p)</td></tr> |
| 153 | } |
| 154 | @ <tr><th>Server ID:</th><td>%h(db_get("server-code",""))</td></tr> |
| 155 | @ <tr><th>Fossil Version:</th><td> |
| 156 | @ %h(MANIFEST_DATE) %h(MANIFEST_VERSION) |
| 157 | @ (%h(RELEASE_VERSION)) [compiled using %h(COMPILER_NAME)] |
| 158 | @ </td></tr> |
| 159 | @ <tr><th>SQLite Version:</th><td>%.19s(sqlite3_sourceid()) |
| 160 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -147,13 +147,19 @@ | |
| 147 | " + 0.99"); |
| 148 | @ %d(n) days or approximately %.2f(n/365.2425) years. |
| 149 | @ </td></tr> |
| 150 | p = db_get("project-code", 0); |
| 151 | if( p ){ |
| 152 | @ <tr><th>Project ID:</th> |
| 153 | @ <td>%h(p) %h(db_get("project-name",""))</td></tr> |
| 154 | } |
| 155 | p = db_get("parent-project-code", 0); |
| 156 | if( p ){ |
| 157 | @ <tr><th>Parent Project ID:</th> |
| 158 | @ <td>%h(p) %h(db_get("parent-project-name",""))</td></tr> |
| 159 | } |
| 160 | /* @ <tr><th>Server ID:</th><td>%h(db_get("server-code",""))</td></tr> */ |
| 161 | @ <tr><th>Fossil Version:</th><td> |
| 162 | @ %h(MANIFEST_DATE) %h(MANIFEST_VERSION) |
| 163 | @ (%h(RELEASE_VERSION)) [compiled using %h(COMPILER_NAME)] |
| 164 | @ </td></tr> |
| 165 | @ <tr><th>SQLite Version:</th><td>%.19s(sqlite3_sourceid()) |
| 166 |
+5
| --- src/sync.c | ||
| +++ src/sync.c | ||
| @@ -125,10 +125,11 @@ | ||
| 125 | 125 | urlOptional = 1; |
| 126 | 126 | urlFlags = 0; |
| 127 | 127 | } |
| 128 | 128 | zHttpAuth = find_option("httpauth","B",1); |
| 129 | 129 | if( find_option("once",0,0)!=0 ) urlFlags &= ~URL_REMEMBER; |
| 130 | + if( (*pSyncFlags) & SYNC_FROMPARENT ) urlFlags &= ~URL_REMEMBER; | |
| 130 | 131 | if( find_option("private",0,0)!=0 ){ |
| 131 | 132 | *pSyncFlags |= SYNC_PRIVATE; |
| 132 | 133 | } |
| 133 | 134 | if( find_option("verbose","v",0)!=0 ){ |
| 134 | 135 | *pSyncFlags |= SYNC_VERBOSE; |
| @@ -188,10 +189,11 @@ | ||
| 188 | 189 | ** |
| 189 | 190 | ** Options: |
| 190 | 191 | ** |
| 191 | 192 | ** -B|--httpauth USER:PASS Credentials for the simple HTTP auth protocol, |
| 192 | 193 | ** if required by the remote website |
| 194 | +** --from-parent-project Pull content from the parent project | |
| 193 | 195 | ** --ipv4 Use only IPv4, not IPv6 |
| 194 | 196 | ** --once Do not remember URL for subsequent syncs |
| 195 | 197 | ** --proxy PROXY Use the specified HTTP proxy |
| 196 | 198 | ** --private Pull private branches too |
| 197 | 199 | ** -R|--repository REPO Repository to pull into |
| @@ -204,10 +206,13 @@ | ||
| 204 | 206 | ** See also: clone, config pull, push, remote-url, sync |
| 205 | 207 | */ |
| 206 | 208 | void pull_cmd(void){ |
| 207 | 209 | unsigned configFlags = 0; |
| 208 | 210 | unsigned syncFlags = SYNC_PULL; |
| 211 | + if( find_option("from-parent-project",0,0)!=0 ){ | |
| 212 | + syncFlags |= SYNC_FROMPARENT; | |
| 213 | + } | |
| 209 | 214 | process_sync_args(&configFlags, &syncFlags); |
| 210 | 215 | |
| 211 | 216 | /* We should be done with options.. */ |
| 212 | 217 | verify_all_options(); |
| 213 | 218 | |
| 214 | 219 |
| --- src/sync.c | |
| +++ src/sync.c | |
| @@ -125,10 +125,11 @@ | |
| 125 | urlOptional = 1; |
| 126 | urlFlags = 0; |
| 127 | } |
| 128 | zHttpAuth = find_option("httpauth","B",1); |
| 129 | if( find_option("once",0,0)!=0 ) urlFlags &= ~URL_REMEMBER; |
| 130 | if( find_option("private",0,0)!=0 ){ |
| 131 | *pSyncFlags |= SYNC_PRIVATE; |
| 132 | } |
| 133 | if( find_option("verbose","v",0)!=0 ){ |
| 134 | *pSyncFlags |= SYNC_VERBOSE; |
| @@ -188,10 +189,11 @@ | |
| 188 | ** |
| 189 | ** Options: |
| 190 | ** |
| 191 | ** -B|--httpauth USER:PASS Credentials for the simple HTTP auth protocol, |
| 192 | ** if required by the remote website |
| 193 | ** --ipv4 Use only IPv4, not IPv6 |
| 194 | ** --once Do not remember URL for subsequent syncs |
| 195 | ** --proxy PROXY Use the specified HTTP proxy |
| 196 | ** --private Pull private branches too |
| 197 | ** -R|--repository REPO Repository to pull into |
| @@ -204,10 +206,13 @@ | |
| 204 | ** See also: clone, config pull, push, remote-url, sync |
| 205 | */ |
| 206 | void pull_cmd(void){ |
| 207 | unsigned configFlags = 0; |
| 208 | unsigned syncFlags = SYNC_PULL; |
| 209 | process_sync_args(&configFlags, &syncFlags); |
| 210 | |
| 211 | /* We should be done with options.. */ |
| 212 | verify_all_options(); |
| 213 | |
| 214 |
| --- src/sync.c | |
| +++ src/sync.c | |
| @@ -125,10 +125,11 @@ | |
| 125 | urlOptional = 1; |
| 126 | urlFlags = 0; |
| 127 | } |
| 128 | zHttpAuth = find_option("httpauth","B",1); |
| 129 | if( find_option("once",0,0)!=0 ) urlFlags &= ~URL_REMEMBER; |
| 130 | if( (*pSyncFlags) & SYNC_FROMPARENT ) urlFlags &= ~URL_REMEMBER; |
| 131 | if( find_option("private",0,0)!=0 ){ |
| 132 | *pSyncFlags |= SYNC_PRIVATE; |
| 133 | } |
| 134 | if( find_option("verbose","v",0)!=0 ){ |
| 135 | *pSyncFlags |= SYNC_VERBOSE; |
| @@ -188,10 +189,11 @@ | |
| 189 | ** |
| 190 | ** Options: |
| 191 | ** |
| 192 | ** -B|--httpauth USER:PASS Credentials for the simple HTTP auth protocol, |
| 193 | ** if required by the remote website |
| 194 | ** --from-parent-project Pull content from the parent project |
| 195 | ** --ipv4 Use only IPv4, not IPv6 |
| 196 | ** --once Do not remember URL for subsequent syncs |
| 197 | ** --proxy PROXY Use the specified HTTP proxy |
| 198 | ** --private Pull private branches too |
| 199 | ** -R|--repository REPO Repository to pull into |
| @@ -204,10 +206,13 @@ | |
| 206 | ** See also: clone, config pull, push, remote-url, sync |
| 207 | */ |
| 208 | void pull_cmd(void){ |
| 209 | unsigned configFlags = 0; |
| 210 | unsigned syncFlags = SYNC_PULL; |
| 211 | if( find_option("from-parent-project",0,0)!=0 ){ |
| 212 | syncFlags |= SYNC_FROMPARENT; |
| 213 | } |
| 214 | process_sync_args(&configFlags, &syncFlags); |
| 215 | |
| 216 | /* We should be done with options.. */ |
| 217 | verify_all_options(); |
| 218 | |
| 219 |
+18
-6
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -1391,16 +1391,17 @@ | ||
| 1391 | 1391 | |
| 1392 | 1392 | #if INTERFACE |
| 1393 | 1393 | /* |
| 1394 | 1394 | ** Flag options for controlling client_sync() |
| 1395 | 1395 | */ |
| 1396 | -#define SYNC_PUSH 0x0001 | |
| 1397 | -#define SYNC_PULL 0x0002 | |
| 1398 | -#define SYNC_CLONE 0x0004 | |
| 1399 | -#define SYNC_PRIVATE 0x0008 | |
| 1400 | -#define SYNC_VERBOSE 0x0010 | |
| 1401 | -#define SYNC_RESYNC 0x0020 | |
| 1396 | +#define SYNC_PUSH 0x0001 | |
| 1397 | +#define SYNC_PULL 0x0002 | |
| 1398 | +#define SYNC_CLONE 0x0004 | |
| 1399 | +#define SYNC_PRIVATE 0x0008 | |
| 1400 | +#define SYNC_VERBOSE 0x0010 | |
| 1401 | +#define SYNC_RESYNC 0x0020 | |
| 1402 | +#define SYNC_FROMPARENT 0x0080 | |
| 1402 | 1403 | #endif |
| 1403 | 1404 | |
| 1404 | 1405 | /* |
| 1405 | 1406 | ** Floating-point absolute value |
| 1406 | 1407 | */ |
| @@ -1448,10 +1449,21 @@ | ||
| 1448 | 1449 | double rSkew = 0.0; /* Maximum time skew */ |
| 1449 | 1450 | |
| 1450 | 1451 | if( db_get_boolean("dont-push", 0) ) syncFlags &= ~SYNC_PUSH; |
| 1451 | 1452 | if( (syncFlags & (SYNC_PUSH|SYNC_PULL|SYNC_CLONE))==0 |
| 1452 | 1453 | && configRcvMask==0 && configSendMask==0 ) return 0; |
| 1454 | + if( syncFlags & SYNC_FROMPARENT ){ | |
| 1455 | + configRcvMask = 0; | |
| 1456 | + configSendMask = 0; | |
| 1457 | + syncFlags &= ~(SYNC_PUSH); | |
| 1458 | + zPCode = db_get("parent-project-code", 0); | |
| 1459 | + if( zPCode==0 || db_get("parent-project-name",0)==0 ){ | |
| 1460 | + fossil_fatal("there is no parent project: set the 'parent-project-code'" | |
| 1461 | + " and 'parent-project-name' config parameters set in order" | |
| 1462 | + " to pull from a parent project"); | |
| 1463 | + } | |
| 1464 | + } | |
| 1453 | 1465 | |
| 1454 | 1466 | transport_stats(0, 0, 1); |
| 1455 | 1467 | socket_global_init(); |
| 1456 | 1468 | memset(&xfer, 0, sizeof(xfer)); |
| 1457 | 1469 | xfer.pIn = &recv; |
| 1458 | 1470 | |
| 1459 | 1471 | ADDED www/childprojects.wiki |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -1391,16 +1391,17 @@ | |
| 1391 | |
| 1392 | #if INTERFACE |
| 1393 | /* |
| 1394 | ** Flag options for controlling client_sync() |
| 1395 | */ |
| 1396 | #define SYNC_PUSH 0x0001 |
| 1397 | #define SYNC_PULL 0x0002 |
| 1398 | #define SYNC_CLONE 0x0004 |
| 1399 | #define SYNC_PRIVATE 0x0008 |
| 1400 | #define SYNC_VERBOSE 0x0010 |
| 1401 | #define SYNC_RESYNC 0x0020 |
| 1402 | #endif |
| 1403 | |
| 1404 | /* |
| 1405 | ** Floating-point absolute value |
| 1406 | */ |
| @@ -1448,10 +1449,21 @@ | |
| 1448 | double rSkew = 0.0; /* Maximum time skew */ |
| 1449 | |
| 1450 | if( db_get_boolean("dont-push", 0) ) syncFlags &= ~SYNC_PUSH; |
| 1451 | if( (syncFlags & (SYNC_PUSH|SYNC_PULL|SYNC_CLONE))==0 |
| 1452 | && configRcvMask==0 && configSendMask==0 ) return 0; |
| 1453 | |
| 1454 | transport_stats(0, 0, 1); |
| 1455 | socket_global_init(); |
| 1456 | memset(&xfer, 0, sizeof(xfer)); |
| 1457 | xfer.pIn = &recv; |
| 1458 | |
| 1459 | DDED www/childprojects.wiki |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -1391,16 +1391,17 @@ | |
| 1391 | |
| 1392 | #if INTERFACE |
| 1393 | /* |
| 1394 | ** Flag options for controlling client_sync() |
| 1395 | */ |
| 1396 | #define SYNC_PUSH 0x0001 |
| 1397 | #define SYNC_PULL 0x0002 |
| 1398 | #define SYNC_CLONE 0x0004 |
| 1399 | #define SYNC_PRIVATE 0x0008 |
| 1400 | #define SYNC_VERBOSE 0x0010 |
| 1401 | #define SYNC_RESYNC 0x0020 |
| 1402 | #define SYNC_FROMPARENT 0x0080 |
| 1403 | #endif |
| 1404 | |
| 1405 | /* |
| 1406 | ** Floating-point absolute value |
| 1407 | */ |
| @@ -1448,10 +1449,21 @@ | |
| 1449 | double rSkew = 0.0; /* Maximum time skew */ |
| 1450 | |
| 1451 | if( db_get_boolean("dont-push", 0) ) syncFlags &= ~SYNC_PUSH; |
| 1452 | if( (syncFlags & (SYNC_PUSH|SYNC_PULL|SYNC_CLONE))==0 |
| 1453 | && configRcvMask==0 && configSendMask==0 ) return 0; |
| 1454 | if( syncFlags & SYNC_FROMPARENT ){ |
| 1455 | configRcvMask = 0; |
| 1456 | configSendMask = 0; |
| 1457 | syncFlags &= ~(SYNC_PUSH); |
| 1458 | zPCode = db_get("parent-project-code", 0); |
| 1459 | if( zPCode==0 || db_get("parent-project-name",0)==0 ){ |
| 1460 | fossil_fatal("there is no parent project: set the 'parent-project-code'" |
| 1461 | " and 'parent-project-name' config parameters set in order" |
| 1462 | " to pull from a parent project"); |
| 1463 | } |
| 1464 | } |
| 1465 | |
| 1466 | transport_stats(0, 0, 1); |
| 1467 | socket_global_init(); |
| 1468 | memset(&xfer, 0, sizeof(xfer)); |
| 1469 | xfer.pIn = &recv; |
| 1470 | |
| 1471 | DDED www/childprojects.wiki |
+17
| --- a/www/childprojects.wiki | ||
| +++ b/www/childprojects.wiki | ||
| @@ -0,0 +1,17 @@ | ||
| 1 | +<title>Child Projects</title> | |
| 2 | + | |
| 3 | +<h2>Background</h2> | |
| 4 | + | |
| 5 | +The default behavior of Fossil is to share everything (all check-ins, | |
| 6 | +tickets, wiki, etc) between all clients and all servers. Such a policy | |
| 7 | +helps to promote a coihesive design for a cathedral-style project run | |
| 8 | +by a small cliche of developers - the sort of project for which Fossil | |
| 9 | +was designed. | |
| 10 | + | |
| 11 | +But sometimes it is desirable to branch off a side project that does not | |
| 12 | +sync back to the master but does continue to track changes in the master. | |
| 13 | +For example, the master project might be an open-source project like | |
| 14 | +[https://www.sqlite.org/|SQLite] and a team might want to do a proprietary | |
| 15 | +closed-source enhancement to that master project in a separate repository. | |
| 16 | +All changes in the master project should flow forward into the derived | |
| 17 | +project, but care must be taken to prevent proprietary contenblockquote></blockquote >Ba |
| --- a/www/childprojects.wiki | |
| +++ b/www/childprojects.wiki | |
| @@ -0,0 +1,17 @@ | |
| --- a/www/childprojects.wiki | |
| +++ b/www/childprojects.wiki | |
| @@ -0,0 +1,17 @@ | |
| 1 | <title>Child Projects</title> |
| 2 | |
| 3 | <h2>Background</h2> |
| 4 | |
| 5 | The default behavior of Fossil is to share everything (all check-ins, |
| 6 | tickets, wiki, etc) between all clients and all servers. Such a policy |
| 7 | helps to promote a coihesive design for a cathedral-style project run |
| 8 | by a small cliche of developers - the sort of project for which Fossil |
| 9 | was designed. |
| 10 | |
| 11 | But sometimes it is desirable to branch off a side project that does not |
| 12 | sync back to the master but does continue to track changes in the master. |
| 13 | For example, the master project might be an open-source project like |
| 14 | [https://www.sqlite.org/|SQLite] and a team might want to do a proprietary |
| 15 | closed-source enhancement to that master project in a separate repository. |
| 16 | All changes in the master project should flow forward into the derived |
| 17 | project, but care must be taken to prevent proprietary contenblockquote></blockquote >Ba |
+2
-1
| --- www/mkindex.tcl | ||
| +++ www/mkindex.tcl | ||
| @@ -13,13 +13,14 @@ | ||
| 13 | 13 | antibot.wiki {Defense against Spiders and Bots} |
| 14 | 14 | blame.wiki {The Annotate/Blame Algorithm Of Fossil} |
| 15 | 15 | branching.wiki {Branching, Forking, Merging, and Tagging} |
| 16 | 16 | bugtheory.wiki {Bug Tracking In Fossil} |
| 17 | 17 | build.wiki {Compiling and Installing Fossil} |
| 18 | + changes.wiki {Fossil Changelog} | |
| 18 | 19 | checkin_names.wiki {Check-in And Version Names} |
| 19 | 20 | checkin.wiki {Check-in Checklist} |
| 20 | - changes.wiki {Fossil Changelog} | |
| 21 | + childprojects.wiki {Child Projects} | |
| 21 | 22 | copyright-release.html {Contributor License Agreement} |
| 22 | 23 | concepts.wiki {Fossil Core Concepts} |
| 23 | 24 | contribute.wiki {Contributing Code or Documentation To The Fossil Project} |
| 24 | 25 | customgraph.md {Theming: Customizing the Timeline Graph} |
| 25 | 26 | customskin.md {Theming: Customizing The Appearance of Web Pages} |
| 26 | 27 |
| --- www/mkindex.tcl | |
| +++ www/mkindex.tcl | |
| @@ -13,13 +13,14 @@ | |
| 13 | antibot.wiki {Defense against Spiders and Bots} |
| 14 | blame.wiki {The Annotate/Blame Algorithm Of Fossil} |
| 15 | branching.wiki {Branching, Forking, Merging, and Tagging} |
| 16 | bugtheory.wiki {Bug Tracking In Fossil} |
| 17 | build.wiki {Compiling and Installing Fossil} |
| 18 | checkin_names.wiki {Check-in And Version Names} |
| 19 | checkin.wiki {Check-in Checklist} |
| 20 | changes.wiki {Fossil Changelog} |
| 21 | copyright-release.html {Contributor License Agreement} |
| 22 | concepts.wiki {Fossil Core Concepts} |
| 23 | contribute.wiki {Contributing Code or Documentation To The Fossil Project} |
| 24 | customgraph.md {Theming: Customizing the Timeline Graph} |
| 25 | customskin.md {Theming: Customizing The Appearance of Web Pages} |
| 26 |
| --- www/mkindex.tcl | |
| +++ www/mkindex.tcl | |
| @@ -13,13 +13,14 @@ | |
| 13 | antibot.wiki {Defense against Spiders and Bots} |
| 14 | blame.wiki {The Annotate/Blame Algorithm Of Fossil} |
| 15 | branching.wiki {Branching, Forking, Merging, and Tagging} |
| 16 | bugtheory.wiki {Bug Tracking In Fossil} |
| 17 | build.wiki {Compiling and Installing Fossil} |
| 18 | changes.wiki {Fossil Changelog} |
| 19 | checkin_names.wiki {Check-in And Version Names} |
| 20 | checkin.wiki {Check-in Checklist} |
| 21 | childprojects.wiki {Child Projects} |
| 22 | copyright-release.html {Contributor License Agreement} |
| 23 | concepts.wiki {Fossil Core Concepts} |
| 24 | contribute.wiki {Contributing Code or Documentation To The Fossil Project} |
| 25 | customgraph.md {Theming: Customizing the Timeline Graph} |
| 26 | customskin.md {Theming: Customizing The Appearance of Web Pages} |
| 27 |
| --- www/permutedindex.html | ||
| +++ www/permutedindex.html | ||
| @@ -43,10 +43,11 @@ | ||
| 43 | 43 | <li><a href="checkin.wiki">Check-in Checklist</a></li> |
| 44 | 44 | <li><a href="checkin.wiki">Checklist — Check-in</a></li> |
| 45 | 45 | <li><a href="../test/release-checklist.wiki">Checklist — Pre-Release Testing</a></li> |
| 46 | 46 | <li><a href="foss-cklist.wiki">Checklist For Successful Open-Source Projects</a></li> |
| 47 | 47 | <li><a href="selfcheck.wiki">Checks — Fossil Repository Integrity Self</a></li> |
| 48 | +<li><a href="childprojects.wiki">Child Projects</a></li> | |
| 48 | 49 | <li><a href="contribute.wiki">Code or Documentation To The Fossil Project — Contributing</a></li> |
| 49 | 50 | <li><a href="style.wiki">Code Style Guidelines — Source</a></li> |
| 50 | 51 | <li><a href="build.wiki">Compiling and Installing Fossil</a></li> |
| 51 | 52 | <li><a href="concepts.wiki">Concepts — Fossil Core</a></li> |
| 52 | 53 | <li><a href="server.wiki">Configure A Fossil Server — How To</a></li> |
| @@ -148,10 +149,11 @@ | ||
| 148 | 149 | <li><a href="private.wiki">Private Branches — Creating, Syncing, and Deleting</a></li> |
| 149 | 150 | <li><a href="makefile.wiki">Process — The Fossil Build</a></li> |
| 150 | 151 | <li><a href="contribute.wiki">Project — Contributing Code or Documentation To The Fossil</a></li> |
| 151 | 152 | <li><a href="embeddeddoc.wiki">Project Documentation — Embedded</a></li> |
| 152 | 153 | <li><a href="foss-cklist.wiki">Projects — Checklist For Successful Open-Source</a></li> |
| 154 | +<li><a href="childprojects.wiki">Projects — Child</a></li> | |
| 153 | 155 | <li><a href="sync.wiki">Protocol — The Fossil Sync</a></li> |
| 154 | 156 | <li><a href="faq.wiki">Questions — Frequently Asked</a></li> |
| 155 | 157 | <li><a href="qandc.wiki">Questions And Criticisms</a></li> |
| 156 | 158 | <li><a href="quickstart.wiki">Quick Start Guide — Fossil</a></li> |
| 157 | 159 | <li><a href="quotes.wiki">Quotes: What People Are Saying About Fossil, Git, and DVCSes in General</a></li> |
| 158 | 160 |
| --- www/permutedindex.html | |
| +++ www/permutedindex.html | |
| @@ -43,10 +43,11 @@ | |
| 43 | <li><a href="checkin.wiki">Check-in Checklist</a></li> |
| 44 | <li><a href="checkin.wiki">Checklist — Check-in</a></li> |
| 45 | <li><a href="../test/release-checklist.wiki">Checklist — Pre-Release Testing</a></li> |
| 46 | <li><a href="foss-cklist.wiki">Checklist For Successful Open-Source Projects</a></li> |
| 47 | <li><a href="selfcheck.wiki">Checks — Fossil Repository Integrity Self</a></li> |
| 48 | <li><a href="contribute.wiki">Code or Documentation To The Fossil Project — Contributing</a></li> |
| 49 | <li><a href="style.wiki">Code Style Guidelines — Source</a></li> |
| 50 | <li><a href="build.wiki">Compiling and Installing Fossil</a></li> |
| 51 | <li><a href="concepts.wiki">Concepts — Fossil Core</a></li> |
| 52 | <li><a href="server.wiki">Configure A Fossil Server — How To</a></li> |
| @@ -148,10 +149,11 @@ | |
| 148 | <li><a href="private.wiki">Private Branches — Creating, Syncing, and Deleting</a></li> |
| 149 | <li><a href="makefile.wiki">Process — The Fossil Build</a></li> |
| 150 | <li><a href="contribute.wiki">Project — Contributing Code or Documentation To The Fossil</a></li> |
| 151 | <li><a href="embeddeddoc.wiki">Project Documentation — Embedded</a></li> |
| 152 | <li><a href="foss-cklist.wiki">Projects — Checklist For Successful Open-Source</a></li> |
| 153 | <li><a href="sync.wiki">Protocol — The Fossil Sync</a></li> |
| 154 | <li><a href="faq.wiki">Questions — Frequently Asked</a></li> |
| 155 | <li><a href="qandc.wiki">Questions And Criticisms</a></li> |
| 156 | <li><a href="quickstart.wiki">Quick Start Guide — Fossil</a></li> |
| 157 | <li><a href="quotes.wiki">Quotes: What People Are Saying About Fossil, Git, and DVCSes in General</a></li> |
| 158 |
| --- www/permutedindex.html | |
| +++ www/permutedindex.html | |
| @@ -43,10 +43,11 @@ | |
| 43 | <li><a href="checkin.wiki">Check-in Checklist</a></li> |
| 44 | <li><a href="checkin.wiki">Checklist — Check-in</a></li> |
| 45 | <li><a href="../test/release-checklist.wiki">Checklist — Pre-Release Testing</a></li> |
| 46 | <li><a href="foss-cklist.wiki">Checklist For Successful Open-Source Projects</a></li> |
| 47 | <li><a href="selfcheck.wiki">Checks — Fossil Repository Integrity Self</a></li> |
| 48 | <li><a href="childprojects.wiki">Child Projects</a></li> |
| 49 | <li><a href="contribute.wiki">Code or Documentation To The Fossil Project — Contributing</a></li> |
| 50 | <li><a href="style.wiki">Code Style Guidelines — Source</a></li> |
| 51 | <li><a href="build.wiki">Compiling and Installing Fossil</a></li> |
| 52 | <li><a href="concepts.wiki">Concepts — Fossil Core</a></li> |
| 53 | <li><a href="server.wiki">Configure A Fossil Server — How To</a></li> |
| @@ -148,10 +149,11 @@ | |
| 149 | <li><a href="private.wiki">Private Branches — Creating, Syncing, and Deleting</a></li> |
| 150 | <li><a href="makefile.wiki">Process — The Fossil Build</a></li> |
| 151 | <li><a href="contribute.wiki">Project — Contributing Code or Documentation To The Fossil</a></li> |
| 152 | <li><a href="embeddeddoc.wiki">Project Documentation — Embedded</a></li> |
| 153 | <li><a href="foss-cklist.wiki">Projects — Checklist For Successful Open-Source</a></li> |
| 154 | <li><a href="childprojects.wiki">Projects — Child</a></li> |
| 155 | <li><a href="sync.wiki">Protocol — The Fossil Sync</a></li> |
| 156 | <li><a href="faq.wiki">Questions — Frequently Asked</a></li> |
| 157 | <li><a href="qandc.wiki">Questions And Criticisms</a></li> |
| 158 | <li><a href="quickstart.wiki">Quick Start Guide — Fossil</a></li> |
| 159 | <li><a href="quotes.wiki">Quotes: What People Are Saying About Fossil, Git, and DVCSes in General</a></li> |
| 160 |