112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
** Options:
** --admin-user|-A USERNAME Make USERNAME the administrator
** --once Don't remember the URI.
** --private Also clone private branches
** --ssl-identity FILENAME Use the SSL identity if requested by the server
** --ssh-command|-c SSH Use SSH as the "ssh" command
** --httpauth|-B USER:PASS Add HTTP Basic Authorization to requests
** --verbose Show more statistics in output
**
** See also: init
*/
void clone_cmd(void){
char *zPassword;
const char *zDefaultUser; /* Optional name of the default user */
const char *zHttpAuth; /* HTTP Authorization user:pass information */
int nErr = 0;
int urlFlags = URL_PROMPT_PW | URL_REMEMBER;
int syncFlags = SYNC_CLONE;
/* Also clone private branches */
if( find_option("private",0,0)!=0 ) syncFlags |= SYNC_PRIVATE;
if( find_option("once",0,0)!=0) urlFlags &= ~URL_REMEMBER;
if( find_option("verbose",0,0)!=0) syncFlags |= SYNC_VERBOSE;
zHttpAuth = find_option("httpauth","B",1);
zDefaultUser = find_option("admin-user","A",1);
clone_ssh_find_options();
url_proxy_options();
/* We should be done with options.. */
verify_all_options();
|
>
|
|
>
|
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
** Options:
** --admin-user|-A USERNAME Make USERNAME the administrator
** --once Don't remember the URI.
** --private Also clone private branches
** --ssl-identity FILENAME Use the SSL identity if requested by the server
** --ssh-command|-c SSH Use SSH as the "ssh" command
** --httpauth|-B USER:PASS Add HTTP Basic Authorization to requests
** -u|--unversioned Also sync unversioned content
** -v|--verbose Show more statistics in output
**
** See also: init
*/
void clone_cmd(void){
char *zPassword;
const char *zDefaultUser; /* Optional name of the default user */
const char *zHttpAuth; /* HTTP Authorization user:pass information */
int nErr = 0;
int urlFlags = URL_PROMPT_PW | URL_REMEMBER;
int syncFlags = SYNC_CLONE;
/* Also clone private branches */
if( find_option("private",0,0)!=0 ) syncFlags |= SYNC_PRIVATE;
if( find_option("once",0,0)!=0) urlFlags &= ~URL_REMEMBER;
if( find_option("verbose","v",0)!=0) syncFlags |= SYNC_VERBOSE;
if( find_option("unversioned","u",0)!=0 ) syncFlags |= SYNC_UNVERSIONED;
zHttpAuth = find_option("httpauth","B",1);
zDefaultUser = find_option("admin-user","A",1);
clone_ssh_find_options();
url_proxy_options();
/* We should be done with options.. */
verify_all_options();
|