Fossil

Check-in [ebd604f8]
Login

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

Overview
Comment:When doing a clone that automatically does an open, run the "fossil open" command as a subprocess (usingn fossil_system()) to avoid problems with misconfigured database connections in the event that the clone uses the "file:" scheme. See forum post b1da662b00 for the bug report.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: ebd604f8c7c57e773a0a7370727b57e56278ec4bae874acb151914461fe5080e
User & Date: drh 2021-05-14 18:52:37
Context
2021-05-14
19:38
Update the built-in SQLite to the latest 3.36.0 alpha for testing. ... (check-in: 8b44988d user: drh tags: trunk)
18:52
When doing a clone that automatically does an open, run the "fossil open" command as a subprocess (usingn fossil_system()) to avoid problems with misconfigured database connections in the event that the clone uses the "file:" scheme. See forum post b1da662b00 for the bug report. ... (check-in: ebd604f8 user: drh tags: trunk)
2021-05-13
19:38
Refinement to the URL-to-basename algorithm used to construct a repository filename from a clone URL so that the "www." prefix is not omitted if it is immediately followed by the suffix. forum post 74e111a2ee. ... (check-in: 380aa578 user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/clone.c.

284
285
286
287
288
289
290
291
292
293
294

295
296
297
298
299
300
301
302
303
304
305
306
307
308

309
310
311
312
313
314
315
316
  db_multi_exec("VACUUM");
  db_protect_pop();
  fossil_print("\nproject-id: %s\n", db_get("project-code", 0));
  fossil_print("server-id:  %s\n", db_get("server-code", 0));
  zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin);
  fossil_print("admin-user: %s (password is \"%s\")\n", g.zLogin, zPassword);
  if( zWorkDir!=0 && zWorkDir[0]!=0 && !noOpen ){
    char *azNew[7];
    int nargs = 5;
    fossil_print("opening the new %s repository in directory %s...\n",
       zRepo, zWorkDir);

    azNew[0] = g.argv[0];
    azNew[1] = "open";
    azNew[2] = (char*)zRepo;
    azNew[3] = "--workdir";
    azNew[4] = (char*)zWorkDir;
    if( allowNested ){
      azNew[5] = "--nested";
      nargs++;
    }else{
      azNew[5] = 0;
    }
    azNew[6] = 0;
    g.argv = azNew;
    g.argc = nargs;

    cmd_open();
  }
}

/*
** If user chooses to use HTTP Authentication over unencrypted HTTP,
** remember decision.  Otherwise, if the URL is being changed and no
** preference has been indicated, err on the safe side and revert the







|
<


>
|
|
|
|
|

|
<
<
<

<
<
<
>
|







284
285
286
287
288
289
290
291

292
293
294
295
296
297
298
299
300
301



302



303
304
305
306
307
308
309
310
311
  db_multi_exec("VACUUM");
  db_protect_pop();
  fossil_print("\nproject-id: %s\n", db_get("project-code", 0));
  fossil_print("server-id:  %s\n", db_get("server-code", 0));
  zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin);
  fossil_print("admin-user: %s (password is \"%s\")\n", g.zLogin, zPassword);
  if( zWorkDir!=0 && zWorkDir[0]!=0 && !noOpen ){
    Blob cmd;

    fossil_print("opening the new %s repository in directory %s...\n",
       zRepo, zWorkDir);
    blob_init(&cmd, 0, 0);
    blob_append_escaped_arg(&cmd, g.nameOfExe);
    blob_append(&cmd, " open ", -1);
    blob_append_escaped_arg(&cmd, zRepo);
    blob_append(&cmd, " --workdir ", -1);
    blob_append_escaped_arg(&cmd, zWorkDir);
    if( allowNested ){
      blob_append(&cmd, " --nested", -1);



    }



    fossil_system(blob_str(&cmd));
    blob_reset(&cmd);
  }
}

/*
** If user chooses to use HTTP Authentication over unencrypted HTTP,
** remember decision.  Otherwise, if the URL is being changed and no
** preference has been indicated, err on the safe side and revert the