Fossil SCM
typo fix
Commit
5b29f6f65f5313140b5a9f06ddb945936586a0f3
Parent
6ba52ae7619f9ea…
2 files changed
+49
-1
+1
-1
+49
-1
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -333,21 +333,69 @@ | ||
| 333 | 333 | blob_zero(&b); |
| 334 | 334 | g.aCommitFile = malloc(sizeof(int)*(g.argc-1)); |
| 335 | 335 | |
| 336 | 336 | for(ii=2; ii<g.argc; ii++){ |
| 337 | 337 | int iId; |
| 338 | + int isDir; /* -bch */ | |
| 339 | + char *zName; /* -bch */ | |
| 338 | 340 | file_tree_name(g.argv[ii], &b, 1); |
| 339 | - iId = db_int(-1, "SELECT id FROM vfile WHERE pathname=%Q", blob_str(&b)); | |
| 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 */ | |
| 340 | 350 | if( iId<0 ){ |
| 341 | 351 | fossil_fatal("fossil knows nothing about: %s", g.argv[ii]); |
| 342 | 352 | } |
| 343 | 353 | g.aCommitFile[ii-2] = iId; |
| 344 | 354 | blob_reset(&b); |
| 345 | 355 | } |
| 346 | 356 | g.aCommitFile[ii-2] = 0; |
| 347 | 357 | } |
| 348 | 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 | + | |
| 349 | 397 | |
| 350 | 398 | /* |
| 351 | 399 | ** Return true if the check-in with RID=rid is a leaf. |
| 352 | 400 | ** A leaf has no children in the same branch. |
| 353 | 401 | */ |
| 354 | 402 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -333,21 +333,69 @@ | |
| 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 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -333,21 +333,69 @@ | |
| 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 |
+1
-1
| --- www/webui.wiki | ||
| +++ www/webui.wiki | ||
| @@ -45,11 +45,11 @@ | ||
| 45 | 45 | from within an open check-out, you can omit the repository name: |
| 46 | 46 | |
| 47 | 47 | <b>fossil ui</b> |
| 48 | 48 | |
| 49 | 49 | The latter case is a very useful short-cut when you are working on a |
| 50 | -fossil project and you what to quickly do some work with the web interface. | |
| 50 | +fossil project and you want to quickly do some work with the web interface. | |
| 51 | 51 | Notice that fossil automatically finds an unused TCP port to run the |
| 52 | 52 | server own and automatically points your web browser to the correct |
| 53 | 53 | URL. So there is never any fumbling around trying to find an open |
| 54 | 54 | port or to type arcane strings into your browser URL entry box. |
| 55 | 55 | The interface just pops right up, ready to run. |
| 56 | 56 |
| --- www/webui.wiki | |
| +++ www/webui.wiki | |
| @@ -45,11 +45,11 @@ | |
| 45 | from within an open check-out, you can omit the repository name: |
| 46 | |
| 47 | <b>fossil ui</b> |
| 48 | |
| 49 | The latter case is a very useful short-cut when you are working on a |
| 50 | fossil project and you what to quickly do some work with the web interface. |
| 51 | Notice that fossil automatically finds an unused TCP port to run the |
| 52 | server own and automatically points your web browser to the correct |
| 53 | URL. So there is never any fumbling around trying to find an open |
| 54 | port or to type arcane strings into your browser URL entry box. |
| 55 | The interface just pops right up, ready to run. |
| 56 |
| --- www/webui.wiki | |
| +++ www/webui.wiki | |
| @@ -45,11 +45,11 @@ | |
| 45 | from within an open check-out, you can omit the repository name: |
| 46 | |
| 47 | <b>fossil ui</b> |
| 48 | |
| 49 | The latter case is a very useful short-cut when you are working on a |
| 50 | fossil project and you want to quickly do some work with the web interface. |
| 51 | Notice that fossil automatically finds an unused TCP port to run the |
| 52 | server own and automatically points your web browser to the correct |
| 53 | URL. So there is never any fumbling around trying to find an open |
| 54 | port or to type arcane strings into your browser URL entry box. |
| 55 | The interface just pops right up, ready to run. |
| 56 |