Fossil SCM

On the "import" command, when the "from" commit is implied, be sure to load all of the files of the implied "from" commit prior to processing the changes.

drh 2011-01-12 01:57 trunk
Commit b1cbae5de44ab85e635628d281f859bf04ac4c8b
1 file changed +6 -6
+6 -6
--- src/import.c
+++ src/import.c
@@ -218,16 +218,10 @@
218218
*/
219219
static void finish_commit(void){
220220
int i;
221221
char *zFromBranch;
222222
Blob record, cksum;
223
- if( gg.zFrom==0 && gg.zPrevCheckin!=0
224
- && fossil_strcmp(gg.zBranch, gg.zPrevBranch)==0
225
- ){
226
- gg.zFrom = gg.zPrevCheckin;
227
- gg.zPrevCheckin = 0;
228
- }
229223
import_prior_files();
230224
qsort(gg.aFile, gg.nFile, sizeof(gg.aFile[0]), mfile_cmp);
231225
blob_zero(&record);
232226
blob_appendf(&record, "C %F\n", gg.zComment);
233227
blob_appendf(&record, "D %s\n", gg.zDate);
@@ -361,10 +355,16 @@
361355
int rid;
362356
ManifestFile *pOld;
363357
ImportFile *pNew;
364358
if( gg.fromLoaded ) return;
365359
gg.fromLoaded = 1;
360
+ if( gg.zFrom==0 && gg.zPrevCheckin!=0
361
+ && fossil_strcmp(gg.zBranch, gg.zPrevBranch)==0
362
+ ){
363
+ gg.zFrom = gg.zPrevCheckin;
364
+ gg.zPrevCheckin = 0;
365
+ }
366366
if( gg.zFrom==0 ) return;
367367
rid = fast_uuid_to_rid(gg.zFrom);
368368
if( rid==0 ) return;
369369
p = manifest_get(rid, CFTYPE_MANIFEST);
370370
if( p==0 ) return;
371371
--- src/import.c
+++ src/import.c
@@ -218,16 +218,10 @@
218 */
219 static void finish_commit(void){
220 int i;
221 char *zFromBranch;
222 Blob record, cksum;
223 if( gg.zFrom==0 && gg.zPrevCheckin!=0
224 && fossil_strcmp(gg.zBranch, gg.zPrevBranch)==0
225 ){
226 gg.zFrom = gg.zPrevCheckin;
227 gg.zPrevCheckin = 0;
228 }
229 import_prior_files();
230 qsort(gg.aFile, gg.nFile, sizeof(gg.aFile[0]), mfile_cmp);
231 blob_zero(&record);
232 blob_appendf(&record, "C %F\n", gg.zComment);
233 blob_appendf(&record, "D %s\n", gg.zDate);
@@ -361,10 +355,16 @@
361 int rid;
362 ManifestFile *pOld;
363 ImportFile *pNew;
364 if( gg.fromLoaded ) return;
365 gg.fromLoaded = 1;
 
 
 
 
 
 
366 if( gg.zFrom==0 ) return;
367 rid = fast_uuid_to_rid(gg.zFrom);
368 if( rid==0 ) return;
369 p = manifest_get(rid, CFTYPE_MANIFEST);
370 if( p==0 ) return;
371
--- src/import.c
+++ src/import.c
@@ -218,16 +218,10 @@
218 */
219 static void finish_commit(void){
220 int i;
221 char *zFromBranch;
222 Blob record, cksum;
 
 
 
 
 
 
223 import_prior_files();
224 qsort(gg.aFile, gg.nFile, sizeof(gg.aFile[0]), mfile_cmp);
225 blob_zero(&record);
226 blob_appendf(&record, "C %F\n", gg.zComment);
227 blob_appendf(&record, "D %s\n", gg.zDate);
@@ -361,10 +355,16 @@
355 int rid;
356 ManifestFile *pOld;
357 ImportFile *pNew;
358 if( gg.fromLoaded ) return;
359 gg.fromLoaded = 1;
360 if( gg.zFrom==0 && gg.zPrevCheckin!=0
361 && fossil_strcmp(gg.zBranch, gg.zPrevBranch)==0
362 ){
363 gg.zFrom = gg.zPrevCheckin;
364 gg.zPrevCheckin = 0;
365 }
366 if( gg.zFrom==0 ) return;
367 rid = fast_uuid_to_rid(gg.zFrom);
368 if( rid==0 ) return;
369 p = manifest_get(rid, CFTYPE_MANIFEST);
370 if( p==0 ) return;
371

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button