88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
88
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
|
+
+
+
|
**
** --nochange | -n Dryrun: do not actually make any changes; just
** show what would have happened.
**
** --case-sensitive BOOL Overwrite the case-sensitive setting. If false,
** files whose names differ only in case are taken
** to be the same file.
**
** --force | -f Force the merge even if it would be a no-op.
*/
void merge_cmd(void){
int vid; /* Current version "V" */
int mid; /* Version we are merging from "M" */
int pid; /* The pivot version - most recent common ancestor P */
int detailFlag; /* True if the --detail option is present */
int pickFlag; /* True if the --cherrypick option is present */
int backoutFlag; /* True if the --backout option is present */
int nochangeFlag; /* True if the --nochange or -n option is present */
int forceFlag; /* True if the --force or -f option is present */
const char *zBinGlob; /* The value of --binary */
const char *zPivot; /* The value of --baseline */
int debugFlag; /* True if --debug is present */
int nChng; /* Number of file name changes */
int *aChng; /* An array of file name changes */
int i; /* Loop counter */
int nConflict = 0; /* Number of conflicts seen */
|
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
+
|
undo_capture_command_line();
detailFlag = find_option("detail",0,0)!=0;
pickFlag = find_option("cherrypick",0,0)!=0;
backoutFlag = find_option("backout",0,0)!=0;
debugFlag = find_option("debug",0,0)!=0;
zBinGlob = find_option("binary",0,1);
nochangeFlag = find_option("nochange","n",0)!=0;
forceFlag = find_option("force","f",0)!=0;
zPivot = find_option("baseline",0,1);
capture_case_sensitive_option();
if( g.argc!=3 ){
usage("VERSION");
}
db_must_be_within_tree();
caseSensitive = filenames_are_case_sensitive();
|
173
174
175
176
177
178
179
180
181
182
183
184
185
186
|
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
|
+
+
+
+
+
|
if( backoutFlag ){
int t = pid;
pid = mid;
mid = t;
}
if( !is_a_version(pid) ){
fossil_fatal("not a version: record #%d", pid);
}
if( !forceFlag && mid==pid ){
fossil_print("Merge skipped because it is a no-op. "
" Use --force to override.\n");
return;
}
if( detailFlag ){
print_checkin_description(mid, 12, "merge-from:");
print_checkin_description(pid, 12, "baseline:");
}
vfile_check_signature(vid, 1, 0);
db_begin_transaction();
|