Fossil SCM
Add the --save-password option to "fossil clone". Put the command-line options for "fossil clone" in alphabetical order.
Commit
421e6bb3333e270e5628c03d3914fef136ad732dcf02913675f2ef669dcaa6ef
Parent
971a1a99ddb70d2…
2 files changed
+7
-2
+1
-1
+7
-2
| --- src/clone.c | ||
| +++ src/clone.c | ||
| @@ -109,16 +109,17 @@ | ||
| 109 | 109 | ** admin user. This can be overridden using the -A|--admin-user |
| 110 | 110 | ** parameter. |
| 111 | 111 | ** |
| 112 | 112 | ** Options: |
| 113 | 113 | ** --admin-user|-A USERNAME Make USERNAME the administrator |
| 114 | +** --httpauth|-B USER:PASS Add HTTP Basic Authorization to requests | |
| 114 | 115 | ** --nocompress Omit extra delta compression |
| 115 | 116 | ** --once Don't remember the URI. |
| 116 | 117 | ** --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 | |
| 118 | 119 | ** --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 | |
| 120 | 121 | ** -u|--unversioned Also sync unversioned content |
| 121 | 122 | ** -v|--verbose Show more statistics in output |
| 122 | 123 | ** |
| 123 | 124 | ** See also: init |
| 124 | 125 | */ |
| @@ -132,10 +133,14 @@ | ||
| 132 | 133 | int noCompress = find_option("nocompress",0,0)!=0; |
| 133 | 134 | |
| 134 | 135 | /* Also clone private branches */ |
| 135 | 136 | if( find_option("private",0,0)!=0 ) syncFlags |= SYNC_PRIVATE; |
| 136 | 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 | + } | |
| 137 | 142 | if( find_option("verbose","v",0)!=0) syncFlags |= SYNC_VERBOSE; |
| 138 | 143 | if( find_option("unversioned","u",0)!=0 ) syncFlags |= SYNC_UNVERSIONED; |
| 139 | 144 | zHttpAuth = find_option("httpauth","B",1); |
| 140 | 145 | zDefaultUser = find_option("admin-user","A",1); |
| 141 | 146 | clone_ssh_find_options(); |
| 142 | 147 |
| --- 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 @@ | ||
| 274 | 274 | pUrlData->canonical = mprintf("file://%T", pUrlData->name); |
| 275 | 275 | blob_reset(&cfile); |
| 276 | 276 | }else if( pUrlData->user!=0 && pUrlData->passwd==0 && (urlFlags & URL_PROMPT_PW) ){ |
| 277 | 277 | url_prompt_for_password_local(pUrlData); |
| 278 | 278 | }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 ){ | |
| 280 | 280 | if( save_password_prompt(pUrlData->passwd) ){ |
| 281 | 281 | pUrlData->flags = urlFlags |= URL_REMEMBER_PW; |
| 282 | 282 | }else{ |
| 283 | 283 | pUrlData->flags = urlFlags &= ~URL_REMEMBER_PW; |
| 284 | 284 | } |
| 285 | 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)) ){ |
| 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 |