Fossil

Check-in [c301e293]
Login

Check-in [c301e293]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the "fossil remote add NAME URL" command so that it accepts aliases for URL.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: c301e293896307edbc0c8ede398c87e0356adef6c0f93654433fb6f6b4defa81
User & Date: drh 2022-02-10 19:38:59
Context
2022-02-10
23:30
Fix a warning for unused variable 'p' introduced by [487e465263fd21] ... (check-in: 8895d938 user: george tags: trunk)
19:38
Fix the "fossil remote add NAME URL" command so that it accepts aliases for URL. ... (check-in: c301e293 user: drh tags: trunk)
15:50
Update the built-in SQLite to the latest 3.38.0 beta that includes the performance enhancements on the datetime() function. ... (check-in: 740d655e user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/sync.c.

610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
    zUrl = g.argv[4];
    if( strcmp(zName,"default")==0 ) goto remote_add_default;
    db_begin_write();
    if( fossil_strcmp(zUrl,"default")==0 ){
      x.canonical = db_get("last-sync-url",0);
      x.passwd = unobscure(db_get("last-sync-pw",0));
    }else{
      url_parse_local(zUrl, URL_PROMPT_PW, &x);
    }
    db_unprotect(PROTECT_CONFIG);
    db_multi_exec(
       "REPLACE INTO config(name, value, mtime)"
       " VALUES('sync-url:%q',%Q,now())",
       zName, x.canonical
    );







|







610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
    zUrl = g.argv[4];
    if( strcmp(zName,"default")==0 ) goto remote_add_default;
    db_begin_write();
    if( fossil_strcmp(zUrl,"default")==0 ){
      x.canonical = db_get("last-sync-url",0);
      x.passwd = unobscure(db_get("last-sync-pw",0));
    }else{
      url_parse_local(zUrl, URL_PROMPT_PW|URL_USE_CONFIG, &x);
    }
    db_unprotect(PROTECT_CONFIG);
    db_multi_exec(
       "REPLACE INTO config(name, value, mtime)"
       " VALUES('sync-url:%q',%Q,now())",
       zName, x.canonical
    );