Fossil SCM

Drop support for the undocumented (and non-working) subrepository feature unless the -DFOSSIL_ENABLE_SUBREPOSITORY compile-time option is used.

drh 2016-09-21 17:06 UTC trunk
Commit d8c917eebad1e94b82053cb5f092f1558e1bb72a
1 file changed +8 -1
+8 -1
--- src/main.c
+++ src/main.c
@@ -1401,17 +1401,23 @@
14011401
14021402
/* Make g.zPath point to the first element of the path. Make
14031403
** g.zExtra point to everything past that point.
14041404
*/
14051405
while(1){
1406
- char *zAltRepo = 0;
14071406
g.zPath = &zPath[1];
14081407
for(i=1; zPath[i] && zPath[i]!='/'; i++){}
14091408
if( zPath[i]=='/' ){
14101409
zPath[i] = 0;
14111410
g.zExtra = &zPath[i+1];
14121411
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
+ */
14131419
/* Look for sub-repositories. A sub-repository is another repository
14141420
** that accepts the login credentials of the current repository. A
14151421
** subrepository is identified by a CONFIG table entry "subrepo:NAME"
14161422
** where NAME is the first component of the path. The value of the
14171423
** the CONFIG entries is the string "USER:FILENAME" where USER is the
@@ -1445,10 +1451,11 @@
14451451
nHost = g.zTop - g.zBaseURL;
14461452
g.zBaseURL = mprintf("%z/%s", g.zBaseURL, g.zPath);
14471453
g.zTop = g.zBaseURL + nHost;
14481454
continue;
14491455
}
1456
+#endif /* FOSSIL_ENABLE_SUBREPOSITORY */
14501457
}else{
14511458
g.zExtra = 0;
14521459
}
14531460
break;
14541461
}
14551462
--- 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

Keyboard Shortcuts

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