59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
}
if( g.urlPort!=80 ){
printf("Autosync: http://%s:%d%s\n", g.urlName, g.urlPort, g.urlPath);
}else{
printf("Autosync: http://%s%s\n", g.urlName, g.urlPath);
}
url_enable_proxy("via proxy: ");
client_sync((flags & AUTOSYNC_PUSH)!=0, 1, 0);
}
/*
** This routine processes the command-line argument for push, pull,
** and sync. If a command-line argument is given, that is the URL
** of a server to sync against. If no argument is given, use the
** most recently synced URL. Remember the current URL for next time.
*/
static void process_sync_args(void){
const char *zUrl = 0;
url_proxy_options();
db_find_and_open_repository(1);
if( g.argc==2 ){
zUrl = db_get("last-sync-url", 0);
}else if( g.argc==3 ){
zUrl = g.argv[2];
|
|
|
|
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
}
if( g.urlPort!=80 ){
printf("Autosync: http://%s:%d%s\n", g.urlName, g.urlPort, g.urlPath);
}else{
printf("Autosync: http://%s%s\n", g.urlName, g.urlPath);
}
url_enable_proxy("via proxy: ");
client_sync((flags & AUTOSYNC_PUSH)!=0, 1, 0, 0);
}
/*
** This routine processes the command-line argument for push, pull,
** and sync. If a command-line argument is given, that is the URL
** of a server to sync against. If no argument is given, use the
** most recently synced URL. Remember the current URL for next time.
*/
void process_sync_args(void){
const char *zUrl = 0;
url_proxy_options();
db_find_and_open_repository(1);
if( g.argc==2 ){
zUrl = db_get("last-sync-url", 0);
}else if( g.argc==3 ){
zUrl = g.argv[2];
|
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
** The "USER" substring specifies the login user. You will be
** prompted for the password on the command-line. The PORT
** specifies the TCP port of the server. The default port is
** 80.
*/
void pull_cmd(void){
process_sync_args();
client_sync(0,1,0);
}
/*
** COMMAND: push
**
** Usage: %fossil push ?URL? ?-R|--repository REPOSITORY?
**
** Push changes in the local repository over into a remote repository.
** See the "pull" command for additional information.
*/
void push_cmd(void){
process_sync_args();
client_sync(1,0,0);
}
/*
** COMMAND: sync
**
** Usage: %fossil sync ?URL? ?-R|--repository REPOSITORY?
**
** Synchronize the local repository with a remote repository. This is
** the equivalent of running both "push" and "pull" at the same time.
** See the "pull" command for additional information.
*/
void sync_cmd(void){
process_sync_args();
client_sync(1,1,0);
}
|
|
|
|
|
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
** The "USER" substring specifies the login user. You will be
** prompted for the password on the command-line. The PORT
** specifies the TCP port of the server. The default port is
** 80.
*/
void pull_cmd(void){
process_sync_args();
client_sync(0,1,0,0);
}
/*
** COMMAND: push
**
** Usage: %fossil push ?URL? ?-R|--repository REPOSITORY?
**
** Push changes in the local repository over into a remote repository.
** See the "pull" command for additional information.
*/
void push_cmd(void){
process_sync_args();
client_sync(1,0,0,0);
}
/*
** COMMAND: sync
**
** Usage: %fossil sync ?URL? ?-R|--repository REPOSITORY?
**
** Synchronize the local repository with a remote repository. This is
** the equivalent of running both "push" and "pull" at the same time.
** See the "pull" command for additional information.
*/
void sync_cmd(void){
process_sync_args();
client_sync(1,1,0,0);
}
|