Fossil SCM

Add a comment that documents the CONFIG table keys used by "fossil remote". No changes to code.

drh 2021-10-25 10:36 trunk
Commit 6330e86405ad75c0ecc42b4cd476ab7c1d7b342b5d95170a9a7828fdd0ea2f1f
1 file changed +21
+21
--- src/sync.c
+++ src/sync.c
@@ -501,10 +501,31 @@
501501
int nArg;
502502
db_find_and_open_repository(0, 0);
503503
504504
/* We should be done with options.. */
505505
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
+ */
506527
507528
if( g.argc==2 ){
508529
/* "fossil remote" with no arguments: Show the last sync URL. */
509530
zUrl = db_get("last-sync-url", 0);
510531
if( zUrl==0 ){
511532
--- 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

Keyboard Shortcuts

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