Fossil SCM

Add the --save-password option to "fossil clone". Put the command-line options for "fossil clone" in alphabetical order.

drh 2019-06-29 03:14 trunk merge
Commit 421e6bb3333e270e5628c03d3914fef136ad732dcf02913675f2ef669dcaa6ef
2 files changed +7 -2 +1 -1
+7 -2
--- src/clone.c
+++ src/clone.c
@@ -109,16 +109,17 @@
109109
** admin user. This can be overridden using the -A|--admin-user
110110
** parameter.
111111
**
112112
** Options:
113113
** --admin-user|-A USERNAME Make USERNAME the administrator
114
+** --httpauth|-B USER:PASS Add HTTP Basic Authorization to requests
114115
** --nocompress Omit extra delta compression
115116
** --once Don't remember the URI.
116117
** --private Also clone private branches
117
-** --ssl-identity FILENAME Use the SSL identity if requested by the server
118
+** --save-password Remember the password without asking
118119
** --ssh-command|-c SSH Use SSH as the "ssh" command
119
-** --httpauth|-B USER:PASS Add HTTP Basic Authorization to requests
120
+** --ssl-identity FILENAME Use the SSL identity if requested by the server
120121
** -u|--unversioned Also sync unversioned content
121122
** -v|--verbose Show more statistics in output
122123
**
123124
** See also: init
124125
*/
@@ -132,10 +133,14 @@
132133
int noCompress = find_option("nocompress",0,0)!=0;
133134
134135
/* Also clone private branches */
135136
if( find_option("private",0,0)!=0 ) syncFlags |= SYNC_PRIVATE;
136137
if( find_option("once",0,0)!=0) urlFlags &= ~URL_REMEMBER;
138
+ if( find_option("save-password",0,0)!=0 ){
139
+ urlFlags &= ~URL_PROMPT_PW;
140
+ urlFlags |= URL_REMEMBER_PW;
141
+ }
137142
if( find_option("verbose","v",0)!=0) syncFlags |= SYNC_VERBOSE;
138143
if( find_option("unversioned","u",0)!=0 ) syncFlags |= SYNC_UNVERSIONED;
139144
zHttpAuth = find_option("httpauth","B",1);
140145
zDefaultUser = find_option("admin-user","A",1);
141146
clone_ssh_find_options();
142147
--- src/clone.c
+++ src/clone.c
@@ -109,16 +109,17 @@
109 ** admin user. This can be overridden using the -A|--admin-user
110 ** parameter.
111 **
112 ** Options:
113 ** --admin-user|-A USERNAME Make USERNAME the administrator
 
