99
100
101
102
103
104
105
106
107
108
109
110
111
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
}
/*
** COMMAND: pull
**
** Usage: %fossil pull ?URL? ?-R|--respository REPOSITORY?
**
** Pull changes in a remote repository into the local repository.
** The repository is identified by the -R or --repository option.
** If there is no such option then the open repository is used.
** The URL of the remote server is specified on the command line
** If no URL is specified then the URL used by the most recent
** "pull", "push", or "sync" command is used.
**
** The URL is of the following form:
**
** http://USER@HOST:PORT/PATH
**
** The "USER@" and ":PORT" substrings are optional.
** 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,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,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,0);
}
/*
** COMMAND: remote-url
**
** Usage: %fossil remote-url ?URL|off? --show-pw
**
** Query and optional change the default server named used for syncing
** the current check-out.
**
** The userid and password are stripped from the URL and are not printed
** unless the --show-pw option is used on the command-line.
**
** The remote-url is set automatically by a "clone" command or by any
** "sync", "push", or "pull" command that specifies an explicit URL.
** The default remote-url is used by auto-syncing and by "sync", "push",
** "pull" that omit the server URL.
*/
void remote_url_cmd(void){
char *zUrl;
int showPw = find_option("show-pw",0,0)!=0;
db_find_and_open_repository(1);
if( g.argc!=2 && g.argc!=3 ){
usage("remote-url ?URL|off?");
|
|
<
<
<
<
<
|
>
<
<
<
<
<
<
|
>
>
>
>
|
>
>
>
>
>
>
>
>
|
|
|
|
|
>
>
|
99
100
101
102
103
104
105
106
107
108
109
110
111
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
|
}
/*
** COMMAND: pull
**
** Usage: %fossil pull ?URL? ?-R|--respository REPOSITORY?
**
** Pull changes from a remote repository into the local repository.
**
** If the URL is not specified, then the URL from the most recent
** clone, push, pull, remote-url, or sync command is used.
**
** See also: clone, push, sync, remote-url
*/
void pull_cmd(void){
process_sync_args();
client_sync(0,1,0,0,0);
}
/*
** COMMAND: push
**
** Usage: %fossil push ?URL? ?-R|--repository REPOSITORY?
**
** Push changes in the local repository over into a remote repository.
**
** If the URL is not specified, then the URL from the most recent
** clone, push, pull, remote-url, or sync command is used.
**
** See also: clone, pull, sync, remote-url
*/
void push_cmd(void){
process_sync_args();
client_sync(1,0,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.
**
** If a user-id and password are required, specify them as follows:
**
** http://userid:password@www.domain.com:1234/path
**
** If the URL is not specified, then the URL from the most recent successful
** clone, push, pull, remote-url, or sync command is used.
**
** See also: clone, push, pull, remote-url
*/
void sync_cmd(void){
process_sync_args();
client_sync(1,1,0,0,0);
}
/*
** COMMAND: remote-url
**
** Usage: %fossil remote-url ?URL|off? --show-pw
**
** Query and/or change the default server URL used by the "pull", "push",
** and "sync" commands.
**
** The userid and password are of the URL are not printed unless
** the --show-pw option is used on the command-line.
**
** The remote-url is set automatically by a "clone" command or by any
** "sync", "push", or "pull" command that specifies an explicit URL.
** The default remote-url is used by auto-syncing and by "sync", "push",
** "pull" that omit the server URL.
**
** See also: clone, push, pull, sync
*/
void remote_url_cmd(void){
char *zUrl;
int showPw = find_option("show-pw",0,0)!=0;
db_find_and_open_repository(1);
if( g.argc!=2 && g.argc!=3 ){
usage("remote-url ?URL|off?");
|