Fossil SCM
Add the --verbose option to the clone command.
Commit
5e7d3effa3de042297669835f9b8fbf75fd29bd3
Parent
8533365e44fab97…
1 file changed
+7
-4
+7
-4
| --- src/clone.c | ||
| +++ src/clone.c | ||
| @@ -110,23 +110,26 @@ | ||
| 110 | 110 | ** --once Don't save url. |
| 111 | 111 | ** --private Also clone private branches |
| 112 | 112 | ** --ssl-identity=filename Use the SSL identity if requested by the server |
| 113 | 113 | ** --ssh-command|-c 'command' Use this SSH command |
| 114 | 114 | ** --httpauth|-B 'user:pass' Add HTTP Basic Authorization to requests |
| 115 | +** --verbose Show more statistics in output | |
| 115 | 116 | ** |
| 116 | 117 | ** See also: init |
| 117 | 118 | */ |
| 118 | 119 | void clone_cmd(void){ |
| 119 | 120 | char *zPassword; |
| 120 | 121 | const char *zDefaultUser; /* Optional name of the default user */ |
| 121 | 122 | const char *zHttpAuth; /* HTTP Authorization user:pass information */ |
| 122 | 123 | int nErr = 0; |
| 123 | - int bPrivate = 0; /* Also clone private branches */ | |
| 124 | 124 | int urlFlags = URL_PROMPT_PW | URL_REMEMBER; |
| 125 | + int syncFlags = SYNC_CLONE; | |
| 125 | 126 | |
| 126 | - if( find_option("private",0,0)!=0 ) bPrivate = SYNC_PRIVATE; | |
| 127 | + /* Also clone private branches */ | |
| 128 | + if( find_option("private",0,0)!=0 ) syncFlags |= SYNC_PRIVATE; | |
| 127 | 129 | if( find_option("once",0,0)!=0) urlFlags &= ~URL_REMEMBER; |
| 130 | + if( find_option("verbose",0,0)!=0) syncFlags |= SYNC_VERBOSE; | |
| 128 | 131 | zHttpAuth = find_option("httpauth","B",1); |
| 129 | 132 | zDefaultUser = find_option("admin-user","A",1); |
| 130 | 133 | clone_ssh_find_options(); |
| 131 | 134 | url_proxy_options(); |
| 132 | 135 | |
| @@ -147,11 +150,11 @@ | ||
| 147 | 150 | file_copy(g.url.name, g.argv[3]); |
| 148 | 151 | db_close(1); |
| 149 | 152 | db_open_repository(g.argv[3]); |
| 150 | 153 | db_record_repository_filename(g.argv[3]); |
| 151 | 154 | url_remember(); |
| 152 | - if( !bPrivate ) delete_private_content(); | |
| 155 | + if( !(syncFlags & SYNC_PRIVATE) ) delete_private_content(); | |
| 153 | 156 | shun_artifacts(); |
| 154 | 157 | db_create_default_users(1, zDefaultUser); |
| 155 | 158 | if( zDefaultUser ){ |
| 156 | 159 | g.zLogin = zDefaultUser; |
| 157 | 160 | }else{ |
| @@ -184,11 +187,11 @@ | ||
| 184 | 187 | ); |
| 185 | 188 | url_enable_proxy(0); |
| 186 | 189 | clone_ssh_db_set_options(); |
| 187 | 190 | url_get_password_if_needed(); |
| 188 | 191 | g.xlinkClusterOnly = 1; |
| 189 | - nErr = client_sync(SYNC_CLONE | bPrivate,CONFIGSET_ALL,0); | |
| 192 | + nErr = client_sync(syncFlags,CONFIGSET_ALL,0); | |
| 190 | 193 | g.xlinkClusterOnly = 0; |
| 191 | 194 | verify_cancel(); |
| 192 | 195 | db_end_transaction(0); |
| 193 | 196 | db_close(1); |
| 194 | 197 | if( nErr ){ |
| 195 | 198 |
| --- src/clone.c | |
| +++ src/clone.c | |
| @@ -110,23 +110,26 @@ | |
| 110 | ** --once Don't save url. |
| 111 | ** --private Also clone private branches |
| 112 | ** --ssl-identity=filename Use the SSL identity if requested by the server |
| 113 | ** --ssh-command|-c 'command' Use this SSH command |
| 114 | ** --httpauth|-B 'user:pass' Add HTTP Basic Authorization to requests |
| 115 | ** |
| 116 | ** See also: init |
| 117 | */ |
| 118 | void clone_cmd(void){ |
| 119 | char *zPassword; |
| 120 | const char *zDefaultUser; /* Optional name of the default user */ |
| 121 | const char *zHttpAuth; /* HTTP Authorization user:pass information */ |
| 122 | int nErr = 0; |
| 123 | int bPrivate = 0; /* Also clone private branches */ |
| 124 | int urlFlags = URL_PROMPT_PW | URL_REMEMBER; |
| 125 | |
| 126 | if( find_option("private",0,0)!=0 ) bPrivate = SYNC_PRIVATE; |
| 127 | if( find_option("once",0,0)!=0) urlFlags &= ~URL_REMEMBER; |
| 128 | zHttpAuth = find_option("httpauth","B",1); |
| 129 | zDefaultUser = find_option("admin-user","A",1); |
| 130 | clone_ssh_find_options(); |
| 131 | url_proxy_options(); |
| 132 | |
| @@ -147,11 +150,11 @@ | |
| 147 | file_copy(g.url.name, g.argv[3]); |
| 148 | db_close(1); |
| 149 | db_open_repository(g.argv[3]); |
| 150 | db_record_repository_filename(g.argv[3]); |
| 151 | url_remember(); |
| 152 | if( !bPrivate ) delete_private_content(); |
| 153 | shun_artifacts(); |
| 154 | db_create_default_users(1, zDefaultUser); |
| 155 | if( zDefaultUser ){ |
| 156 | g.zLogin = zDefaultUser; |
| 157 | }else{ |
| @@ -184,11 +187,11 @@ | |
| 184 | ); |
| 185 | url_enable_proxy(0); |
| 186 | clone_ssh_db_set_options(); |
| 187 | url_get_password_if_needed(); |
| 188 | g.xlinkClusterOnly = 1; |
| 189 | nErr = client_sync(SYNC_CLONE | bPrivate,CONFIGSET_ALL,0); |
| 190 | g.xlinkClusterOnly = 0; |
| 191 | verify_cancel(); |
| 192 | db_end_transaction(0); |
| 193 | db_close(1); |
| 194 | if( nErr ){ |
| 195 |
| --- src/clone.c | |
| +++ src/clone.c | |
| @@ -110,23 +110,26 @@ | |
| 110 | ** --once Don't save url. |
| 111 | ** --private Also clone private branches |
| 112 | ** --ssl-identity=filename Use the SSL identity if requested by the server |
| 113 | ** --ssh-command|-c 'command' Use this SSH command |
| 114 | ** --httpauth|-B 'user:pass' Add HTTP Basic Authorization to requests |
| 115 | ** --verbose Show more statistics in output |
| 116 | ** |
| 117 | ** See also: init |
| 118 | */ |
| 119 | void clone_cmd(void){ |
| 120 | char *zPassword; |
| 121 | const char *zDefaultUser; /* Optional name of the default user */ |
| 122 | const char *zHttpAuth; /* HTTP Authorization user:pass information */ |
| 123 | int nErr = 0; |
| 124 | int urlFlags = URL_PROMPT_PW | URL_REMEMBER; |
| 125 | int syncFlags = SYNC_CLONE; |
| 126 | |
| 127 | /* Also clone private branches */ |
| 128 | if( find_option("private",0,0)!=0 ) syncFlags |= SYNC_PRIVATE; |
| 129 | if( find_option("once",0,0)!=0) urlFlags &= ~URL_REMEMBER; |
| 130 | if( find_option("verbose",0,0)!=0) syncFlags |= SYNC_VERBOSE; |
| 131 | zHttpAuth = find_option("httpauth","B",1); |
| 132 | zDefaultUser = find_option("admin-user","A",1); |
| 133 | clone_ssh_find_options(); |
| 134 | url_proxy_options(); |
| 135 | |
| @@ -147,11 +150,11 @@ | |
| 150 | file_copy(g.url.name, g.argv[3]); |
| 151 | db_close(1); |
| 152 | db_open_repository(g.argv[3]); |
| 153 | db_record_repository_filename(g.argv[3]); |
| 154 | url_remember(); |
| 155 | if( !(syncFlags & SYNC_PRIVATE) ) delete_private_content(); |
| 156 | shun_artifacts(); |
| 157 | db_create_default_users(1, zDefaultUser); |
| 158 | if( zDefaultUser ){ |
| 159 | g.zLogin = zDefaultUser; |
| 160 | }else{ |
| @@ -184,11 +187,11 @@ | |
| 187 | ); |
| 188 | url_enable_proxy(0); |
| 189 | clone_ssh_db_set_options(); |
| 190 | url_get_password_if_needed(); |
| 191 | g.xlinkClusterOnly = 1; |
| 192 | nErr = client_sync(syncFlags,CONFIGSET_ALL,0); |
| 193 | g.xlinkClusterOnly = 0; |
| 194 | verify_cancel(); |
| 195 | db_end_transaction(0); |
| 196 | db_close(1); |
| 197 | if( nErr ){ |
| 198 |