Fossil SCM
Drop support for the undocumented (and non-working) subrepository feature unless the -DFOSSIL_ENABLE_SUBREPOSITORY compile-time option is used.
Commit
d8c917eebad1e94b82053cb5f092f1558e1bb72a
Parent
6e1072c5b567f36…
1 file changed
+8
-1
+8
-1
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -1401,17 +1401,23 @@ | ||
| 1401 | 1401 | |
| 1402 | 1402 | /* Make g.zPath point to the first element of the path. Make |
| 1403 | 1403 | ** g.zExtra point to everything past that point. |
| 1404 | 1404 | */ |
| 1405 | 1405 | while(1){ |
| 1406 | - char *zAltRepo = 0; | |
| 1407 | 1406 | g.zPath = &zPath[1]; |
| 1408 | 1407 | for(i=1; zPath[i] && zPath[i]!='/'; i++){} |
| 1409 | 1408 | if( zPath[i]=='/' ){ |
| 1410 | 1409 | zPath[i] = 0; |
| 1411 | 1410 | g.zExtra = &zPath[i+1]; |
| 1412 | 1411 | |
| 1412 | +#ifdef FOSSIL_ENABLE_SUBREPOSITORY | |
| 1413 | + char *zAltRepo = 0; | |
| 1414 | + /* 2016-09-21: Subrepos are undocumented and apparently no longer work. | |
| 1415 | + ** So they are now removed unless the -DFOSSIL_ENABLE_SUBREPOSITORY | |
| 1416 | + ** compile-time option is used. If there are no complaints after | |
| 1417 | + ** a while, we can delete the code entirely. | |
| 1418 | + */ | |
| 1413 | 1419 | /* Look for sub-repositories. A sub-repository is another repository |
| 1414 | 1420 | ** that accepts the login credentials of the current repository. A |
| 1415 | 1421 | ** subrepository is identified by a CONFIG table entry "subrepo:NAME" |
| 1416 | 1422 | ** where NAME is the first component of the path. The value of the |
| 1417 | 1423 | ** the CONFIG entries is the string "USER:FILENAME" where USER is the |
| @@ -1445,10 +1451,11 @@ | ||
| 1445 | 1451 | nHost = g.zTop - g.zBaseURL; |
| 1446 | 1452 | g.zBaseURL = mprintf("%z/%s", g.zBaseURL, g.zPath); |
| 1447 | 1453 | g.zTop = g.zBaseURL + nHost; |
| 1448 | 1454 | continue; |
| 1449 | 1455 | } |
| 1456 | +#endif /* FOSSIL_ENABLE_SUBREPOSITORY */ | |
| 1450 | 1457 | }else{ |
| 1451 | 1458 | g.zExtra = 0; |
| 1452 | 1459 | } |
| 1453 | 1460 | break; |
| 1454 | 1461 | } |
| 1455 | 1462 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1401,17 +1401,23 @@ | |
| 1401 | |
| 1402 | /* Make g.zPath point to the first element of the path. Make |
| 1403 | ** g.zExtra point to everything past that point. |
| 1404 | */ |
| 1405 | while(1){ |
| 1406 | char *zAltRepo = 0; |
| 1407 | g.zPath = &zPath[1]; |
| 1408 | for(i=1; zPath[i] && zPath[i]!='/'; i++){} |
| 1409 | if( zPath[i]=='/' ){ |
| 1410 | zPath[i] = 0; |
| 1411 | g.zExtra = &zPath[i+1]; |
| 1412 | |
| 1413 | /* Look for sub-repositories. A sub-repository is another repository |
| 1414 | ** that accepts the login credentials of the current repository. A |
| 1415 | ** subrepository is identified by a CONFIG table entry "subrepo:NAME" |
| 1416 | ** where NAME is the first component of the path. The value of the |
| 1417 | ** the CONFIG entries is the string "USER:FILENAME" where USER is the |
| @@ -1445,10 +1451,11 @@ | |
| 1445 | nHost = g.zTop - g.zBaseURL; |
| 1446 | g.zBaseURL = mprintf("%z/%s", g.zBaseURL, g.zPath); |
| 1447 | g.zTop = g.zBaseURL + nHost; |
| 1448 | continue; |
| 1449 | } |
| 1450 | }else{ |
| 1451 | g.zExtra = 0; |
| 1452 | } |
| 1453 | break; |
| 1454 | } |
| 1455 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1401,17 +1401,23 @@ | |
| 1401 | |
| 1402 | /* Make g.zPath point to the first element of the path. Make |
| 1403 | ** g.zExtra point to everything past that point. |
| 1404 | */ |
| 1405 | while(1){ |
| 1406 | g.zPath = &zPath[1]; |
| 1407 | for(i=1; zPath[i] && zPath[i]!='/'; i++){} |
| 1408 | if( zPath[i]=='/' ){ |
| 1409 | zPath[i] = 0; |
| 1410 | g.zExtra = &zPath[i+1]; |
| 1411 | |
| 1412 | #ifdef FOSSIL_ENABLE_SUBREPOSITORY |
| 1413 | char *zAltRepo = 0; |
| 1414 | /* 2016-09-21: Subrepos are undocumented and apparently no longer work. |
| 1415 | ** So they are now removed unless the -DFOSSIL_ENABLE_SUBREPOSITORY |
| 1416 | ** compile-time option is used. If there are no complaints after |
| 1417 | ** a while, we can delete the code entirely. |
| 1418 | */ |
| 1419 | /* Look for sub-repositories. A sub-repository is another repository |
| 1420 | ** that accepts the login credentials of the current repository. A |
| 1421 | ** subrepository is identified by a CONFIG table entry "subrepo:NAME" |
| 1422 | ** where NAME is the first component of the path. The value of the |
| 1423 | ** the CONFIG entries is the string "USER:FILENAME" where USER is the |
| @@ -1445,10 +1451,11 @@ | |
| 1451 | nHost = g.zTop - g.zBaseURL; |
| 1452 | g.zBaseURL = mprintf("%z/%s", g.zBaseURL, g.zPath); |
| 1453 | g.zTop = g.zBaseURL + nHost; |
| 1454 | continue; |
| 1455 | } |
| 1456 | #endif /* FOSSIL_ENABLE_SUBREPOSITORY */ |
| 1457 | }else{ |
| 1458 | g.zExtra = 0; |
| 1459 | } |
| 1460 | break; |
| 1461 | } |
| 1462 |