Overview
SHA1 Hash: | 5b29f6f65f5313140b5a9f06ddb945936586a0f3 |
---|---|
Date: | 2009-02-21 18:52:26 |
User: | bharder |
Comment: | typo fix |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified src/checkin.c from [a36b0dbf8a] to [9773d14136].
@@ -333,21 +333,69 @@ blob_zero(&b); g.aCommitFile = malloc(sizeof(int)*(g.argc-1)); for(ii=2; ii<g.argc; ii++){ int iId; + int isDir; /* -bch */ + char *zName; /* -bch */ file_tree_name(g.argv[ii], &b, 1); - iId = db_int(-1, "SELECT id FROM vfile WHERE pathname=%Q", blob_str(&b)); + /* -bch start*/ + zName=mprintf("%/",g.argv[ii]); + isDir=file_isdir(zName); + if (1==isDir) { + commit_directory_content(zPath); + }else { + /* -bch end */ + iId = db_int(-1, "SELECT id FROM vfile WHERE pathname=%Q", blob_str(&b)); + } /* -bch */ if( iId<0 ){ fossil_fatal("fossil knows nothing about: %s", g.argv[ii]); } g.aCommitFile[ii-2] = iId; blob_reset(&b); } g.aCommitFile[ii-2] = 0; } } + +/* +** commit directory +*/ + +void commit_directory_content(const char *zDir){ + DIR *d; + int origSize; + struct dirent *pEntry; + Blob path; + + blob_zero(&path); + blob_append(&path, zDir, -1); + origSize = blob_size(&path); + d = opendir(zDir); + if( d ){ + while( (pEntry=readdir(d))!=0 ){ + char *zPath; + if( pEntry->d_name[0]=='.' ) continue; + blob_appendf(&path, "/%s", pEntry->d_name); + zPath = blob_str(&path); + if( file_isdir(zPath)==1 ){ + commit_directory_content(zPath); + }else if( file_isfile(zPath) ){ + file_tree_name(g.argv[ii], &b, 1); /* -bch */ + iId = db_int(-1, "SELECT id FROM vfile WHERE pathname=%Q", zPath); /* -bch */ + if( iId<0 ){ + fossil_fatal("fossil knows nothing about: %s", g.argv[ii]); + } + // db_multi_exec("INSERT INTO sfile VALUES(%Q)", zPath); + } + blob_resize(&path, origSize); + } + } + closedir(d); + blob_reset(&path); +} + /* ** Return true if the check-in with RID=rid is a leaf. ** A leaf has no children in the same branch. */
Modified www/webui.wiki from [d42ebb3c01] to [6e2aa8a4b9].
@@ -45,11 +45,11 @@ from within an open check-out, you can omit the repository name: <b>fossil ui</b> The latter case is a very useful short-cut when you are working on a -fossil project and you what to quickly do some work with the web interface. +fossil project and you want to quickly do some work with the web interface. Notice that fossil automatically finds an unused TCP port to run the server own and automatically points your web browser to the correct URL. So there is never any fumbling around trying to find an open port or to type arcane strings into your browser URL entry box. The interface just pops right up, ready to run.