Fossil SCM

Add the --verbose option to the clone command.

drh 2015-01-06 13:14 trunk merge
Commit 5e7d3effa3de042297669835f9b8fbf75fd29bd3
1 file changed +7 -4
+7 -4
--- src/clone.c
+++ src/clone.c
@@ -110,23 +110,26 @@
110110
** --once Don't save url.
111111
** --private Also clone private branches
112112
** --ssl-identity=filename Use the SSL identity if requested by the server
113113
** --ssh-command|-c 'command' Use this SSH command
114114
** --httpauth|-B 'user:pass' Add HTTP Basic Authorization to requests
115
+** --verbose Show more statistics in output
115116
**
116117
** See also: init
117118
*/
118119
void clone_cmd(void){
119120
char *zPassword;
120121
const char *zDefaultUser; /* Optional name of the default user */
121122
const char *zHttpAuth; /* HTTP Authorization user:pass information */
122123
int nErr = 0;
123
- int bPrivate = 0; /* Also clone private branches */
124124
int urlFlags = URL_PROMPT_PW | URL_REMEMBER;
125
+ int syncFlags = SYNC_CLONE;
125126
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;
127129
if( find_option("once",0,0)!=0) urlFlags &= ~URL_REMEMBER;
130
+ if( find_option("verbose",0,0)!=0) syncFlags |= SYNC_VERBOSE;
128131
zHttpAuth = find_option("httpauth","B",1);
129132
zDefaultUser = find_option("admin-user","A",1);
130133
clone_ssh_find_options();
131134
url_proxy_options();
132135
@@ -147,11 +150,11 @@
147150
file_copy(g.url.name, g.argv[3]);
148151
db_close(1);
149152
db_open_repository(g.argv[3]);
150153
db_record_repository_filename(g.argv[3]);
151154
url_remember();
152
- if( !bPrivate ) delete_private_content();
155
+ if( !(syncFlags & SYNC_PRIVATE) ) delete_private_content();
153156
shun_artifacts();
154157
db_create_default_users(1, zDefaultUser);
155158
if( zDefaultUser ){
156159
g.zLogin = zDefaultUser;
157160
}else{
@@ -184,11 +187,11 @@
184187
);
185188
url_enable_proxy(0);
186189
clone_ssh_db_set_options();
187190
url_get_password_if_needed();
188191
g.xlinkClusterOnly = 1;
189
- nErr = client_sync(SYNC_CLONE | bPrivate,CONFIGSET_ALL,0);
192
+ nErr = client_sync(syncFlags,CONFIGSET_ALL,0);
190193
g.xlinkClusterOnly = 0;
191194
verify_cancel();
192195
db_end_transaction(0);
193196
db_close(1);
194197
if( nErr ){
195198
--- 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

Keyboard Shortcuts

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