Fossil SCM
Add a comment that documents the CONFIG table keys used by "fossil remote". No changes to code.
Commit
6330e86405ad75c0ecc42b4cd476ab7c1d7b342b5d95170a9a7828fdd0ea2f1f
Parent
19d7c5ff7b2f48f…
1 file changed
+21
+21
| --- src/sync.c | ||
| +++ src/sync.c | ||
| @@ -501,10 +501,31 @@ | ||
| 501 | 501 | int nArg; |
| 502 | 502 | db_find_and_open_repository(0, 0); |
| 503 | 503 | |
| 504 | 504 | /* We should be done with options.. */ |
| 505 | 505 | verify_all_options(); |
| 506 | + | |
| 507 | + /* 2021-10-25: A note about data structures. | |
| 508 | + ** | |
| 509 | + ** The remote URLs are stored in the CONFIG table. The URL is stored | |
| 510 | + ** separately from the password. The password is obscured using the | |
| 511 | + ** obscure() function. | |
| 512 | + ** | |
| 513 | + ** Originally, Fossil only preserved a single remote URL. That URL | |
| 514 | + ** is stored in "last-sync-url" and the password in "last-sync-pw". The | |
| 515 | + ** ability to have multiple remotes was added later so these names | |
| 516 | + ** were retained for backwards compatibility. The other remotes are | |
| 517 | + ** stored in "sync-url:NAME" and "sync-pw:NAME" where NAME is the name | |
| 518 | + ** of the remote. | |
| 519 | + ** | |
| 520 | + ** The last-sync-url is called "default" for the display list. | |
| 521 | + ** | |
| 522 | + ** The last-sync-url might be duplicated into one of the sync-url:NAME | |
| 523 | + ** entries. Thus, when doing a "fossil sync --all" or an autosync with | |
| 524 | + ** autosync=all, each sync-url:NAME entry is checked to see if it is the | |
| 525 | + ** same as last-sync-url and if it is then that entry is skipped. | |
| 526 | + */ | |
| 506 | 527 | |
| 507 | 528 | if( g.argc==2 ){ |
| 508 | 529 | /* "fossil remote" with no arguments: Show the last sync URL. */ |
| 509 | 530 | zUrl = db_get("last-sync-url", 0); |
| 510 | 531 | if( zUrl==0 ){ |
| 511 | 532 |
| --- src/sync.c | |
| +++ src/sync.c | |
| @@ -501,10 +501,31 @@ | |
| 501 | int nArg; |
| 502 | db_find_and_open_repository(0, 0); |
| 503 | |
| 504 | /* We should be done with options.. */ |
| 505 | verify_all_options(); |
| 506 | |
| 507 | if( g.argc==2 ){ |
| 508 | /* "fossil remote" with no arguments: Show the last sync URL. */ |
| 509 | zUrl = db_get("last-sync-url", 0); |
| 510 | if( zUrl==0 ){ |
| 511 |
| --- src/sync.c | |
| +++ src/sync.c | |
| @@ -501,10 +501,31 @@ | |
| 501 | int nArg; |
| 502 | db_find_and_open_repository(0, 0); |
| 503 | |
| 504 | /* We should be done with options.. */ |
| 505 | verify_all_options(); |
| 506 | |
| 507 | /* 2021-10-25: A note about data structures. |
| 508 | ** |
| 509 | ** The remote URLs are stored in the CONFIG table. The URL is stored |
| 510 | ** separately from the password. The password is obscured using the |
| 511 | ** obscure() function. |
| 512 | ** |
| 513 | ** Originally, Fossil only preserved a single remote URL. That URL |
| 514 | ** is stored in "last-sync-url" and the password in "last-sync-pw". The |
| 515 | ** ability to have multiple remotes was added later so these names |
| 516 | ** were retained for backwards compatibility. The other remotes are |
| 517 | ** stored in "sync-url:NAME" and "sync-pw:NAME" where NAME is the name |
| 518 | ** of the remote. |
| 519 | ** |
| 520 | ** The last-sync-url is called "default" for the display list. |
| 521 | ** |
| 522 | ** The last-sync-url might be duplicated into one of the sync-url:NAME |
| 523 | ** entries. Thus, when doing a "fossil sync --all" or an autosync with |
| 524 | ** autosync=all, each sync-url:NAME entry is checked to see if it is the |
| 525 | ** same as last-sync-url and if it is then that entry is skipped. |
| 526 | */ |
| 527 | |
| 528 | if( g.argc==2 ){ |
| 529 | /* "fossil remote" with no arguments: Show the last sync URL. */ |
| 530 | zUrl = db_get("last-sync-url", 0); |
| 531 | if( zUrl==0 ){ |
| 532 |