Fossil SCM
Added --verbose option to open which simply passes that flag on to the clone operation when opening a URL, per request in [forum:ab3807edc65ab115|form post ab3807edc65ab115].
Commit
c9f3d9c2a92344d10da9142f90acf2f76ad94577e0c9eca28afab52a5c4152df
Parent
14f44e933c0c0c2…
1 file changed
+7
M
src/db.c
+7
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -3509,10 +3509,12 @@ | ||
| 3509 | 3509 | ** --repodir DIR If REPOSITORY is a URI that will be cloned, store |
| 3510 | 3510 | ** the clone in DIR rather than in "." |
| 3511 | 3511 | ** --setmtime Set timestamps of all files to match their SCM-side |
| 3512 | 3512 | ** times (the timestamp of the last checkin which modified |
| 3513 | 3513 | ** them). |
| 3514 | +** --verbose If passed a URI then this flag is passed on to the clone | |
| 3515 | +** operation, otherwise it has no effect. | |
| 3514 | 3516 | ** --workdir DIR Use DIR as the working directory instead of ".". The DIR |
| 3515 | 3517 | ** directory is created if it does not exist. |
| 3516 | 3518 | ** |
| 3517 | 3519 | ** See also: [[close]], [[clone]] |
| 3518 | 3520 | */ |
| @@ -3529,10 +3531,11 @@ | ||
| 3529 | 3531 | const char *zRepoDir = 0; /* --repodir value */ |
| 3530 | 3532 | char *zPwd; /* Initial working directory */ |
| 3531 | 3533 | int isUri = 0; /* True if REPOSITORY is a URI */ |
| 3532 | 3534 | int nLocal; /* Number of preexisting files in cwd */ |
| 3533 | 3535 | int bNosync = 0; /* --nosync. Omit auto-sync */ |
| 3536 | + int bVerbose = 0; /* --verbose option for clone */ | |
| 3534 | 3537 | |
| 3535 | 3538 | url_proxy_options(); |
| 3536 | 3539 | emptyFlag = find_option("empty",0,0)!=0; |
| 3537 | 3540 | keepFlag = find_option("keep",0,0)!=0; |
| 3538 | 3541 | forceMissingFlag = find_option("force-missing",0,0)!=0; |
| @@ -3540,10 +3543,11 @@ | ||
| 3540 | 3543 | setmtimeFlag = find_option("setmtime",0,0)!=0; |
| 3541 | 3544 | zWorkDir = find_option("workdir",0,1); |
| 3542 | 3545 | zRepoDir = find_option("repodir",0,1); |
| 3543 | 3546 | bForce = find_option("force","f",0)!=0; |
| 3544 | 3547 | bNosync = find_option("nosync",0,0)!=0; |
| 3548 | + bVerbose = find_option("verbose",0,0)!=0; | |
| 3545 | 3549 | zPwd = file_getcwd(0,0); |
| 3546 | 3550 | |
| 3547 | 3551 | |
| 3548 | 3552 | /* We should be done with options.. */ |
| 3549 | 3553 | verify_all_options(); |
| @@ -3611,10 +3615,13 @@ | ||
| 3611 | 3615 | zRepo = mprintf("%s/%s.fossil", zRepoDir, zNewBase); |
| 3612 | 3616 | fossil_free(zNewBase); |
| 3613 | 3617 | blob_init(&cmd, 0, 0); |
| 3614 | 3618 | blob_append_escaped_arg(&cmd, g.nameOfExe, 1); |
| 3615 | 3619 | blob_append(&cmd, " clone", -1); |
| 3620 | + if(0!=bVerbose){ | |
| 3621 | + blob_append(&cmd, " --verbose", -1); | |
| 3622 | + } | |
| 3616 | 3623 | blob_append_escaped_arg(&cmd, zUri, 1); |
| 3617 | 3624 | blob_append_escaped_arg(&cmd, zRepo, 1); |
| 3618 | 3625 | zCmd = blob_str(&cmd); |
| 3619 | 3626 | fossil_print("%s\n", zCmd); |
| 3620 | 3627 | if( zWorkDir ) file_chdir(zPwd, 0); |
| 3621 | 3628 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -3509,10 +3509,12 @@ | |
| 3509 | ** --repodir DIR If REPOSITORY is a URI that will be cloned, store |
| 3510 | ** the clone in DIR rather than in "." |
| 3511 | ** --setmtime Set timestamps of all files to match their SCM-side |
| 3512 | ** times (the timestamp of the last checkin which modified |
| 3513 | ** them). |
| 3514 | ** --workdir DIR Use DIR as the working directory instead of ".". The DIR |
| 3515 | ** directory is created if it does not exist. |
| 3516 | ** |
| 3517 | ** See also: [[close]], [[clone]] |
| 3518 | */ |
| @@ -3529,10 +3531,11 @@ | |
| 3529 | const char *zRepoDir = 0; /* --repodir value */ |
| 3530 | char *zPwd; /* Initial working directory */ |
| 3531 | int isUri = 0; /* True if REPOSITORY is a URI */ |
| 3532 | int nLocal; /* Number of preexisting files in cwd */ |
| 3533 | int bNosync = 0; /* --nosync. Omit auto-sync */ |
| 3534 | |
| 3535 | url_proxy_options(); |
| 3536 | emptyFlag = find_option("empty",0,0)!=0; |
| 3537 | keepFlag = find_option("keep",0,0)!=0; |
| 3538 | forceMissingFlag = find_option("force-missing",0,0)!=0; |
| @@ -3540,10 +3543,11 @@ | |
| 3540 | setmtimeFlag = find_option("setmtime",0,0)!=0; |
| 3541 | zWorkDir = find_option("workdir",0,1); |
| 3542 | zRepoDir = find_option("repodir",0,1); |
| 3543 | bForce = find_option("force","f",0)!=0; |
| 3544 | bNosync = find_option("nosync",0,0)!=0; |
| 3545 | zPwd = file_getcwd(0,0); |
| 3546 | |
| 3547 | |
| 3548 | /* We should be done with options.. */ |
| 3549 | verify_all_options(); |
| @@ -3611,10 +3615,13 @@ | |
| 3611 | zRepo = mprintf("%s/%s.fossil", zRepoDir, zNewBase); |
| 3612 | fossil_free(zNewBase); |
| 3613 | blob_init(&cmd, 0, 0); |
| 3614 | blob_append_escaped_arg(&cmd, g.nameOfExe, 1); |
| 3615 | blob_append(&cmd, " clone", -1); |
| 3616 | blob_append_escaped_arg(&cmd, zUri, 1); |
| 3617 | blob_append_escaped_arg(&cmd, zRepo, 1); |
| 3618 | zCmd = blob_str(&cmd); |
| 3619 | fossil_print("%s\n", zCmd); |
| 3620 | if( zWorkDir ) file_chdir(zPwd, 0); |
| 3621 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -3509,10 +3509,12 @@ | |
| 3509 | ** --repodir DIR If REPOSITORY is a URI that will be cloned, store |
| 3510 | ** the clone in DIR rather than in "." |
| 3511 | ** --setmtime Set timestamps of all files to match their SCM-side |
| 3512 | ** times (the timestamp of the last checkin which modified |
| 3513 | ** them). |
| 3514 | ** --verbose If passed a URI then this flag is passed on to the clone |
| 3515 | ** operation, otherwise it has no effect. |
| 3516 | ** --workdir DIR Use DIR as the working directory instead of ".". The DIR |
| 3517 | ** directory is created if it does not exist. |
| 3518 | ** |
| 3519 | ** See also: [[close]], [[clone]] |
| 3520 | */ |
| @@ -3529,10 +3531,11 @@ | |
| 3531 | const char *zRepoDir = 0; /* --repodir value */ |
| 3532 | char *zPwd; /* Initial working directory */ |
| 3533 | int isUri = 0; /* True if REPOSITORY is a URI */ |
| 3534 | int nLocal; /* Number of preexisting files in cwd */ |
| 3535 | int bNosync = 0; /* --nosync. Omit auto-sync */ |
| 3536 | int bVerbose = 0; /* --verbose option for clone */ |
| 3537 | |
| 3538 | url_proxy_options(); |
| 3539 | emptyFlag = find_option("empty",0,0)!=0; |
| 3540 | keepFlag = find_option("keep",0,0)!=0; |
| 3541 | forceMissingFlag = find_option("force-missing",0,0)!=0; |
| @@ -3540,10 +3543,11 @@ | |
| 3543 | setmtimeFlag = find_option("setmtime",0,0)!=0; |
| 3544 | zWorkDir = find_option("workdir",0,1); |
| 3545 | zRepoDir = find_option("repodir",0,1); |
| 3546 | bForce = find_option("force","f",0)!=0; |
| 3547 | bNosync = find_option("nosync",0,0)!=0; |
| 3548 | bVerbose = find_option("verbose",0,0)!=0; |
| 3549 | zPwd = file_getcwd(0,0); |
| 3550 | |
| 3551 | |
| 3552 | /* We should be done with options.. */ |
| 3553 | verify_all_options(); |
| @@ -3611,10 +3615,13 @@ | |
| 3615 | zRepo = mprintf("%s/%s.fossil", zRepoDir, zNewBase); |
| 3616 | fossil_free(zNewBase); |
| 3617 | blob_init(&cmd, 0, 0); |
| 3618 | blob_append_escaped_arg(&cmd, g.nameOfExe, 1); |
| 3619 | blob_append(&cmd, " clone", -1); |
| 3620 | if(0!=bVerbose){ |
| 3621 | blob_append(&cmd, " --verbose", -1); |
| 3622 | } |
| 3623 | blob_append_escaped_arg(&cmd, zUri, 1); |
| 3624 | blob_append_escaped_arg(&cmd, zRepo, 1); |
| 3625 | zCmd = blob_str(&cmd); |
| 3626 | fossil_print("%s\n", zCmd); |
| 3627 | if( zWorkDir ) file_chdir(zPwd, 0); |
| 3628 |