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].

stephan 2021-11-09 14:39 trunk
Commit c9f3d9c2a92344d10da9142f90acf2f76ad94577e0c9eca28afab52a5c4152df
1 file changed +7
+7
--- src/db.c
+++ src/db.c
@@ -3509,10 +3509,12 @@
35093509
** --repodir DIR If REPOSITORY is a URI that will be cloned, store
35103510
** the clone in DIR rather than in "."
35113511
** --setmtime Set timestamps of all files to match their SCM-side
35123512
** times (the timestamp of the last checkin which modified
35133513
** them).
3514
+** --verbose If passed a URI then this flag is passed on to the clone
3515
+** operation, otherwise it has no effect.
35143516
** --workdir DIR Use DIR as the working directory instead of ".". The DIR
35153517
** directory is created if it does not exist.
35163518
**
35173519
** See also: [[close]], [[clone]]
35183520
*/
@@ -3529,10 +3531,11 @@
35293531
const char *zRepoDir = 0; /* --repodir value */
35303532
char *zPwd; /* Initial working directory */
35313533
int isUri = 0; /* True if REPOSITORY is a URI */
35323534
int nLocal; /* Number of preexisting files in cwd */
35333535
int bNosync = 0; /* --nosync. Omit auto-sync */
3536
+ int bVerbose = 0; /* --verbose option for clone */
35343537
35353538
url_proxy_options();
35363539
emptyFlag = find_option("empty",0,0)!=0;
35373540
keepFlag = find_option("keep",0,0)!=0;
35383541
forceMissingFlag = find_option("force-missing",0,0)!=0;
@@ -3540,10 +3543,11 @@
35403543
setmtimeFlag = find_option("setmtime",0,0)!=0;
35413544
zWorkDir = find_option("workdir",0,1);
35423545
zRepoDir = find_option("repodir",0,1);
35433546
bForce = find_option("force","f",0)!=0;
35443547
bNosync = find_option("nosync",0,0)!=0;
3548
+ bVerbose = find_option("verbose",0,0)!=0;
35453549
zPwd = file_getcwd(0,0);
35463550
35473551
35483552
/* We should be done with options.. */
35493553
verify_all_options();
@@ -3611,10 +3615,13 @@
36113615
zRepo = mprintf("%s/%s.fossil", zRepoDir, zNewBase);
36123616
fossil_free(zNewBase);
36133617
blob_init(&cmd, 0, 0);
36143618
blob_append_escaped_arg(&cmd, g.nameOfExe, 1);
36153619
blob_append(&cmd, " clone", -1);
3620
+ if(0!=bVerbose){
3621
+ blob_append(&cmd, " --verbose", -1);
3622
+ }
36163623
blob_append_escaped_arg(&cmd, zUri, 1);
36173624
blob_append_escaped_arg(&cmd, zRepo, 1);
36183625
zCmd = blob_str(&cmd);
36193626
fossil_print("%s\n", zCmd);
36203627
if( zWorkDir ) file_chdir(zPwd, 0);
36213628
--- 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

Keyboard Shortcuts

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