Fossil SCM
Enhance [/help?cmd=changes | fossil changes] and [/help?cmd=status | fossil status] the same way.
Commit
eb4d631c636dd6bcd4f622fd1f44888c06ef2535
Parent
c0b98195f9c7dcb…
2 files changed
+21
-3
+4
-3
+21
-3
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -39,15 +39,32 @@ | ||
| 39 | 39 | ){ |
| 40 | 40 | Stmt q; |
| 41 | 41 | int nPrefix = strlen(zPrefix); |
| 42 | 42 | int nErr = 0; |
| 43 | 43 | Blob rewrittenPathname; |
| 44 | + Blob where; | |
| 45 | + const char *zTreeName; | |
| 46 | + int i, nRoot; | |
| 47 | + | |
| 48 | + nRoot = (int)strlen(g.zLocalRoot); | |
| 49 | + for(i=2; i<g.argc; i++) { | |
| 50 | + Blob fname; | |
| 51 | + file_canonical_name(g.argv[i], &fname, 0); | |
| 52 | + zTreeName = blob_str(&fname)+nRoot; | |
| 53 | + blob_appendf(&where, " %s (pathname=%Q %s) " | |
| 54 | + "OR (pathname>'%q/' %s AND pathname<'%q0' %s)", | |
| 55 | + (blob_size(&where)>0) ? "OR" : "AND", zTreeName, | |
| 56 | + filename_collation(), zTreeName, filename_collation(), | |
| 57 | + zTreeName, filename_collation()); | |
| 58 | + } | |
| 59 | + | |
| 44 | 60 | db_prepare(&q, |
| 45 | 61 | "SELECT pathname, deleted, chnged, rid, coalesce(origname!=pathname,0)" |
| 46 | 62 | " FROM vfile " |
| 47 | - " WHERE is_selected(id)" | |
| 48 | - " AND (chnged OR deleted OR rid=0 OR pathname!=origname) ORDER BY 1" | |
| 63 | + " WHERE is_selected(id) %s" | |
| 64 | + " AND (chnged OR deleted OR rid=0 OR pathname!=origname) ORDER BY 1", | |
| 65 | + blob_str(&where) | |
| 49 | 66 | ); |
| 50 | 67 | blob_zero(&rewrittenPathname); |
| 51 | 68 | while( db_step(&q)==SQLITE_ROW ){ |
| 52 | 69 | const char *zPathname = db_column_text(&q,0); |
| 53 | 70 | const char *zDisplayName = zPathname; |
| @@ -725,11 +742,12 @@ | ||
| 725 | 742 | g.aCommitFile = fossil_malloc(sizeof(int)*(g.argc-1)); |
| 726 | 743 | |
| 727 | 744 | for(ii=2; ii<g.argc; ii++){ |
| 728 | 745 | int iId; |
| 729 | 746 | file_tree_name(g.argv[ii], &b, 1); |
| 730 | - iId = db_int(-1, "SELECT id FROM vfile WHERE pathname=%Q", blob_str(&b)); | |
| 747 | + iId = db_int(-1, "SELECT id FROM vfile WHERE pathname=%Q %s", | |
| 748 | + blob_str(&b), filename_collation() ); | |
| 731 | 749 | if( iId<0 ){ |
| 732 | 750 | fossil_warning("fossil knows nothing about: %s", g.argv[ii]); |
| 733 | 751 | result = 1; |
| 734 | 752 | }else{ |
| 735 | 753 | g.aCommitFile[jj++] = iId; |
| 736 | 754 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -39,15 +39,32 @@ | |
| 39 | ){ |
| 40 | Stmt q; |
| 41 | int nPrefix = strlen(zPrefix); |
| 42 | int nErr = 0; |
| 43 | Blob rewrittenPathname; |
| 44 | db_prepare(&q, |
| 45 | "SELECT pathname, deleted, chnged, rid, coalesce(origname!=pathname,0)" |
| 46 | " FROM vfile " |
| 47 | " WHERE is_selected(id)" |
| 48 | " AND (chnged OR deleted OR rid=0 OR pathname!=origname) ORDER BY 1" |
| 49 | ); |
| 50 | blob_zero(&rewrittenPathname); |
| 51 | while( db_step(&q)==SQLITE_ROW ){ |
| 52 | const char *zPathname = db_column_text(&q,0); |
| 53 | const char *zDisplayName = zPathname; |
| @@ -725,11 +742,12 @@ | |
| 725 | g.aCommitFile = fossil_malloc(sizeof(int)*(g.argc-1)); |
| 726 | |
| 727 | for(ii=2; ii<g.argc; ii++){ |
| 728 | int iId; |
| 729 | file_tree_name(g.argv[ii], &b, 1); |
| 730 | iId = db_int(-1, "SELECT id FROM vfile WHERE pathname=%Q", blob_str(&b)); |
| 731 | if( iId<0 ){ |
| 732 | fossil_warning("fossil knows nothing about: %s", g.argv[ii]); |
| 733 | result = 1; |
| 734 | }else{ |
| 735 | g.aCommitFile[jj++] = iId; |
| 736 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -39,15 +39,32 @@ | |
| 39 | ){ |
| 40 | Stmt q; |
| 41 | int nPrefix = strlen(zPrefix); |
| 42 | int nErr = 0; |
| 43 | Blob rewrittenPathname; |
| 44 | Blob where; |
| 45 | const char *zTreeName; |
| 46 | int i, nRoot; |
| 47 | |
| 48 | nRoot = (int)strlen(g.zLocalRoot); |
| 49 | for(i=2; i<g.argc; i++) { |
| 50 | Blob fname; |
| 51 | file_canonical_name(g.argv[i], &fname, 0); |
| 52 | zTreeName = blob_str(&fname)+nRoot; |
| 53 | blob_appendf(&where, " %s (pathname=%Q %s) " |
| 54 | "OR (pathname>'%q/' %s AND pathname<'%q0' %s)", |
| 55 | (blob_size(&where)>0) ? "OR" : "AND", zTreeName, |
| 56 | filename_collation(), zTreeName, filename_collation(), |
| 57 | zTreeName, filename_collation()); |
| 58 | } |
| 59 | |
| 60 | db_prepare(&q, |
| 61 | "SELECT pathname, deleted, chnged, rid, coalesce(origname!=pathname,0)" |
| 62 | " FROM vfile " |
| 63 | " WHERE is_selected(id) %s" |
| 64 | " AND (chnged OR deleted OR rid=0 OR pathname!=origname) ORDER BY 1", |
| 65 | blob_str(&where) |
| 66 | ); |
| 67 | blob_zero(&rewrittenPathname); |
| 68 | while( db_step(&q)==SQLITE_ROW ){ |
| 69 | const char *zPathname = db_column_text(&q,0); |
| 70 | const char *zDisplayName = zPathname; |
| @@ -725,11 +742,12 @@ | |
| 742 | g.aCommitFile = fossil_malloc(sizeof(int)*(g.argc-1)); |
| 743 | |
| 744 | for(ii=2; ii<g.argc; ii++){ |
| 745 | int iId; |
| 746 | file_tree_name(g.argv[ii], &b, 1); |
| 747 | iId = db_int(-1, "SELECT id FROM vfile WHERE pathname=%Q %s", |
| 748 | blob_str(&b), filename_collation() ); |
| 749 | if( iId<0 ){ |
| 750 | fossil_warning("fossil knows nothing about: %s", g.argv[ii]); |
| 751 | result = 1; |
| 752 | }else{ |
| 753 | g.aCommitFile[jj++] = iId; |
| 754 |
+4
-3
| --- www/changes.wiki | ||
| +++ www/changes.wiki | ||
| @@ -1,11 +1,12 @@ | ||
| 1 | 1 | <title>Change Log</title> |
| 2 | 2 | |
| 3 | 3 | <h2>Changes For Version 1.27 (as yet unreleased)</h2> |
| 4 | - * Enhance the [/help?cmd=clean | fossil clean], | |
| 5 | - [/help?cmd=extras | fossil extras] and [/help?cmd=ls | fossil ls] commands to | |
| 6 | - restrict operation to files and directories named on the command-line. | |
| 4 | + * Enhance the [/help?cmd=changes | fossil changes], | |
| 5 | + [/help?cmd=clean | fossil clean], [/help?cmd=extras | fossil extras], | |
| 6 | + [/help?cmd=ls | fossil ls] and [/help?cmd=status | fossil status] commands | |
| 7 | + to restrict operation to files and directories named on the command-line. | |
| 7 | 8 | |
| 8 | 9 | <h2>Changes For Version 1.26 (2013-06-18)</h2> |
| 9 | 10 | * The argument to the --port option for the [/help?cmd=ui | fossil ui] and |
| 10 | 11 | [/help?cmd=server | fossil server] commands can take an IP address in addition |
| 11 | 12 | to the port number, causing Fossil to bind to just that one IP address. |
| 12 | 13 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -1,11 +1,12 @@ | |
| 1 | <title>Change Log</title> |
| 2 | |
| 3 | <h2>Changes For Version 1.27 (as yet unreleased)</h2> |
| 4 | * Enhance the [/help?cmd=clean | fossil clean], |
| 5 | [/help?cmd=extras | fossil extras] and [/help?cmd=ls | fossil ls] commands to |
| 6 | restrict operation to files and directories named on the command-line. |
| 7 | |
| 8 | <h2>Changes For Version 1.26 (2013-06-18)</h2> |
| 9 | * The argument to the --port option for the [/help?cmd=ui | fossil ui] and |
| 10 | [/help?cmd=server | fossil server] commands can take an IP address in addition |
| 11 | to the port number, causing Fossil to bind to just that one IP address. |
| 12 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -1,11 +1,12 @@ | |
| 1 | <title>Change Log</title> |
| 2 | |
| 3 | <h2>Changes For Version 1.27 (as yet unreleased)</h2> |
| 4 | * Enhance the [/help?cmd=changes | fossil changes], |
| 5 | [/help?cmd=clean | fossil clean], [/help?cmd=extras | fossil extras], |
| 6 | [/help?cmd=ls | fossil ls] and [/help?cmd=status | fossil status] commands |
| 7 | to restrict operation to files and directories named on the command-line. |
| 8 | |
| 9 | <h2>Changes For Version 1.26 (2013-06-18)</h2> |
| 10 | * The argument to the --port option for the [/help?cmd=ui | fossil ui] and |
| 11 | [/help?cmd=server | fossil server] commands can take an IP address in addition |
| 12 | to the port number, causing Fossil to bind to just that one IP address. |
| 13 |