Fossil SCM

typo fix

bharder 2009-02-21 18:52 trunk
Commit 5b29f6f65f5313140b5a9f06ddb945936586a0f3
2 files changed +49 -1 +1 -1
+49 -1
--- src/checkin.c
+++ src/checkin.c
@@ -333,21 +333,69 @@
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 */
338340
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 */
340350
if( iId<0 ){
341351
fossil_fatal("fossil knows nothing about: %s", g.argv[ii]);
342352
}
343353
g.aCommitFile[ii-2] = iId;
344354
blob_reset(&b);
345355
}
346356
g.aCommitFile[ii-2] = 0;
347357
}
348358
}
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
+
349397
350398
/*
351399
** Return true if the check-in with RID=rid is a leaf.
352400
** A leaf has no children in the same branch.
353401
*/
354402
--- 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 @@
4545
from within an open check-out, you can omit the repository name:
4646
4747
<b>fossil ui</b>
4848
4949
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.
5151
Notice that fossil automatically finds an unused TCP port to run the
5252
server own and automatically points your web browser to the correct
5353
URL. So there is never any fumbling around trying to find an open
5454
port or to type arcane strings into your browser URL entry box.
5555
The interface just pops right up, ready to run.
5656
--- 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

Keyboard Shortcuts

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