176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
|
rebuild_db(0, 1, 0);
fossil_print("project-id: %s\n", db_get("project-code", 0));
zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin);
fossil_print("admin-user: %s (password is \"%s\")\n", g.zLogin, zPassword);
db_end_transaction(0);
}
void clone_ssh_options(void){
const char *zSshFossilCmd; /* Path to remote fossil command for SSH */
const char *zSshCmd; /* SSH command string */
zSshFossilCmd = find_option("ssh-fossil","f",1);
if( zSshFossilCmd && zSshFossilCmd[0] ){
g.fSshFossilCmd = mprintf("%s", zSshFossilCmd);
}
zSshCmd = find_option("ssh-command","c",1);
if( zSshCmd && zSshCmd[0] ){
g.fSshCmd = mprintf("%s", zSshCmd);
}
}
void clone_ssh_db_options(void){
if( g.fSshFossilCmd && g.fSshFossilCmd[0] ){
db_set("ssh-fossil", g.fSshFossilCmd, 0);
}else{
g.fSshFossilCmd = db_get("ssh-fossil","fossil");
}
if( g.fSshCmd && g.fSshCmd[0] ){
db_set("ssh-command", g.fSshCmd, 0);
}
}
|
>
>
>
|
|
>
>
>
>
|
|
|
|
|
|
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
|
rebuild_db(0, 1, 0);
fossil_print("project-id: %s\n", db_get("project-code", 0));
zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin);
fossil_print("admin-user: %s (password is \"%s\")\n", g.zLogin, zPassword);
db_end_transaction(0);
}
/*
** Look for SSH clone command line options and setup in globals.
*/
void clone_ssh_options(void){
const char *zSshFossilCmd; /* Path to remote fossil command for SSH */
const char *zSshCmd; /* SSH command string */
zSshFossilCmd = find_option("ssh-fossil","f",1);
if( zSshFossilCmd && zSshFossilCmd[0] ){
g.zSshFossilCmd = mprintf("%s", zSshFossilCmd);
}
zSshCmd = find_option("ssh-command","c",1);
if( zSshCmd && zSshCmd[0] ){
g.zSshCmd = mprintf("%s", zSshCmd);
}
}
/*
** Set SSH options discovered in global variables (set from command line
** options). If not found, attempt to retrieve from database if present.
*/
void clone_ssh_db_options(void){
if( g.zSshFossilCmd && g.zSshFossilCmd[0] ){
db_set("ssh-fossil", g.zSshFossilCmd, 0);
}else{
g.zSshFossilCmd = db_get("ssh-fossil","fossil");
}
if( g.zSshCmd && g.zSshCmd[0] ){
db_set("ssh-command", g.zSshCmd, 0);
}
}
|