89
90
91
92
93
94
95
96
97
98
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
|
** It prints out what would have happened but does not actually make
** any changes to the current checkout or the repository.
**
** The -v or --verbose option prints status information about
** unchanged files in addition to those file that actually do change.
**
** Options:
** --case-sensitive BOOL Override case-sensitive setting
** --debug Print debug information on stdout
** --latest Acceptable in place of VERSION, update to
** latest version
** --force-missing Force update if missing content after sync
** -n|--dry-run If given, display instead of run actions
** -v|--verbose Print status information about all files
** -W|--width WIDTH Width of lines (default is to auto-detect).
** Must be more than 20 or 0 (= no limit,
** resulting in a single line per entry).
** --setmtime Set timestamps of all files to match their
** SCM-side times (the timestamp of the last
** checkin which modified them).
** -K|--keep-merge-files On merge conflict, retain the temporary files
** used for merging, named *-baseline, *-original,
** and *-merge.
**
** See also: [[revert]]
*/
void update_cmd(void){
int vid; /* Current version */
int tid=0; /* Target version - version we are changing to */
Stmt q;
int latestFlag; /* --latest. Pick the latest version if true */
int dryRunFlag; /* -n or --dry-run. Do a dry run */
int verboseFlag; /* -v or --verbose. Output extra information */
int forceMissingFlag; /* --force-missing. Continue if missing content */
int debugFlag; /* --debug option */
int setmtimeFlag; /* --setmtime. Set mtimes on files */
int keepMergeFlag; /* True if --keep-merge-files is present */
int nChng; /* Number of file renames */
int *aChng; /* Array of file renames */
int i; /* Loop counter */
int nConflict = 0; /* Number of merge conflicts */
int nOverwrite = 0; /* Number of unmanaged files overwritten */
int nUpdate = 0; /* Number of changes of any kind */
int width; /* Width of printed comment lines */
Stmt mtimeXfer; /* Statement to transfer mtimes */
const char *zWidth; /* Width option string value */
if( !internalUpdate ){
undo_capture_command_line();
url_proxy_options();
|
|
|
|
<
|
>
|
<
<
|
>
|
>
|
|
|
|
>
|
|
>
|
89
90
91
92
93
94
95
96
97
98
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
|
** It prints out what would have happened but does not actually make
** any changes to the current checkout or the repository.
**
** The -v or --verbose option prints status information about
** unchanged files in addition to those file that actually do change.
**
** Options:
** --case-sensitive BOOL Override case-sensitive setting
** --debug Print debug information on stdout
** -n|--dry-run If given, display instead of run actions
** --force-missing Force update if missing content after sync
** -K|--keep-merge-files On merge conflict, retain the temporary files
** used for merging, named *-baseline, *-original,
** and *-merge.
** --latest Acceptable in place of VERSION, update to
** latest version
** --nosync Do not auto-sync prior to update
** --setmtime Set timestamps of all files to match their
** SCM-side times (the timestamp of the last
** checkin which modified them).
** -v|--verbose Print status information about all files
** -W|--width WIDTH Width of lines (default is to auto-detect).
** Must be more than 20 or 0 (= no limit,
** resulting in a single line per entry).
**
** See also: [[revert]]
*/
void update_cmd(void){
int vid; /* Current version */
int tid=0; /* Target version - version we are changing to */
Stmt q;
int latestFlag; /* --latest. Pick the latest version if true */
int dryRunFlag; /* -n or --dry-run. Do a dry run */
int verboseFlag; /* -v or --verbose. Output extra information */
int forceMissingFlag; /* --force-missing. Continue if missing content */
int debugFlag; /* --debug option */
int setmtimeFlag; /* --setmtime. Set mtimes on files */
int keepMergeFlag; /* True if --keep-merge-files is present */
int nChng; /* Number of file renames */
int *aChng; /* Array of file renames */
int i; /* Loop counter */
int nConflict = 0; /* Number of merge conflicts */
int nOverwrite = 0; /* Number of unmanaged files overwritten */
int nUpdate = 0; /* Number of changes of any kind */
int bNosync = 0; /* --nosync. Omit the auto-sync */
int width; /* Width of printed comment lines */
Stmt mtimeXfer; /* Statement to transfer mtimes */
const char *zWidth; /* Width option string value */
if( !internalUpdate ){
undo_capture_command_line();
url_proxy_options();
|
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
dryRunFlag = find_option("nochange",0,0)!=0; /* deprecated */
}
verboseFlag = find_option("verbose","v",0)!=0;
forceMissingFlag = find_option("force-missing",0,0)!=0;
debugFlag = find_option("debug",0,0)!=0;
setmtimeFlag = find_option("setmtime",0,0)!=0;
keepMergeFlag = find_option("keep-merge-files", "K",0)!=0;
/* We should be done with options.. */
verify_all_options();
db_must_be_within_tree();
vid = db_lget_int("checkout", 0);
user_select();
if( !dryRunFlag && !internalUpdate ){
if( autosync_loop(SYNC_PULL + SYNC_VERBOSE*verboseFlag,
db_get_int("autosync-tries", 1), 1) ){
fossil_fatal("update abandoned due to sync failure");
}
}
/* Create any empty directories now, as well as after the update,
|
>
|
|
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
|
dryRunFlag = find_option("nochange",0,0)!=0; /* deprecated */
}
verboseFlag = find_option("verbose","v",0)!=0;
forceMissingFlag = find_option("force-missing",0,0)!=0;
debugFlag = find_option("debug",0,0)!=0;
setmtimeFlag = find_option("setmtime",0,0)!=0;
keepMergeFlag = find_option("keep-merge-files", "K",0)!=0;
bNosync = find_option("nosync",0,0)!=0;
/* We should be done with options.. */
verify_all_options();
db_must_be_within_tree();
vid = db_lget_int("checkout", 0);
user_select();
if( !dryRunFlag && !internalUpdate && !bNosync ){
if( autosync_loop(SYNC_PULL + SYNC_VERBOSE*verboseFlag,
db_get_int("autosync-tries", 1), 1) ){
fossil_fatal("update abandoned due to sync failure");
}
}
/* Create any empty directories now, as well as after the update,
|