Fossil SCM

Undo inadvertant hacking changes in previous ci (should have been documentation only)

bharder 2009-02-21 18:59 trunk
Commit c5f4ec0ed5ac56febb63563d5907a6084998aeea
1 file changed +1 -49
+1 -49
--- src/checkin.c
+++ src/checkin.c
@@ -333,69 +333,21 @@
333333
blob_zero(&b);
334334
g.aCommitFile = malloc(sizeof(int)*(g.argc-1));
335335
336336
for(ii=2; ii<g.argc; ii++){
337337
int iId;
338
- int isDir; /* -bch */
339
- char *zName; /* -bch */
340338
file_tree_name(g.argv[ii], &b, 1);
341
- /* -bch start*/
342
- zName=mprintf("%/",g.argv[ii]);
343
- isDir=file_isdir(zName);
344
- if (1==isDir) {
345
- commit_directory_content(zPath);
346
- }else {
347
- /* -bch end */
348
- iId = db_int(-1, "SELECT id FROM vfile WHERE pathname=%Q", blob_str(&b));
349
- } /* -bch */
339
+ iId = db_int(-1, "SELECT id FROM vfile WHERE pathname=%Q", blob_str(&b));
350340
if( iId<0 ){
351341
fossil_fatal("fossil knows nothing about: %s", g.argv[ii]);
352342
}
353343
g.aCommitFile[ii-2] = iId;
354344
blob_reset(&b);
355345
}
356346
g.aCommitFile[ii-2] = 0;
357347
}
358348
}
359
-
360
-/*
361
-** commit directory
362
-*/
363
-
364
-void commit_directory_content(const char *zDir){
365
- DIR *d;
366
- int origSize;
367
- struct dirent *pEntry;
368
- Blob path;
369
-
370
- blob_zero(&path);
371
- blob_append(&path, zDir, -1);
372
- origSize = blob_size(&path);
373
- d = opendir(zDir);
374
- if( d ){
375
- while( (pEntry=readdir(d))!=0 ){
376
- char *zPath;
377
- if( pEntry->d_name[0]=='.' ) continue;
378
- blob_appendf(&path, "/%s", pEntry->d_name);
379
- zPath = blob_str(&path);
380
- if( file_isdir(zPath)==1 ){
381
- commit_directory_content(zPath);
382
- }else if( file_isfile(zPath) ){
383
- file_tree_name(g.argv[ii], &b, 1); /* -bch */
384
- iId = db_int(-1, "SELECT id FROM vfile WHERE pathname=%Q", zPath); /* -bch */
385
- if( iId<0 ){
386
- fossil_fatal("fossil knows nothing about: %s", g.argv[ii]);
387
- }
388
- // db_multi_exec("INSERT INTO sfile VALUES(%Q)", zPath);
389
- }
390
- blob_resize(&path, origSize);
391
- }
392
- }
393
- closedir(d);
394
- blob_reset(&path);
395
-}
396
-
397349
398350
/*
399351
** Return true if the check-in with RID=rid is a leaf.
400352
** A leaf has no children in the same branch.
401353
*/
402354
--- src/checkin.c
+++ src/checkin.c
@@ -333,69 +333,21 @@
333 blob_zero(&b);
334 g.aCommitFile = malloc(sizeof(int)*(g.argc-1));
335
336 for(ii=2; ii<g.argc; ii++){
337 int iId;
338 int isDir; /* -bch */
339 char *zName; /* -bch */
340 file_tree_name(g.argv[ii], &b, 1);
341 /* -bch start*/
342 zName=mprintf("%/",g.argv[ii]);
343 isDir=file_isdir(zName);
344 if (1==isDir) {
345 commit_directory_content(zPath);
346 }else {
347 /* -bch end */
348 iId = db_int(-1, "SELECT id FROM vfile WHERE pathname=%Q", blob_str(&b));
349 } /* -bch */
350 if( iId<0 ){
351 fossil_fatal("fossil knows nothing about: %s", g.argv[ii]);
352 }
353 g.aCommitFile[ii-2] = iId;
354 blob_reset(&b);
355 }
356 g.aCommitFile[ii-2] = 0;
357 }
358 }
359
360 /*
361 ** commit directory
362 */
363
364 void commit_directory_content(const char *zDir){
365 DIR *d;
366 int origSize;
367 struct dirent *pEntry;
368 Blob path;
369
370 blob_zero(&path);
371 blob_append(&path, zDir, -1);
372 origSize = blob_size(&path);
373 d = opendir(zDir);
374 if( d ){
375 while( (pEntry=readdir(d))!=0 ){
376 char *zPath;
377 if( pEntry->d_name[0]=='.' ) continue;
378 blob_appendf(&path, "/%s", pEntry->d_name);
379 zPath = blob_str(&path);
380 if( file_isdir(zPath)==1 ){
381 commit_directory_content(zPath);
382 }else if( file_isfile(zPath) ){
383 file_tree_name(g.argv[ii], &b, 1); /* -bch */
384 iId = db_int(-1, "SELECT id FROM vfile WHERE pathname=%Q", zPath); /* -bch */
385 if( iId<0 ){
386 fossil_fatal("fossil knows nothing about: %s", g.argv[ii]);
387 }
388 // db_multi_exec("INSERT INTO sfile VALUES(%Q)", zPath);
389 }
390 blob_resize(&path, origSize);
391 }
392 }
393 closedir(d);
394 blob_reset(&path);
395 }
396
397
398 /*
399 ** Return true if the check-in with RID=rid is a leaf.
400 ** A leaf has no children in the same branch.
401 */
402
--- src/checkin.c
+++ src/checkin.c
@@ -333,69 +333,21 @@
333 blob_zero(&b);
334 g.aCommitFile = malloc(sizeof(int)*(g.argc-1));
335
336 for(ii=2; ii<g.argc; ii++){
337 int iId;
 
 
338 file_tree_name(g.argv[ii], &b, 1);
339 iId = db_int(-1, "SELECT id FROM vfile WHERE pathname=%Q", blob_str(&b));
 
 
 
 
 
 
 
 
340 if( iId<0 ){
341 fossil_fatal("fossil knows nothing about: %s", g.argv[ii]);
342 }
343 g.aCommitFile[ii-2] = iId;
344 blob_reset(&b);
345 }
346 g.aCommitFile[ii-2] = 0;
347 }
348 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
349
350 /*
351 ** Return true if the check-in with RID=rid is a leaf.
352 ** A leaf has no children in the same branch.
353 */
354

Keyboard Shortcuts

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