114 ** --nocompress Omit extra delta compression
115 ** --once Don't remember the URI.
116 ** --private Also clone private branches
117 ** --ssl-identity FILENAME Use the SSL identity if requested by the server
118 ** --ssh-command|-c SSH Use SSH as the "ssh" command
119 ** --httpauth|-B USER:PASS Add HTTP Basic Authorization to requests
120 ** -u|--unversioned Also sync unversioned content
121 ** -v|--verbose Show more statistics in output
122 **
123 ** See also: init
124 */
@@ -132,10 +133,14 @@
132 int noCompress = find_option("nocompress",0,0)!=0;
133
134 /* Also clone private branches */
135 if( find_option("private",0,0)!=0 ) syncFlags |= SYNC_PRIVATE;
136 if( find_option("once",0,0)!=0) urlFlags &= ~URL_REMEMBER;
 
 
 
 
137 if( find_option("verbose","v",0)!=0) syncFlags |= SYNC_VERBOSE;
138 if( find_option("unversioned","u",0)!=0 ) syncFlags |= SYNC_UNVERSIONED;
139 zHttpAuth = find_option("httpauth","B",1);
140 zDefaultUser = find_option("admin-user","A",1);
141 clone_ssh_find_options();
142
--- src/clone.c
+++ src/clone.c
@@ -109,16 +109,17 @@
109 ** admin user. This can be overridden using the -A|--admin-user
110 ** parameter.
111 **
112 ** Options:
113 ** --admin-user|-A USERNAME Make USERNAME the administrator
114 ** --httpauth|-B USER:PASS Add HTTP Basic Authorization to requests
115 ** --nocompress Omit extra delta compression
116 ** --once Don't remember the URI.
117 ** --private Also clone private branches
118 ** --save-password Remember the password without asking
119 ** --ssh-command|-c SSH Use SSH as the "ssh" command
120 ** --ssl-identity FILENAME Use the SSL identity if requested by the server
121 ** -u|--unversioned Also sync unversioned content
122 ** -v|--verbose Show more statistics in output
123 **
124 ** See also: init
125 */
@@ -132,10 +133,14 @@
133 int noCompress = find_option("nocompress",0,0)!=0;
134
135 /* Also clone private branches */
136 if( find_option("private",0,0)!=0 ) syncFlags |= SYNC_PRIVATE;
137 if( find_option("once",0,0)!=0) urlFlags &= ~URL_REMEMBER;
138 if( find_option("save-password",0,0)!=0 ){
139 urlFlags &= ~URL_PROMPT_PW;
140 urlFlags |= URL_REMEMBER_PW;
141 }
142 if( find_option("verbose","v",0)!=0) syncFlags |= SYNC_VERBOSE;
143 if( find_option("unversioned","u",0)!=0 ) syncFlags |= SYNC_UNVERSIONED;
144 zHttpAuth = find_option("httpauth","B",1);
145 zDefaultUser = find_option("admin-user","A",1);
146 clone_ssh_find_options();
147
+1 -1
--- src/url.c
+++ src/url.c
@@ -274,11 +274,11 @@
274274
pUrlData->canonical = mprintf("file://%T", pUrlData->name);
275275
blob_reset(&cfile);
276276
}else if( pUrlData->user!=0 && pUrlData->passwd==0 && (urlFlags & URL_PROMPT_PW) ){
277277
url_prompt_for_password_local(pUrlData);
278278
}else if( pUrlData->user!=0 && ( urlFlags & URL_ASK_REMEMBER_PW ) ){
279
- if( isatty(fileno(stdin)) ){
279
+ if( isatty(fileno(stdin)) && ( urlFlags & URL_REMEMBER_PW )==0 ){
280280
if( save_password_prompt(pUrlData->passwd) ){
281281
pUrlData->flags = urlFlags |= URL_REMEMBER_PW;
282282
}else{
283283
pUrlData->flags = urlFlags &= ~URL_REMEMBER_PW;
284284
}
285285
--- src/url.c
+++ src/url.c
@@ -274,11 +274,11 @@
274 pUrlData->canonical = mprintf("file://%T", pUrlData->name);
275 blob_reset(&cfile);
276 }else if( pUrlData->user!=0 && pUrlData->passwd==0 && (urlFlags & URL_PROMPT_PW) ){
277 url_prompt_for_password_local(pUrlData);
278 }else if( pUrlData->user!=0 && ( urlFlags & URL_ASK_REMEMBER_PW ) ){
279 if( isatty(fileno(stdin)) ){
280 if( save_password_prompt(pUrlData->passwd) ){
281 pUrlData->flags = urlFlags |= URL_REMEMBER_PW;
282 }else{
283 pUrlData->flags = urlFlags &= ~URL_REMEMBER_PW;
284 }
285
--- src/url.c
+++ src/url.c
@@ -274,11 +274,11 @@
274 pUrlData->canonical = mprintf("file://%T", pUrlData->name);
275 blob_reset(&cfile);
276 }else if( pUrlData->user!=0 && pUrlData->passwd==0 && (urlFlags & URL_PROMPT_PW) ){
277 url_prompt_for_password_local(pUrlData);
278 }else if( pUrlData->user!=0 && ( urlFlags & URL_ASK_REMEMBER_PW ) ){
279 if( isatty(fileno(stdin)) && ( urlFlags & URL_REMEMBER_PW )==0 ){
280 if( save_password_prompt(pUrlData->passwd) ){
281 pUrlData->flags = urlFlags |= URL_REMEMBER_PW;
282 }else{
283 pUrlData->flags = urlFlags &= ~URL_REMEMBER_PW;
284 }
285

Keyboard Shortcuts

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