Fossil SCM
merge trunk
Commit
45cbbad4dd825cc9dd216fdbddd488682fae5d54
Parent
0ab66b742c58672…
14 files changed
+4
-3
+6
-4
+6
-4
+9
-4
+1
-1
+13
-7
+94
+3
-1
+39
+1
-1
+13
-7
+13
-7
+2
-2
+13
+4
-3
| --- Dockerfile | ||
| +++ Dockerfile | ||
| @@ -1,24 +1,25 @@ | ||
| 1 | 1 | ### |
| 2 | 2 | # Dockerfile for Fossil |
| 3 | 3 | ### |
| 4 | -FROM fedora:21 | |
| 4 | +FROM fedora:22 | |
| 5 | 5 | |
| 6 | 6 | ### Now install some additional parts we will need for the build |
| 7 | -RUN yum update -y && yum install -y gcc make zlib-devel openssl-devel tar && yum clean all && groupadd -r fossil -g 433 && useradd -u 431 -r -g fossil -d /opt/fossil -s /sbin/nologin -c "Fossil user" fossil | |
| 7 | +RUN dnf update -y && dnf install -y gcc make zlib-devel openssl-devel tar && dnf clean all && groupadd -r fossil -g 433 && useradd -u 431 -r -g fossil -d /opt/fossil -s /sbin/nologin -c "Fossil user" fossil | |
| 8 | 8 | |
| 9 | 9 | ### If you want to build "release", change the next line accordingly. |
| 10 | 10 | ENV FOSSIL_INSTALL_VERSION trunk |
| 11 | 11 | |
| 12 | 12 | RUN curl "http://core.tcl.tk/tcl/tarball/tcl-src.tar.gz?name=tcl-src&uuid=release" | tar zx |
| 13 | 13 | RUN cd tcl-src/unix && ./configure --prefix=/usr --disable-shared --disable-threads --disable-load && make && make install |
| 14 | 14 | RUN curl "http://www.fossil-scm.org/index.html/tarball/fossil-src.tar.gz?name=fossil-src&uuid=${FOSSIL_INSTALL_VERSION}" | tar zx |
| 15 | 15 | RUN cd fossil-src && ./configure --disable-fusefs --json --with-th1-docs --with-th1-hooks --with-tcl |
| 16 | +RUN cd fossil-src/src && mv main.c main.c.orig && sed s/\"now\"/0/ <main.c.orig >main.c | |
| 16 | 17 | RUN cd fossil-src && make && strip fossil && cp fossil /usr/bin && cd .. && rm -rf fossil-src && chmod a+rx /usr/bin/fossil && mkdir -p /opt/fossil && chown fossil:fossil /opt/fossil |
| 17 | 18 | |
| 18 | 19 | ### Build is done, remove modules no longer needed |
| 19 | -RUN yum remove -y gcc make zlib-devel openssl-devel tar && yum clean all | |
| 20 | +RUN dnf remove -y gcc make zlib-devel openssl-devel tar && dnf clean all | |
| 20 | 21 | |
| 21 | 22 | USER fossil |
| 22 | 23 | |
| 23 | 24 | ENV HOME /opt/fossil |
| 24 | 25 | |
| 25 | 26 |
| --- Dockerfile | |
| +++ Dockerfile | |
| @@ -1,24 +1,25 @@ | |
| 1 | ### |
| 2 | # Dockerfile for Fossil |
| 3 | ### |
| 4 | FROM fedora:21 |
| 5 | |
| 6 | ### Now install some additional parts we will need for the build |
| 7 | RUN yum update -y && yum install -y gcc make zlib-devel openssl-devel tar && yum clean all && groupadd -r fossil -g 433 && useradd -u 431 -r -g fossil -d /opt/fossil -s /sbin/nologin -c "Fossil user" fossil |
| 8 | |
| 9 | ### If you want to build "release", change the next line accordingly. |
| 10 | ENV FOSSIL_INSTALL_VERSION trunk |
| 11 | |
| 12 | RUN curl "http://core.tcl.tk/tcl/tarball/tcl-src.tar.gz?name=tcl-src&uuid=release" | tar zx |
| 13 | RUN cd tcl-src/unix && ./configure --prefix=/usr --disable-shared --disable-threads --disable-load && make && make install |
| 14 | RUN curl "http://www.fossil-scm.org/index.html/tarball/fossil-src.tar.gz?name=fossil-src&uuid=${FOSSIL_INSTALL_VERSION}" | tar zx |
| 15 | RUN cd fossil-src && ./configure --disable-fusefs --json --with-th1-docs --with-th1-hooks --with-tcl |
| 16 | RUN cd fossil-src && make && strip fossil && cp fossil /usr/bin && cd .. && rm -rf fossil-src && chmod a+rx /usr/bin/fossil && mkdir -p /opt/fossil && chown fossil:fossil /opt/fossil |
| 17 | |
| 18 | ### Build is done, remove modules no longer needed |
| 19 | RUN yum remove -y gcc make zlib-devel openssl-devel tar && yum clean all |
| 20 | |
| 21 | USER fossil |
| 22 | |
| 23 | ENV HOME /opt/fossil |
| 24 | |
| 25 |
| --- Dockerfile | |
| +++ Dockerfile | |
| @@ -1,24 +1,25 @@ | |
| 1 | ### |
| 2 | # Dockerfile for Fossil |
| 3 | ### |
| 4 | FROM fedora:22 |
| 5 | |
| 6 | ### Now install some additional parts we will need for the build |
| 7 | RUN dnf update -y && dnf install -y gcc make zlib-devel openssl-devel tar && dnf clean all && groupadd -r fossil -g 433 && useradd -u 431 -r -g fossil -d /opt/fossil -s /sbin/nologin -c "Fossil user" fossil |
| 8 | |
| 9 | ### If you want to build "release", change the next line accordingly. |
| 10 | ENV FOSSIL_INSTALL_VERSION trunk |
| 11 | |
| 12 | RUN curl "http://core.tcl.tk/tcl/tarball/tcl-src.tar.gz?name=tcl-src&uuid=release" | tar zx |
| 13 | RUN cd tcl-src/unix && ./configure --prefix=/usr --disable-shared --disable-threads --disable-load && make && make install |
| 14 | RUN curl "http://www.fossil-scm.org/index.html/tarball/fossil-src.tar.gz?name=fossil-src&uuid=${FOSSIL_INSTALL_VERSION}" | tar zx |
| 15 | RUN cd fossil-src && ./configure --disable-fusefs --json --with-th1-docs --with-th1-hooks --with-tcl |
| 16 | RUN cd fossil-src/src && mv main.c main.c.orig && sed s/\"now\"/0/ <main.c.orig >main.c |
| 17 | RUN cd fossil-src && make && strip fossil && cp fossil /usr/bin && cd .. && rm -rf fossil-src && chmod a+rx /usr/bin/fossil && mkdir -p /opt/fossil && chown fossil:fossil /opt/fossil |
| 18 | |
| 19 | ### Build is done, remove modules no longer needed |
| 20 | RUN dnf remove -y gcc make zlib-devel openssl-devel tar && dnf clean all |
| 21 | |
| 22 | USER fossil |
| 23 | |
| 24 | ENV HOME /opt/fossil |
| 25 | |
| 26 |
+6
-4
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -62,11 +62,11 @@ | ||
| 62 | 62 | zName, filename_collation() |
| 63 | 63 | ); |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | db_prepare(&q, |
| 67 | - "SELECT pathname, deleted, chnged, rid, coalesce(origname!=pathname,0)" | |
| 67 | + "SELECT pathname, deleted, chnged, rid, coalesce(origname!=pathname,0), islink" | |
| 68 | 68 | " FROM vfile " |
| 69 | 69 | " WHERE is_selected(id) %s" |
| 70 | 70 | " AND (chnged OR deleted OR rid=0 OR pathname!=origname)" |
| 71 | 71 | " ORDER BY 1 /*scan*/", |
| 72 | 72 | blob_sql_text(&where) |
| @@ -77,10 +77,11 @@ | ||
| 77 | 77 | const char *zDisplayName = zPathname; |
| 78 | 78 | int isDeleted = db_column_int(&q, 1); |
| 79 | 79 | int isChnged = db_column_int(&q,2); |
| 80 | 80 | int isNew = db_column_int(&q,3)==0; |
| 81 | 81 | int isRenamed = db_column_int(&q,4); |
| 82 | + int isLink = db_column_int(&q,5); | |
| 82 | 83 | char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname); |
| 83 | 84 | if( cwdRelative ){ |
| 84 | 85 | file_relative_name(zFullName, &rewrittenPathname, 0); |
| 85 | 86 | zDisplayName = blob_str(&rewrittenPathname); |
| 86 | 87 | if( zDisplayName[0]=='.' && zDisplayName[1]=='/' ){ |
| @@ -121,11 +122,11 @@ | ||
| 121 | 122 | blob_appendf(report, "SYMLINK %s\n", zDisplayName); |
| 122 | 123 | }else if( isChnged==8 ){ |
| 123 | 124 | blob_appendf(report, "UNEXEC %s\n", zDisplayName); |
| 124 | 125 | }else if( isChnged==9 ){ |
| 125 | 126 | blob_appendf(report, "UNLINK %s\n", zDisplayName); |
| 126 | - }else if( file_contains_merge_marker(zFullName) ){ | |
| 127 | + }else if( !isLink && file_contains_merge_marker(zFullName) ){ | |
| 127 | 128 | blob_appendf(report, "CONFLICT %s\n", zDisplayName); |
| 128 | 129 | }else{ |
| 129 | 130 | blob_appendf(report, "EDITED %s\n", zDisplayName); |
| 130 | 131 | } |
| 131 | 132 | }else if( isRenamed ){ |
| @@ -434,11 +435,11 @@ | ||
| 434 | 435 | " ORDER BY %s", |
| 435 | 436 | vid, timeline_utc(), blob_sql_text(&where), zOrderBy /*safe-for-%s*/ |
| 436 | 437 | ); |
| 437 | 438 | }else{ |
| 438 | 439 | db_prepare(&q, |
| 439 | - "SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0)" | |
| 440 | + "SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0), islink" | |
| 440 | 441 | " FROM vfile %s" |
| 441 | 442 | " ORDER BY %s", blob_sql_text(&where), zOrderBy /*safe-for-%s*/ |
| 442 | 443 | ); |
| 443 | 444 | } |
| 444 | 445 | blob_reset(&where); |
| @@ -446,10 +447,11 @@ | ||
| 446 | 447 | const char *zPathname = db_column_text(&q,0); |
| 447 | 448 | int isDeleted = db_column_int(&q, 1); |
| 448 | 449 | int isNew = db_column_int(&q,2)==0; |
| 449 | 450 | int chnged = db_column_int(&q,3); |
| 450 | 451 | int renamed = db_column_int(&q,4); |
| 452 | + int isLink = db_column_int(&q,5); | |
| 451 | 453 | char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname); |
| 452 | 454 | const char *type = ""; |
| 453 | 455 | if( verboseFlag ){ |
| 454 | 456 | if( isNew ){ |
| 455 | 457 | type = "ADDED "; |
| @@ -468,11 +470,11 @@ | ||
| 468 | 470 | type = "ADDED_BY_MERGE "; |
| 469 | 471 | }else if( chnged==4 ){ |
| 470 | 472 | type = "UPDATED_BY_INTEGRATE "; |
| 471 | 473 | }else if( chnged==5 ){ |
| 472 | 474 | type = "ADDED_BY_INTEGRATE "; |
| 473 | - }else if( file_contains_merge_marker(zFullName) ){ | |
| 475 | + }else if( !isLink && file_contains_merge_marker(zFullName) ){ | |
| 474 | 476 | type = "CONFLICT "; |
| 475 | 477 | }else{ |
| 476 | 478 | type = "EDITED "; |
| 477 | 479 | } |
| 478 | 480 | }else if( renamed ){ |
| 479 | 481 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -62,11 +62,11 @@ | |
| 62 | zName, filename_collation() |
| 63 | ); |
| 64 | } |
| 65 | |
| 66 | db_prepare(&q, |
| 67 | "SELECT pathname, deleted, chnged, rid, coalesce(origname!=pathname,0)" |
| 68 | " FROM vfile " |
| 69 | " WHERE is_selected(id) %s" |
| 70 | " AND (chnged OR deleted OR rid=0 OR pathname!=origname)" |
| 71 | " ORDER BY 1 /*scan*/", |
| 72 | blob_sql_text(&where) |
| @@ -77,10 +77,11 @@ | |
| 77 | const char *zDisplayName = zPathname; |
| 78 | int isDeleted = db_column_int(&q, 1); |
| 79 | int isChnged = db_column_int(&q,2); |
| 80 | int isNew = db_column_int(&q,3)==0; |
| 81 | int isRenamed = db_column_int(&q,4); |
| 82 | char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname); |
| 83 | if( cwdRelative ){ |
| 84 | file_relative_name(zFullName, &rewrittenPathname, 0); |
| 85 | zDisplayName = blob_str(&rewrittenPathname); |
| 86 | if( zDisplayName[0]=='.' && zDisplayName[1]=='/' ){ |
| @@ -121,11 +122,11 @@ | |
| 121 | blob_appendf(report, "SYMLINK %s\n", zDisplayName); |
| 122 | }else if( isChnged==8 ){ |
| 123 | blob_appendf(report, "UNEXEC %s\n", zDisplayName); |
| 124 | }else if( isChnged==9 ){ |
| 125 | blob_appendf(report, "UNLINK %s\n", zDisplayName); |
| 126 | }else if( file_contains_merge_marker(zFullName) ){ |
| 127 | blob_appendf(report, "CONFLICT %s\n", zDisplayName); |
| 128 | }else{ |
| 129 | blob_appendf(report, "EDITED %s\n", zDisplayName); |
| 130 | } |
| 131 | }else if( isRenamed ){ |
| @@ -434,11 +435,11 @@ | |
| 434 | " ORDER BY %s", |
| 435 | vid, timeline_utc(), blob_sql_text(&where), zOrderBy /*safe-for-%s*/ |
| 436 | ); |
| 437 | }else{ |
| 438 | db_prepare(&q, |
| 439 | "SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0)" |
| 440 | " FROM vfile %s" |
| 441 | " ORDER BY %s", blob_sql_text(&where), zOrderBy /*safe-for-%s*/ |
| 442 | ); |
| 443 | } |
| 444 | blob_reset(&where); |
| @@ -446,10 +447,11 @@ | |
| 446 | const char *zPathname = db_column_text(&q,0); |
| 447 | int isDeleted = db_column_int(&q, 1); |
| 448 | int isNew = db_column_int(&q,2)==0; |
| 449 | int chnged = db_column_int(&q,3); |
| 450 | int renamed = db_column_int(&q,4); |
| 451 | char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname); |
| 452 | const char *type = ""; |
| 453 | if( verboseFlag ){ |
| 454 | if( isNew ){ |
| 455 | type = "ADDED "; |
| @@ -468,11 +470,11 @@ | |
| 468 | type = "ADDED_BY_MERGE "; |
| 469 | }else if( chnged==4 ){ |
| 470 | type = "UPDATED_BY_INTEGRATE "; |
| 471 | }else if( chnged==5 ){ |
| 472 | type = "ADDED_BY_INTEGRATE "; |
| 473 | }else if( file_contains_merge_marker(zFullName) ){ |
| 474 | type = "CONFLICT "; |
| 475 | }else{ |
| 476 | type = "EDITED "; |
| 477 | } |
| 478 | }else if( renamed ){ |
| 479 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -62,11 +62,11 @@ | |
| 62 | zName, filename_collation() |
| 63 | ); |
| 64 | } |
| 65 | |
| 66 | db_prepare(&q, |
| 67 | "SELECT pathname, deleted, chnged, rid, coalesce(origname!=pathname,0), islink" |
| 68 | " FROM vfile " |
| 69 | " WHERE is_selected(id) %s" |
| 70 | " AND (chnged OR deleted OR rid=0 OR pathname!=origname)" |
| 71 | " ORDER BY 1 /*scan*/", |
| 72 | blob_sql_text(&where) |
| @@ -77,10 +77,11 @@ | |
| 77 | const char *zDisplayName = zPathname; |
| 78 | int isDeleted = db_column_int(&q, 1); |
| 79 | int isChnged = db_column_int(&q,2); |
| 80 | int isNew = db_column_int(&q,3)==0; |
| 81 | int isRenamed = db_column_int(&q,4); |
| 82 | int isLink = db_column_int(&q,5); |
| 83 | char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname); |
| 84 | if( cwdRelative ){ |
| 85 | file_relative_name(zFullName, &rewrittenPathname, 0); |
| 86 | zDisplayName = blob_str(&rewrittenPathname); |
| 87 | if( zDisplayName[0]=='.' && zDisplayName[1]=='/' ){ |
| @@ -121,11 +122,11 @@ | |
| 122 | blob_appendf(report, "SYMLINK %s\n", zDisplayName); |
| 123 | }else if( isChnged==8 ){ |
| 124 | blob_appendf(report, "UNEXEC %s\n", zDisplayName); |
| 125 | }else if( isChnged==9 ){ |
| 126 | blob_appendf(report, "UNLINK %s\n", zDisplayName); |
| 127 | }else if( !isLink && file_contains_merge_marker(zFullName) ){ |
| 128 | blob_appendf(report, "CONFLICT %s\n", zDisplayName); |
| 129 | }else{ |
| 130 | blob_appendf(report, "EDITED %s\n", zDisplayName); |
| 131 | } |
| 132 | }else if( isRenamed ){ |
| @@ -434,11 +435,11 @@ | |
| 435 | " ORDER BY %s", |
| 436 | vid, timeline_utc(), blob_sql_text(&where), zOrderBy /*safe-for-%s*/ |
| 437 | ); |
| 438 | }else{ |
| 439 | db_prepare(&q, |
| 440 | "SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0), islink" |
| 441 | " FROM vfile %s" |
| 442 | " ORDER BY %s", blob_sql_text(&where), zOrderBy /*safe-for-%s*/ |
| 443 | ); |
| 444 | } |
| 445 | blob_reset(&where); |
| @@ -446,10 +447,11 @@ | |
| 447 | const char *zPathname = db_column_text(&q,0); |
| 448 | int isDeleted = db_column_int(&q, 1); |
| 449 | int isNew = db_column_int(&q,2)==0; |
| 450 | int chnged = db_column_int(&q,3); |
| 451 | int renamed = db_column_int(&q,4); |
| 452 | int isLink = db_column_int(&q,5); |
| 453 | char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname); |
| 454 | const char *type = ""; |
| 455 | if( verboseFlag ){ |
| 456 | if( isNew ){ |
| 457 | type = "ADDED "; |
| @@ -468,11 +470,11 @@ | |
| 470 | type = "ADDED_BY_MERGE "; |
| 471 | }else if( chnged==4 ){ |
| 472 | type = "UPDATED_BY_INTEGRATE "; |
| 473 | }else if( chnged==5 ){ |
| 474 | type = "ADDED_BY_INTEGRATE "; |
| 475 | }else if( !isLink && file_contains_merge_marker(zFullName) ){ |
| 476 | type = "CONFLICT "; |
| 477 | }else{ |
| 478 | type = "EDITED "; |
| 479 | } |
| 480 | }else if( renamed ){ |
| 481 |
+6
-4
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -62,11 +62,11 @@ | ||
| 62 | 62 | zName, filename_collation() |
| 63 | 63 | ); |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | db_prepare(&q, |
| 67 | - "SELECT pathname, deleted, chnged, rid, coalesce(origname!=pathname,0)" | |
| 67 | + "SELECT pathname, deleted, chnged, rid, coalesce(origname!=pathname,0), islink" | |
| 68 | 68 | " FROM vfile " |
| 69 | 69 | " WHERE is_selected(id) %s" |
| 70 | 70 | " AND (chnged OR deleted OR rid=0 OR pathname!=origname)" |
| 71 | 71 | " ORDER BY 1 /*scan*/", |
| 72 | 72 | blob_sql_text(&where) |
| @@ -77,10 +77,11 @@ | ||
| 77 | 77 | const char *zDisplayName = zPathname; |
| 78 | 78 | int isDeleted = db_column_int(&q, 1); |
| 79 | 79 | int isChnged = db_column_int(&q,2); |
| 80 | 80 | int isNew = db_column_int(&q,3)==0; |
| 81 | 81 | int isRenamed = db_column_int(&q,4); |
| 82 | + int isLink = db_column_int(&q,5); | |
| 82 | 83 | char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname); |
| 83 | 84 | if( cwdRelative ){ |
| 84 | 85 | file_relative_name(zFullName, &rewrittenPathname, 0); |
| 85 | 86 | zDisplayName = blob_str(&rewrittenPathname); |
| 86 | 87 | if( zDisplayName[0]=='.' && zDisplayName[1]=='/' ){ |
| @@ -121,11 +122,11 @@ | ||
| 121 | 122 | blob_appendf(report, "SYMLINK %s\n", zDisplayName); |
| 122 | 123 | }else if( isChnged==8 ){ |
| 123 | 124 | blob_appendf(report, "UNEXEC %s\n", zDisplayName); |
| 124 | 125 | }else if( isChnged==9 ){ |
| 125 | 126 | blob_appendf(report, "UNLINK %s\n", zDisplayName); |
| 126 | - }else if( file_contains_merge_marker(zFullName) ){ | |
| 127 | + }else if( !isLink && file_contains_merge_marker(zFullName) ){ | |
| 127 | 128 | blob_appendf(report, "CONFLICT %s\n", zDisplayName); |
| 128 | 129 | }else{ |
| 129 | 130 | blob_appendf(report, "EDITED %s\n", zDisplayName); |
| 130 | 131 | } |
| 131 | 132 | }else if( isRenamed ){ |
| @@ -434,11 +435,11 @@ | ||
| 434 | 435 | " ORDER BY %s", |
| 435 | 436 | vid, timeline_utc(), blob_sql_text(&where), zOrderBy /*safe-for-%s*/ |
| 436 | 437 | ); |
| 437 | 438 | }else{ |
| 438 | 439 | db_prepare(&q, |
| 439 | - "SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0)" | |
| 440 | + "SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0), islink" | |
| 440 | 441 | " FROM vfile %s" |
| 441 | 442 | " ORDER BY %s", blob_sql_text(&where), zOrderBy /*safe-for-%s*/ |
| 442 | 443 | ); |
| 443 | 444 | } |
| 444 | 445 | blob_reset(&where); |
| @@ -446,10 +447,11 @@ | ||
| 446 | 447 | const char *zPathname = db_column_text(&q,0); |
| 447 | 448 | int isDeleted = db_column_int(&q, 1); |
| 448 | 449 | int isNew = db_column_int(&q,2)==0; |
| 449 | 450 | int chnged = db_column_int(&q,3); |
| 450 | 451 | int renamed = db_column_int(&q,4); |
| 452 | + int isLink = db_column_int(&q,5); | |
| 451 | 453 | char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname); |
| 452 | 454 | const char *type = ""; |
| 453 | 455 | if( verboseFlag ){ |
| 454 | 456 | if( isNew ){ |
| 455 | 457 | type = "ADDED "; |
| @@ -468,11 +470,11 @@ | ||
| 468 | 470 | type = "ADDED_BY_MERGE "; |
| 469 | 471 | }else if( chnged==4 ){ |
| 470 | 472 | type = "UPDATED_BY_INTEGRATE "; |
| 471 | 473 | }else if( chnged==5 ){ |
| 472 | 474 | type = "ADDED_BY_INTEGRATE "; |
| 473 | - }else if( file_contains_merge_marker(zFullName) ){ | |
| 475 | + }else if( !isLink && file_contains_merge_marker(zFullName) ){ | |
| 474 | 476 | type = "CONFLICT "; |
| 475 | 477 | }else{ |
| 476 | 478 | type = "EDITED "; |
| 477 | 479 | } |
| 478 | 480 | }else if( renamed ){ |
| 479 | 481 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -62,11 +62,11 @@ | |
| 62 | zName, filename_collation() |
| 63 | ); |
| 64 | } |
| 65 | |
| 66 | db_prepare(&q, |
| 67 | "SELECT pathname, deleted, chnged, rid, coalesce(origname!=pathname,0)" |
| 68 | " FROM vfile " |
| 69 | " WHERE is_selected(id) %s" |
| 70 | " AND (chnged OR deleted OR rid=0 OR pathname!=origname)" |
| 71 | " ORDER BY 1 /*scan*/", |
| 72 | blob_sql_text(&where) |
| @@ -77,10 +77,11 @@ | |
| 77 | const char *zDisplayName = zPathname; |
| 78 | int isDeleted = db_column_int(&q, 1); |
| 79 | int isChnged = db_column_int(&q,2); |
| 80 | int isNew = db_column_int(&q,3)==0; |
| 81 | int isRenamed = db_column_int(&q,4); |
| 82 | char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname); |
| 83 | if( cwdRelative ){ |
| 84 | file_relative_name(zFullName, &rewrittenPathname, 0); |
| 85 | zDisplayName = blob_str(&rewrittenPathname); |
| 86 | if( zDisplayName[0]=='.' && zDisplayName[1]=='/' ){ |
| @@ -121,11 +122,11 @@ | |
| 121 | blob_appendf(report, "SYMLINK %s\n", zDisplayName); |
| 122 | }else if( isChnged==8 ){ |
| 123 | blob_appendf(report, "UNEXEC %s\n", zDisplayName); |
| 124 | }else if( isChnged==9 ){ |
| 125 | blob_appendf(report, "UNLINK %s\n", zDisplayName); |
| 126 | }else if( file_contains_merge_marker(zFullName) ){ |
| 127 | blob_appendf(report, "CONFLICT %s\n", zDisplayName); |
| 128 | }else{ |
| 129 | blob_appendf(report, "EDITED %s\n", zDisplayName); |
| 130 | } |
| 131 | }else if( isRenamed ){ |
| @@ -434,11 +435,11 @@ | |
| 434 | " ORDER BY %s", |
| 435 | vid, timeline_utc(), blob_sql_text(&where), zOrderBy /*safe-for-%s*/ |
| 436 | ); |
| 437 | }else{ |
| 438 | db_prepare(&q, |
| 439 | "SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0)" |
| 440 | " FROM vfile %s" |
| 441 | " ORDER BY %s", blob_sql_text(&where), zOrderBy /*safe-for-%s*/ |
| 442 | ); |
| 443 | } |
| 444 | blob_reset(&where); |
| @@ -446,10 +447,11 @@ | |
| 446 | const char *zPathname = db_column_text(&q,0); |
| 447 | int isDeleted = db_column_int(&q, 1); |
| 448 | int isNew = db_column_int(&q,2)==0; |
| 449 | int chnged = db_column_int(&q,3); |
| 450 | int renamed = db_column_int(&q,4); |
| 451 | char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname); |
| 452 | const char *type = ""; |
| 453 | if( verboseFlag ){ |
| 454 | if( isNew ){ |
| 455 | type = "ADDED "; |
| @@ -468,11 +470,11 @@ | |
| 468 | type = "ADDED_BY_MERGE "; |
| 469 | }else if( chnged==4 ){ |
| 470 | type = "UPDATED_BY_INTEGRATE "; |
| 471 | }else if( chnged==5 ){ |
| 472 | type = "ADDED_BY_INTEGRATE "; |
| 473 | }else if( file_contains_merge_marker(zFullName) ){ |
| 474 | type = "CONFLICT "; |
| 475 | }else{ |
| 476 | type = "EDITED "; |
| 477 | } |
| 478 | }else if( renamed ){ |
| 479 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -62,11 +62,11 @@ | |
| 62 | zName, filename_collation() |
| 63 | ); |
| 64 | } |
| 65 | |
| 66 | db_prepare(&q, |
| 67 | "SELECT pathname, deleted, chnged, rid, coalesce(origname!=pathname,0), islink" |
| 68 | " FROM vfile " |
| 69 | " WHERE is_selected(id) %s" |
| 70 | " AND (chnged OR deleted OR rid=0 OR pathname!=origname)" |
| 71 | " ORDER BY 1 /*scan*/", |
| 72 | blob_sql_text(&where) |
| @@ -77,10 +77,11 @@ | |
| 77 | const char *zDisplayName = zPathname; |
| 78 | int isDeleted = db_column_int(&q, 1); |
| 79 | int isChnged = db_column_int(&q,2); |
| 80 | int isNew = db_column_int(&q,3)==0; |
| 81 | int isRenamed = db_column_int(&q,4); |
| 82 | int isLink = db_column_int(&q,5); |
| 83 | char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname); |
| 84 | if( cwdRelative ){ |
| 85 | file_relative_name(zFullName, &rewrittenPathname, 0); |
| 86 | zDisplayName = blob_str(&rewrittenPathname); |
| 87 | if( zDisplayName[0]=='.' && zDisplayName[1]=='/' ){ |
| @@ -121,11 +122,11 @@ | |
| 122 | blob_appendf(report, "SYMLINK %s\n", zDisplayName); |
| 123 | }else if( isChnged==8 ){ |
| 124 | blob_appendf(report, "UNEXEC %s\n", zDisplayName); |
| 125 | }else if( isChnged==9 ){ |
| 126 | blob_appendf(report, "UNLINK %s\n", zDisplayName); |
| 127 | }else if( !isLink && file_contains_merge_marker(zFullName) ){ |
| 128 | blob_appendf(report, "CONFLICT %s\n", zDisplayName); |
| 129 | }else{ |
| 130 | blob_appendf(report, "EDITED %s\n", zDisplayName); |
| 131 | } |
| 132 | }else if( isRenamed ){ |
| @@ -434,11 +435,11 @@ | |
| 435 | " ORDER BY %s", |
| 436 | vid, timeline_utc(), blob_sql_text(&where), zOrderBy /*safe-for-%s*/ |
| 437 | ); |
| 438 | }else{ |
| 439 | db_prepare(&q, |
| 440 | "SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0), islink" |
| 441 | " FROM vfile %s" |
| 442 | " ORDER BY %s", blob_sql_text(&where), zOrderBy /*safe-for-%s*/ |
| 443 | ); |
| 444 | } |
| 445 | blob_reset(&where); |
| @@ -446,10 +447,11 @@ | |
| 447 | const char *zPathname = db_column_text(&q,0); |
| 448 | int isDeleted = db_column_int(&q, 1); |
| 449 | int isNew = db_column_int(&q,2)==0; |
| 450 | int chnged = db_column_int(&q,3); |
| 451 | int renamed = db_column_int(&q,4); |
| 452 | int isLink = db_column_int(&q,5); |
| 453 | char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname); |
| 454 | const char *type = ""; |
| 455 | if( verboseFlag ){ |
| 456 | if( isNew ){ |
| 457 | type = "ADDED "; |
| @@ -468,11 +470,11 @@ | |
| 470 | type = "ADDED_BY_MERGE "; |
| 471 | }else if( chnged==4 ){ |
| 472 | type = "UPDATED_BY_INTEGRATE "; |
| 473 | }else if( chnged==5 ){ |
| 474 | type = "ADDED_BY_INTEGRATE "; |
| 475 | }else if( !isLink && file_contains_merge_marker(zFullName) ){ |
| 476 | type = "CONFLICT "; |
| 477 | }else{ |
| 478 | type = "EDITED "; |
| 479 | } |
| 480 | }else if( renamed ){ |
| 481 |
+9
-4
| --- src/doc.c | ||
| +++ src/doc.c | ||
| @@ -522,14 +522,16 @@ | ||
| 522 | 522 | ** for looking at what a file will look like using the /doc webpage after |
| 523 | 523 | ** it gets checked in. |
| 524 | 524 | ** |
| 525 | 525 | ** The file extension is used to decide how to render the file. |
| 526 | 526 | ** |
| 527 | -** If FILE ends in "/" then names "FILE/index.html", "FILE/index.wiki", | |
| 528 | -** and "FILE/index.md" are tried in that order. If none of those are found, | |
| 529 | -** then FILE is completely replaced by "404.md" and tried. If that is | |
| 530 | -** not found, then a default 404 screen is generated. | |
| 527 | +** If FILE ends in "/" then the names "FILE/index.html", "FILE/index.wiki", | |
| 528 | +** and "FILE/index.md" are tried in that order. If the binary was compiled | |
| 529 | +** with TH1 embedded documentation support and the "th1-docs" setting is | |
| 530 | +** enabled, the name "FILE/index.th1" is also tried. If none of those are | |
| 531 | +** found, then FILE is completely replaced by "404.md" and tried. If that | |
| 532 | +** is not found, then a default 404 screen is generated. | |
| 531 | 533 | */ |
| 532 | 534 | void doc_page(void){ |
| 533 | 535 | const char *zName; /* Argument to the /doc page */ |
| 534 | 536 | const char *zOrigName = "?"; /* Original document name */ |
| 535 | 537 | const char *zMime; /* Document MIME type */ |
| @@ -540,10 +542,13 @@ | ||
| 540 | 542 | Blob filebody; /* Content of the documentation file */ |
| 541 | 543 | Blob title; /* Document title */ |
| 542 | 544 | int nMiss = (-1); /* Failed attempts to find the document */ |
| 543 | 545 | static const char *const azSuffix[] = { |
| 544 | 546 | "index.html", "index.wiki", "index.md" |
| 547 | +#ifdef FOSSIL_ENABLE_TH1_DOCS | |
| 548 | + , "index.th1" | |
| 549 | +#endif | |
| 545 | 550 | }; |
| 546 | 551 | |
| 547 | 552 | login_check_credentials(); |
| 548 | 553 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 549 | 554 | blob_init(&title, 0, 0); |
| 550 | 555 |
| --- src/doc.c | |
| +++ src/doc.c | |
| @@ -522,14 +522,16 @@ | |
| 522 | ** for looking at what a file will look like using the /doc webpage after |
| 523 | ** it gets checked in. |
| 524 | ** |
| 525 | ** The file extension is used to decide how to render the file. |
| 526 | ** |
| 527 | ** If FILE ends in "/" then names "FILE/index.html", "FILE/index.wiki", |
| 528 | ** and "FILE/index.md" are tried in that order. If none of those are found, |
| 529 | ** then FILE is completely replaced by "404.md" and tried. If that is |
| 530 | ** not found, then a default 404 screen is generated. |
| 531 | */ |
| 532 | void doc_page(void){ |
| 533 | const char *zName; /* Argument to the /doc page */ |
| 534 | const char *zOrigName = "?"; /* Original document name */ |
| 535 | const char *zMime; /* Document MIME type */ |
| @@ -540,10 +542,13 @@ | |
| 540 | Blob filebody; /* Content of the documentation file */ |
| 541 | Blob title; /* Document title */ |
| 542 | int nMiss = (-1); /* Failed attempts to find the document */ |
| 543 | static const char *const azSuffix[] = { |
| 544 | "index.html", "index.wiki", "index.md" |
| 545 | }; |
| 546 | |
| 547 | login_check_credentials(); |
| 548 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 549 | blob_init(&title, 0, 0); |
| 550 |
| --- src/doc.c | |
| +++ src/doc.c | |
| @@ -522,14 +522,16 @@ | |
| 522 | ** for looking at what a file will look like using the /doc webpage after |
| 523 | ** it gets checked in. |
| 524 | ** |
| 525 | ** The file extension is used to decide how to render the file. |
| 526 | ** |
| 527 | ** If FILE ends in "/" then the names "FILE/index.html", "FILE/index.wiki", |
| 528 | ** and "FILE/index.md" are tried in that order. If the binary was compiled |
| 529 | ** with TH1 embedded documentation support and the "th1-docs" setting is |
| 530 | ** enabled, the name "FILE/index.th1" is also tried. If none of those are |
| 531 | ** found, then FILE is completely replaced by "404.md" and tried. If that |
| 532 | ** is not found, then a default 404 screen is generated. |
| 533 | */ |
| 534 | void doc_page(void){ |
| 535 | const char *zName; /* Argument to the /doc page */ |
| 536 | const char *zOrigName = "?"; /* Original document name */ |
| 537 | const char *zMime; /* Document MIME type */ |
| @@ -540,10 +542,13 @@ | |
| 542 | Blob filebody; /* Content of the documentation file */ |
| 543 | Blob title; /* Document title */ |
| 544 | int nMiss = (-1); /* Failed attempts to find the document */ |
| 545 | static const char *const azSuffix[] = { |
| 546 | "index.html", "index.wiki", "index.md" |
| 547 | #ifdef FOSSIL_ENABLE_TH1_DOCS |
| 548 | , "index.th1" |
| 549 | #endif |
| 550 | }; |
| 551 | |
| 552 | login_check_credentials(); |
| 553 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 554 | blob_init(&title, 0, 0); |
| 555 |
+1
-1
| --- src/import.c | ||
| +++ src/import.c | ||
| @@ -1419,11 +1419,11 @@ | ||
| 1419 | 1419 | if( strncmp(zKind, "dir", 3)!=0 ){ |
| 1420 | 1420 | if( deltaFlag ){ |
| 1421 | 1421 | Blob deltaSrc; |
| 1422 | 1422 | Blob target; |
| 1423 | 1423 | rid = db_int(0, "SELECT rid FROM blob WHERE uuid=(" |
| 1424 | - " SELECT uuid FROM xfiles" | |
| 1424 | + " SELECT tuuid FROM xfiles" | |
| 1425 | 1425 | " WHERE tpath=%Q AND tbranch=%d" |
| 1426 | 1426 | ")", zFile, branchId); |
| 1427 | 1427 | content_get(rid, &deltaSrc); |
| 1428 | 1428 | svn_apply_svndiff(&rec.content, &deltaSrc, &target); |
| 1429 | 1429 | rid = content_put(&target); |
| 1430 | 1430 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -1419,11 +1419,11 @@ | |
| 1419 | if( strncmp(zKind, "dir", 3)!=0 ){ |
| 1420 | if( deltaFlag ){ |
| 1421 | Blob deltaSrc; |
| 1422 | Blob target; |
| 1423 | rid = db_int(0, "SELECT rid FROM blob WHERE uuid=(" |
| 1424 | " SELECT uuid FROM xfiles" |
| 1425 | " WHERE tpath=%Q AND tbranch=%d" |
| 1426 | ")", zFile, branchId); |
| 1427 | content_get(rid, &deltaSrc); |
| 1428 | svn_apply_svndiff(&rec.content, &deltaSrc, &target); |
| 1429 | rid = content_put(&target); |
| 1430 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -1419,11 +1419,11 @@ | |
| 1419 | if( strncmp(zKind, "dir", 3)!=0 ){ |
| 1420 | if( deltaFlag ){ |
| 1421 | Blob deltaSrc; |
| 1422 | Blob target; |
| 1423 | rid = db_int(0, "SELECT rid FROM blob WHERE uuid=(" |
| 1424 | " SELECT tuuid FROM xfiles" |
| 1425 | " WHERE tpath=%Q AND tbranch=%d" |
| 1426 | ")", zFile, branchId); |
| 1427 | content_get(rid, &deltaSrc); |
| 1428 | svn_apply_svndiff(&rec.content, &deltaSrc, &target); |
| 1429 | rid = content_put(&target); |
| 1430 |
+13
-7
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -456,10 +456,14 @@ | ||
| 456 | 456 | # to regenerate this file. |
| 457 | 457 | # |
| 458 | 458 | # This is a makefile for use on Cygwin/Darwin/FreeBSD/Linux/Windows using |
| 459 | 459 | # MinGW or MinGW-w64. |
| 460 | 460 | # |
| 461 | +# Some of the special options which can be passed to make | |
| 462 | +# USE_WINDOWS=1 if building under a windows command prompt | |
| 463 | +# X64=1 if using an unprefixed 64-bit mingw compiler | |
| 464 | +# | |
| 461 | 465 | |
| 462 | 466 | #### Select one of MinGW, MinGW-w64 (32-bit) or MinGW-w64 (64-bit) compilers. |
| 463 | 467 | # By default, this is an empty string (i.e. use the native compiler). |
| 464 | 468 | # |
| 465 | 469 | PREFIX = |
| @@ -644,23 +648,25 @@ | ||
| 644 | 648 | # will run on the target platform. This is usually the same |
| 645 | 649 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 646 | 650 | # the finished binary for fossil. The BCC compiler above is used |
| 647 | 651 | # for building intermediate code-generator tools. |
| 648 | 652 | # |
| 649 | -TCC = $(PREFIX)gcc -Os -Wall | |
| 650 | - | |
| 651 | -#### When not using the miniz compression library, zlib is required. | |
| 652 | -# | |
| 653 | -ifndef FOSSIL_ENABLE_MINIZ | |
| 654 | -TCC += -L$(ZLIBDIR) -I$(ZINCDIR) | |
| 655 | -endif | |
| 653 | +TCC = $(PREFIX)gcc -Wall | |
| 656 | 654 | |
| 657 | 655 | #### Add the necessary command line options to build with debugging |
| 658 | 656 | # symbols, if enabled. |
| 659 | 657 | # |
| 660 | 658 | ifdef FOSSIL_ENABLE_SYMBOLS |
| 661 | 659 | TCC += -g |
| 660 | +else | |
| 661 | +TCC += -Os | |
| 662 | +endif | |
| 663 | + | |
| 664 | +#### When not using the miniz compression library, zlib is required. | |
| 665 | +# | |
| 666 | +ifndef FOSSIL_ENABLE_MINIZ | |
| 667 | +TCC += -L$(ZLIBDIR) -I$(ZINCDIR) | |
| 662 | 668 | endif |
| 663 | 669 | |
| 664 | 670 | #### Compile resources for use in building executables that will run |
| 665 | 671 | # on the target platform. |
| 666 | 672 | # |
| 667 | 673 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -456,10 +456,14 @@ | |
| 456 | # to regenerate this file. |
| 457 | # |
| 458 | # This is a makefile for use on Cygwin/Darwin/FreeBSD/Linux/Windows using |
| 459 | # MinGW or MinGW-w64. |
| 460 | # |
| 461 | |
| 462 | #### Select one of MinGW, MinGW-w64 (32-bit) or MinGW-w64 (64-bit) compilers. |
| 463 | # By default, this is an empty string (i.e. use the native compiler). |
| 464 | # |
| 465 | PREFIX = |
| @@ -644,23 +648,25 @@ | |
| 644 | # will run on the target platform. This is usually the same |
| 645 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 646 | # the finished binary for fossil. The BCC compiler above is used |
| 647 | # for building intermediate code-generator tools. |
| 648 | # |
| 649 | TCC = $(PREFIX)gcc -Os -Wall |
| 650 | |
| 651 | #### When not using the miniz compression library, zlib is required. |
| 652 | # |
| 653 | ifndef FOSSIL_ENABLE_MINIZ |
| 654 | TCC += -L$(ZLIBDIR) -I$(ZINCDIR) |
| 655 | endif |
| 656 | |
| 657 | #### Add the necessary command line options to build with debugging |
| 658 | # symbols, if enabled. |
| 659 | # |
| 660 | ifdef FOSSIL_ENABLE_SYMBOLS |
| 661 | TCC += -g |
| 662 | endif |
| 663 | |
| 664 | #### Compile resources for use in building executables that will run |
| 665 | # on the target platform. |
| 666 | # |
| 667 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -456,10 +456,14 @@ | |
| 456 | # to regenerate this file. |
| 457 | # |
| 458 | # This is a makefile for use on Cygwin/Darwin/FreeBSD/Linux/Windows using |
| 459 | # MinGW or MinGW-w64. |
| 460 | # |
| 461 | # Some of the special options which can be passed to make |
| 462 | # USE_WINDOWS=1 if building under a windows command prompt |
| 463 | # X64=1 if using an unprefixed 64-bit mingw compiler |
| 464 | # |
| 465 | |
| 466 | #### Select one of MinGW, MinGW-w64 (32-bit) or MinGW-w64 (64-bit) compilers. |
| 467 | # By default, this is an empty string (i.e. use the native compiler). |
| 468 | # |
| 469 | PREFIX = |
| @@ -644,23 +648,25 @@ | |
| 648 | # will run on the target platform. This is usually the same |
| 649 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 650 | # the finished binary for fossil. The BCC compiler above is used |
| 651 | # for building intermediate code-generator tools. |
| 652 | # |
| 653 | TCC = $(PREFIX)gcc -Wall |
| 654 | |
| 655 | #### Add the necessary command line options to build with debugging |
| 656 | # symbols, if enabled. |
| 657 | # |
| 658 | ifdef FOSSIL_ENABLE_SYMBOLS |
| 659 | TCC += -g |
| 660 | else |
| 661 | TCC += -Os |
| 662 | endif |
| 663 | |
| 664 | #### When not using the miniz compression library, zlib is required. |
| 665 | # |
| 666 | ifndef FOSSIL_ENABLE_MINIZ |
| 667 | TCC += -L$(ZLIBDIR) -I$(ZINCDIR) |
| 668 | endif |
| 669 | |
| 670 | #### Compile resources for use in building executables that will run |
| 671 | # on the target platform. |
| 672 | # |
| 673 |
+94
| --- src/th_main.c | ||
| +++ src/th_main.c | ||
| @@ -142,10 +142,103 @@ | ||
| 142 | 142 | fossil_print("\n------------------ BEGIN TRACE LOG ------------------\n"); |
| 143 | 143 | fossil_print("%s", blob_str(&g.thLog)); |
| 144 | 144 | fossil_print("\n------------------- END TRACE LOG -------------------\n"); |
| 145 | 145 | } |
| 146 | 146 | } |
| 147 | + | |
| 148 | +/* | |
| 149 | +** - adopted from ls_cmd_rev in checkin.c | |
| 150 | +** - adopted commands/error handling for usage within th1 | |
| 151 | +** - interface adopted to allow result creation as TH1 List | |
| 152 | +** | |
| 153 | +** Takes a checkin identifier in zRev and an optiona glob pattern in zGLOB | |
| 154 | +** as parameter returns a TH list in pzList,pnList with filenames matching | |
| 155 | +** glob pattern with the checking | |
| 156 | +*/ | |
| 157 | +static void dir_cmd_rev( | |
| 158 | + Th_Interp *interp, | |
| 159 | + char **pzList, | |
| 160 | + int *pnList, | |
| 161 | + const char *zRev, /* Revision string given */ | |
| 162 | + const char *zGlob, /* Glob pattern given */ | |
| 163 | + int bDetails | |
| 164 | +){ | |
| 165 | + Stmt q; | |
| 166 | + char *zOrderBy = "pathname COLLATE nocase"; | |
| 167 | + int rid; | |
| 168 | + | |
| 169 | + rid = th1_name_to_typed_rid(interp, zRev, "ci"); | |
| 170 | + compute_fileage(rid, zGlob); | |
| 171 | + db_prepare(&q, | |
| 172 | + "SELECT datetime(fileage.mtime, 'localtime'), fileage.pathname,\n" | |
| 173 | + " blob.size\n" | |
| 174 | + " FROM fileage, blob\n" | |
| 175 | + " WHERE blob.rid=fileage.fid \n" | |
| 176 | + " ORDER BY %s;", zOrderBy /*safe-for-%s*/ | |
| 177 | + ); | |
| 178 | + while( db_step(&q)==SQLITE_ROW ){ | |
| 179 | + const char *zFile = db_column_text(&q, 1); | |
| 180 | + if( bDetails ){ | |
| 181 | + const char *zTime = db_column_text(&q, 0); | |
| 182 | + int size = db_column_int(&q, 2); | |
| 183 | + char zSize[50]; | |
| 184 | + char *zSubList = 0; | |
| 185 | + int nSubList = 0; | |
| 186 | + sqlite3_snprintf(sizeof(zSize), zSize, "%d", size); | |
| 187 | + Th_ListAppend(interp, &zSubList, &nSubList, zFile, -1); | |
| 188 | + Th_ListAppend(interp, &zSubList, &nSubList, zSize, -1); | |
| 189 | + Th_ListAppend(interp, &zSubList, &nSubList, zTime, -1); | |
| 190 | + Th_ListAppend(interp, pzList, pnList, zSubList, -1); | |
| 191 | + Th_Free(interp, zSubList); | |
| 192 | + }else{ | |
| 193 | + Th_ListAppend(interp, pzList, pnList, zFile, -1); | |
| 194 | + } | |
| 195 | + } | |
| 196 | + db_finalize(&q); | |
| 197 | +} | |
| 198 | + | |
| 199 | +/* | |
| 200 | +** TH1 command: dir CHECKIN ?GLOB? ?DETAILS? | |
| 201 | +** | |
| 202 | +** Returns a list containing all files in CHECKIN. If GLOB is given only | |
| 203 | +** the files matching the pattern GLOB within CHECKIN will be returned. | |
| 204 | +** If DETAILS is non-zero, the result will be a list-of-lists, with each | |
| 205 | +** element containing at least three elements: the file name, the file | |
| 206 | +** size (in bytes), and the file last modification time (relative to the | |
| 207 | +** time zone configured for the repository). | |
| 208 | +*/ | |
| 209 | +static int dirCmd( | |
| 210 | + Th_Interp *interp, | |
| 211 | + void *ctx, | |
| 212 | + int argc, | |
| 213 | + const char **argv, | |
| 214 | + int *argl | |
| 215 | +){ | |
| 216 | + const char *zGlob = 0; | |
| 217 | + int bDetails = 0; | |
| 218 | + | |
| 219 | + if( argc<2 || argc>4 ){ | |
| 220 | + return Th_WrongNumArgs(interp, "dir CHECKIN ?GLOB? ?DETAILS?"); | |
| 221 | + } | |
| 222 | + if( argc>=3 ){ | |
| 223 | + zGlob = argv[2]; | |
| 224 | + } | |
| 225 | + if( argc>=4 && Th_ToInt(interp, argv[3], argl[3], &bDetails) ){ | |
| 226 | + return TH_ERROR; | |
| 227 | + } | |
| 228 | + if( Th_IsRepositoryOpen() ){ | |
| 229 | + char *zList = 0; | |
| 230 | + int nList = 0; | |
| 231 | + dir_cmd_rev(interp, &zList, &nList, argv[1], zGlob, bDetails); | |
| 232 | + Th_SetResult(interp, zList, nList); | |
| 233 | + Th_Free(interp, zList); | |
| 234 | + return TH_OK; | |
| 235 | + }else{ | |
| 236 | + Th_SetResult(interp, "repository unavailable", -1); | |
| 237 | + return TH_ERROR; | |
| 238 | + } | |
| 239 | +} | |
| 147 | 240 | |
| 148 | 241 | /* |
| 149 | 242 | ** TH1 command: httpize STRING |
| 150 | 243 | ** |
| 151 | 244 | ** Escape all characters of STRING which have special meaning in URI |
| @@ -1632,10 +1725,11 @@ | ||
| 1632 | 1725 | {"artifact", artifactCmd, 0}, |
| 1633 | 1726 | {"checkout", checkoutCmd, 0}, |
| 1634 | 1727 | {"combobox", comboboxCmd, 0}, |
| 1635 | 1728 | {"date", dateCmd, 0}, |
| 1636 | 1729 | {"decorate", wikiCmd, (void*)&aFlags[2]}, |
| 1730 | + {"dir", dirCmd, 0}, | |
| 1637 | 1731 | {"enable_output", enableOutputCmd, 0}, |
| 1638 | 1732 | {"getParameter", getParameterCmd, 0}, |
| 1639 | 1733 | {"glob_match", globMatchCmd, 0}, |
| 1640 | 1734 | {"globalState", globalStateCmd, 0}, |
| 1641 | 1735 | {"httpize", httpizeCmd, 0}, |
| 1642 | 1736 |
| --- src/th_main.c | |
| +++ src/th_main.c | |
| @@ -142,10 +142,103 @@ | |
| 142 | fossil_print("\n------------------ BEGIN TRACE LOG ------------------\n"); |
| 143 | fossil_print("%s", blob_str(&g.thLog)); |
| 144 | fossil_print("\n------------------- END TRACE LOG -------------------\n"); |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | /* |
| 149 | ** TH1 command: httpize STRING |
| 150 | ** |
| 151 | ** Escape all characters of STRING which have special meaning in URI |
| @@ -1632,10 +1725,11 @@ | |
| 1632 | {"artifact", artifactCmd, 0}, |
| 1633 | {"checkout", checkoutCmd, 0}, |
| 1634 | {"combobox", comboboxCmd, 0}, |
| 1635 | {"date", dateCmd, 0}, |
| 1636 | {"decorate", wikiCmd, (void*)&aFlags[2]}, |
| 1637 | {"enable_output", enableOutputCmd, 0}, |
| 1638 | {"getParameter", getParameterCmd, 0}, |
| 1639 | {"glob_match", globMatchCmd, 0}, |
| 1640 | {"globalState", globalStateCmd, 0}, |
| 1641 | {"httpize", httpizeCmd, 0}, |
| 1642 |
| --- src/th_main.c | |
| +++ src/th_main.c | |
| @@ -142,10 +142,103 @@ | |
| 142 | fossil_print("\n------------------ BEGIN TRACE LOG ------------------\n"); |
| 143 | fossil_print("%s", blob_str(&g.thLog)); |
| 144 | fossil_print("\n------------------- END TRACE LOG -------------------\n"); |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | /* |
| 149 | ** - adopted from ls_cmd_rev in checkin.c |
| 150 | ** - adopted commands/error handling for usage within th1 |
| 151 | ** - interface adopted to allow result creation as TH1 List |
| 152 | ** |
| 153 | ** Takes a checkin identifier in zRev and an optiona glob pattern in zGLOB |
| 154 | ** as parameter returns a TH list in pzList,pnList with filenames matching |
| 155 | ** glob pattern with the checking |
| 156 | */ |
| 157 | static void dir_cmd_rev( |
| 158 | Th_Interp *interp, |
| 159 | char **pzList, |
| 160 | int *pnList, |
| 161 | const char *zRev, /* Revision string given */ |
| 162 | const char *zGlob, /* Glob pattern given */ |
| 163 | int bDetails |
| 164 | ){ |
| 165 | Stmt q; |
| 166 | char *zOrderBy = "pathname COLLATE nocase"; |
| 167 | int rid; |
| 168 | |
| 169 | rid = th1_name_to_typed_rid(interp, zRev, "ci"); |
| 170 | compute_fileage(rid, zGlob); |
| 171 | db_prepare(&q, |
| 172 | "SELECT datetime(fileage.mtime, 'localtime'), fileage.pathname,\n" |
| 173 | " blob.size\n" |
| 174 | " FROM fileage, blob\n" |
| 175 | " WHERE blob.rid=fileage.fid \n" |
| 176 | " ORDER BY %s;", zOrderBy /*safe-for-%s*/ |
| 177 | ); |
| 178 | while( db_step(&q)==SQLITE_ROW ){ |
| 179 | const char *zFile = db_column_text(&q, 1); |
| 180 | if( bDetails ){ |
| 181 | const char *zTime = db_column_text(&q, 0); |
| 182 | int size = db_column_int(&q, 2); |
| 183 | char zSize[50]; |
| 184 | char *zSubList = 0; |
| 185 | int nSubList = 0; |
| 186 | sqlite3_snprintf(sizeof(zSize), zSize, "%d", size); |
| 187 | Th_ListAppend(interp, &zSubList, &nSubList, zFile, -1); |
| 188 | Th_ListAppend(interp, &zSubList, &nSubList, zSize, -1); |
| 189 | Th_ListAppend(interp, &zSubList, &nSubList, zTime, -1); |
| 190 | Th_ListAppend(interp, pzList, pnList, zSubList, -1); |
| 191 | Th_Free(interp, zSubList); |
| 192 | }else{ |
| 193 | Th_ListAppend(interp, pzList, pnList, zFile, -1); |
| 194 | } |
| 195 | } |
| 196 | db_finalize(&q); |
| 197 | } |
| 198 | |
| 199 | /* |
| 200 | ** TH1 command: dir CHECKIN ?GLOB? ?DETAILS? |
| 201 | ** |
| 202 | ** Returns a list containing all files in CHECKIN. If GLOB is given only |
| 203 | ** the files matching the pattern GLOB within CHECKIN will be returned. |
| 204 | ** If DETAILS is non-zero, the result will be a list-of-lists, with each |
| 205 | ** element containing at least three elements: the file name, the file |
| 206 | ** size (in bytes), and the file last modification time (relative to the |
| 207 | ** time zone configured for the repository). |
| 208 | */ |
| 209 | static int dirCmd( |
| 210 | Th_Interp *interp, |
| 211 | void *ctx, |
| 212 | int argc, |
| 213 | const char **argv, |
| 214 | int *argl |
| 215 | ){ |
| 216 | const char *zGlob = 0; |
| 217 | int bDetails = 0; |
| 218 | |
| 219 | if( argc<2 || argc>4 ){ |
| 220 | return Th_WrongNumArgs(interp, "dir CHECKIN ?GLOB? ?DETAILS?"); |
| 221 | } |
| 222 | if( argc>=3 ){ |
| 223 | zGlob = argv[2]; |
| 224 | } |
| 225 | if( argc>=4 && Th_ToInt(interp, argv[3], argl[3], &bDetails) ){ |
| 226 | return TH_ERROR; |
| 227 | } |
| 228 | if( Th_IsRepositoryOpen() ){ |
| 229 | char *zList = 0; |
| 230 | int nList = 0; |
| 231 | dir_cmd_rev(interp, &zList, &nList, argv[1], zGlob, bDetails); |
| 232 | Th_SetResult(interp, zList, nList); |
| 233 | Th_Free(interp, zList); |
| 234 | return TH_OK; |
| 235 | }else{ |
| 236 | Th_SetResult(interp, "repository unavailable", -1); |
| 237 | return TH_ERROR; |
| 238 | } |
| 239 | } |
| 240 | |
| 241 | /* |
| 242 | ** TH1 command: httpize STRING |
| 243 | ** |
| 244 | ** Escape all characters of STRING which have special meaning in URI |
| @@ -1632,10 +1725,11 @@ | |
| 1725 | {"artifact", artifactCmd, 0}, |
| 1726 | {"checkout", checkoutCmd, 0}, |
| 1727 | {"combobox", comboboxCmd, 0}, |
| 1728 | {"date", dateCmd, 0}, |
| 1729 | {"decorate", wikiCmd, (void*)&aFlags[2]}, |
| 1730 | {"dir", dirCmd, 0}, |
| 1731 | {"enable_output", enableOutputCmd, 0}, |
| 1732 | {"getParameter", getParameterCmd, 0}, |
| 1733 | {"glob_match", globMatchCmd, 0}, |
| 1734 | {"globalState", globalStateCmd, 0}, |
| 1735 | {"httpize", httpizeCmd, 0}, |
| 1736 |
+3
-1
| --- src/winfile.c | ||
| +++ src/winfile.c | ||
| @@ -240,11 +240,13 @@ | ||
| 240 | 240 | * Unable to perform access check. |
| 241 | 241 | */ |
| 242 | 242 | |
| 243 | 243 | rc = -1; goto done; |
| 244 | 244 | } |
| 245 | - if( !accessYesNo ) rc = -1; | |
| 245 | + if( !accessYesNo ){ | |
| 246 | + rc = -1; | |
| 247 | + } | |
| 246 | 248 | |
| 247 | 249 | done: |
| 248 | 250 | |
| 249 | 251 | if( hToken != NULL ){ |
| 250 | 252 | CloseHandle(hToken); |
| 251 | 253 | |
| 252 | 254 | ADDED test/th1-repo.test |
| --- src/winfile.c | |
| +++ src/winfile.c | |
| @@ -240,11 +240,13 @@ | |
| 240 | * Unable to perform access check. |
| 241 | */ |
| 242 | |
| 243 | rc = -1; goto done; |
| 244 | } |
| 245 | if( !accessYesNo ) rc = -1; |
| 246 | |
| 247 | done: |
| 248 | |
| 249 | if( hToken != NULL ){ |
| 250 | CloseHandle(hToken); |
| 251 | |
| 252 | DDED test/th1-repo.test |
| --- src/winfile.c | |
| +++ src/winfile.c | |
| @@ -240,11 +240,13 @@ | |
| 240 | * Unable to perform access check. |
| 241 | */ |
| 242 | |
| 243 | rc = -1; goto done; |
| 244 | } |
| 245 | if( !accessYesNo ){ |
| 246 | rc = -1; |
| 247 | } |
| 248 | |
| 249 | done: |
| 250 | |
| 251 | if( hToken != NULL ){ |
| 252 | CloseHandle(hToken); |
| 253 | |
| 254 | DDED test/th1-repo.test |
+39
| --- a/test/th1-repo.test | ||
| +++ b/test/th1-repo.test | ||
| @@ -0,0 +1,39 @@ | ||
| 1 | +# | |
| 2 | +# Copyright (c) 2011 D. Richard Hipp | |
| 3 | +# Copyright (c) 2015 Ch. Drexler | |
| 4 | +# | |
| 5 | +# This program is free software; you can redistribute it and/or | |
| 6 | +# modify it under the terms of the Simplified BSD License (also | |
| 7 | +# known as the "2-Clause License" or "FreeBSD License".) | |
| 8 | +# | |
| 9 | +# This program is distributed in the hope that it will be useful, | |
| 10 | +# but without any warranty; without even the implied warranty of | |
| 11 | +# merchantability or fitness for a particular purpose. | |
| 12 | +# | |
| 13 | +# Author contact information: | |
| 14 | +# [email protected] | |
| 15 | +# http://www.hwaci.com/drh/ | |
| 16 | +# | |
| 17 | +# Chris Drexler <[email protected]> | |
| 18 | +# | |
| 19 | +############################################################################ | |
| 20 | +# | |
| 21 | +# TH1 tests that macatch {exec $::fossilexe info} res | |
| 22 | +if {![regexp {use --repository} $res]} { | |
| 23 | + puts stderr "Cannot run this test within an open checkout" | |
| 24 | + return | |
| 25 | +} | |
| 26 | + | |
| 27 | + | |
| 28 | +# Setup: Add Files and Commit # | |
| 29 | +######################################## | |
| 30 | + | |
| 31 | +test_setup; set rootDir [firepo_init (c) 2011 D. Richard Hipp | |
| 32 | +# Copyright (c) 2015 Ch. Drexler | |
| 33 | +# | |
| 34 | +# This program is free software; you can redistribute it and/or | |
| 35 | +# modify it under the terms of the Simplified BSD License (also | |
| 36 | +# known as the "2-Clause License" or "FreeBSD License".) | |
| 37 | +# | |
| 38 | +# This program is distributed in the hope that it will be useful, | |
| 39 | +# but without any warranty; without even th |
| --- a/test/th1-repo.test | |
| +++ b/test/th1-repo.test | |
| @@ -0,0 +1,39 @@ | |
| --- a/test/th1-repo.test | |
| +++ b/test/th1-repo.test | |
| @@ -0,0 +1,39 @@ | |
| 1 | # |
| 2 | # Copyright (c) 2011 D. Richard Hipp |
| 3 | # Copyright (c) 2015 Ch. Drexler |
| 4 | # |
| 5 | # This program is free software; you can redistribute it and/or |
| 6 | # modify it under the terms of the Simplified BSD License (also |
| 7 | # known as the "2-Clause License" or "FreeBSD License".) |
| 8 | # |
| 9 | # This program is distributed in the hope that it will be useful, |
| 10 | # but without any warranty; without even the implied warranty of |
| 11 | # merchantability or fitness for a particular purpose. |
| 12 | # |
| 13 | # Author contact information: |
| 14 | # [email protected] |
| 15 | # http://www.hwaci.com/drh/ |
| 16 | # |
| 17 | # Chris Drexler <[email protected]> |
| 18 | # |
| 19 | ############################################################################ |
| 20 | # |
| 21 | # TH1 tests that macatch {exec $::fossilexe info} res |
| 22 | if {![regexp {use --repository} $res]} { |
| 23 | puts stderr "Cannot run this test within an open checkout" |
| 24 | return |
| 25 | } |
| 26 | |
| 27 | |
| 28 | # Setup: Add Files and Commit # |
| 29 | ######################################## |
| 30 | |
| 31 | test_setup; set rootDir [firepo_init (c) 2011 D. Richard Hipp |
| 32 | # Copyright (c) 2015 Ch. Drexler |
| 33 | # |
| 34 | # This program is free software; you can redistribute it and/or |
| 35 | # modify it under the terms of the Simplified BSD License (also |
| 36 | # known as the "2-Clause License" or "FreeBSD License".) |
| 37 | # |
| 38 | # This program is distributed in the hope that it will be useful, |
| 39 | # but without any warranty; without even th |
+1
-1
| --- test/th1.test | ||
| +++ test/th1.test | ||
| @@ -861,11 +861,11 @@ | ||
| 861 | 861 | # NOTE: This test may fail if the command names do not always come |
| 862 | 862 | # out in a deterministic order from TH1. |
| 863 | 863 | # |
| 864 | 864 | fossil test-th-eval "info commands" |
| 865 | 865 | test th1-info-commands-1 {$RESULT eq {linecount htmlize date stime\ |
| 866 | -enable_output uplevel http expr glob_match utime styleFooter catch if\ | |
| 866 | +enable_output uplevel dir http expr glob_match utime styleFooter catch if\ | |
| 867 | 867 | tclReady searchable reinitialize combobox lindex query html anoncap randhex\ |
| 868 | 868 | llength for set break regexp markdown styleHeader puts return checkout\ |
| 869 | 869 | decorate artifact trace wiki proc hascap globalState continue getParameter\ |
| 870 | 870 | hasfeature setting lsearch breakpoint upvar render repository string unset\ |
| 871 | 871 | setParameter list error info rename anycap httpize}} |
| 872 | 872 |
| --- test/th1.test | |
| +++ test/th1.test | |
| @@ -861,11 +861,11 @@ | |
| 861 | # NOTE: This test may fail if the command names do not always come |
| 862 | # out in a deterministic order from TH1. |
| 863 | # |
| 864 | fossil test-th-eval "info commands" |
| 865 | test th1-info-commands-1 {$RESULT eq {linecount htmlize date stime\ |
| 866 | enable_output uplevel http expr glob_match utime styleFooter catch if\ |
| 867 | tclReady searchable reinitialize combobox lindex query html anoncap randhex\ |
| 868 | llength for set break regexp markdown styleHeader puts return checkout\ |
| 869 | decorate artifact trace wiki proc hascap globalState continue getParameter\ |
| 870 | hasfeature setting lsearch breakpoint upvar render repository string unset\ |
| 871 | setParameter list error info rename anycap httpize}} |
| 872 |
| --- test/th1.test | |
| +++ test/th1.test | |
| @@ -861,11 +861,11 @@ | |
| 861 | # NOTE: This test may fail if the command names do not always come |
| 862 | # out in a deterministic order from TH1. |
| 863 | # |
| 864 | fossil test-th-eval "info commands" |
| 865 | test th1-info-commands-1 {$RESULT eq {linecount htmlize date stime\ |
| 866 | enable_output uplevel dir http expr glob_match utime styleFooter catch if\ |
| 867 | tclReady searchable reinitialize combobox lindex query html anoncap randhex\ |
| 868 | llength for set break regexp markdown styleHeader puts return checkout\ |
| 869 | decorate artifact trace wiki proc hascap globalState continue getParameter\ |
| 870 | hasfeature setting lsearch breakpoint upvar render repository string unset\ |
| 871 | setParameter list error info rename anycap httpize}} |
| 872 |
+13
-7
| --- win/Makefile.mingw | ||
| +++ win/Makefile.mingw | ||
| @@ -9,10 +9,14 @@ | ||
| 9 | 9 | # to regenerate this file. |
| 10 | 10 | # |
| 11 | 11 | # This is a makefile for use on Cygwin/Darwin/FreeBSD/Linux/Windows using |
| 12 | 12 | # MinGW or MinGW-w64. |
| 13 | 13 | # |
| 14 | +# Some of the special options which can be passed to make | |
| 15 | +# USE_WINDOWS=1 if building under a windows command prompt | |
| 16 | +# X64=1 if using an unprefixed 64-bit mingw compiler | |
| 17 | +# | |
| 14 | 18 | |
| 15 | 19 | #### Select one of MinGW, MinGW-w64 (32-bit) or MinGW-w64 (64-bit) compilers. |
| 16 | 20 | # By default, this is an empty string (i.e. use the native compiler). |
| 17 | 21 | # |
| 18 | 22 | PREFIX = |
| @@ -197,23 +201,25 @@ | ||
| 197 | 201 | # will run on the target platform. This is usually the same |
| 198 | 202 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 199 | 203 | # the finished binary for fossil. The BCC compiler above is used |
| 200 | 204 | # for building intermediate code-generator tools. |
| 201 | 205 | # |
| 202 | -TCC = $(PREFIX)gcc -Os -Wall | |
| 203 | - | |
| 204 | -#### When not using the miniz compression library, zlib is required. | |
| 205 | -# | |
| 206 | -ifndef FOSSIL_ENABLE_MINIZ | |
| 207 | -TCC += -L$(ZLIBDIR) -I$(ZINCDIR) | |
| 208 | -endif | |
| 206 | +TCC = $(PREFIX)gcc -Wall | |
| 209 | 207 | |
| 210 | 208 | #### Add the necessary command line options to build with debugging |
| 211 | 209 | # symbols, if enabled. |
| 212 | 210 | # |
| 213 | 211 | ifdef FOSSIL_ENABLE_SYMBOLS |
| 214 | 212 | TCC += -g |
| 213 | +else | |
| 214 | +TCC += -Os | |
| 215 | +endif | |
| 216 | + | |
| 217 | +#### When not using the miniz compression library, zlib is required. | |
| 218 | +# | |
| 219 | +ifndef FOSSIL_ENABLE_MINIZ | |
| 220 | +TCC += -L$(ZLIBDIR) -I$(ZINCDIR) | |
| 215 | 221 | endif |
| 216 | 222 | |
| 217 | 223 | #### Compile resources for use in building executables that will run |
| 218 | 224 | # on the target platform. |
| 219 | 225 | # |
| 220 | 226 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -9,10 +9,14 @@ | |
| 9 | # to regenerate this file. |
| 10 | # |
| 11 | # This is a makefile for use on Cygwin/Darwin/FreeBSD/Linux/Windows using |
| 12 | # MinGW or MinGW-w64. |
| 13 | # |
| 14 | |
| 15 | #### Select one of MinGW, MinGW-w64 (32-bit) or MinGW-w64 (64-bit) compilers. |
| 16 | # By default, this is an empty string (i.e. use the native compiler). |
| 17 | # |
| 18 | PREFIX = |
| @@ -197,23 +201,25 @@ | |
| 197 | # will run on the target platform. This is usually the same |
| 198 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 199 | # the finished binary for fossil. The BCC compiler above is used |
| 200 | # for building intermediate code-generator tools. |
| 201 | # |
| 202 | TCC = $(PREFIX)gcc -Os -Wall |
| 203 | |
| 204 | #### When not using the miniz compression library, zlib is required. |
| 205 | # |
| 206 | ifndef FOSSIL_ENABLE_MINIZ |
| 207 | TCC += -L$(ZLIBDIR) -I$(ZINCDIR) |
| 208 | endif |
| 209 | |
| 210 | #### Add the necessary command line options to build with debugging |
| 211 | # symbols, if enabled. |
| 212 | # |
| 213 | ifdef FOSSIL_ENABLE_SYMBOLS |
| 214 | TCC += -g |
| 215 | endif |
| 216 | |
| 217 | #### Compile resources for use in building executables that will run |
| 218 | # on the target platform. |
| 219 | # |
| 220 |
| --- win/Makefile.mingw | |
| +++ win/Makefile.mingw | |
| @@ -9,10 +9,14 @@ | |
| 9 | # to regenerate this file. |
| 10 | # |
| 11 | # This is a makefile for use on Cygwin/Darwin/FreeBSD/Linux/Windows using |
| 12 | # MinGW or MinGW-w64. |
| 13 | # |
| 14 | # Some of the special options which can be passed to make |
| 15 | # USE_WINDOWS=1 if building under a windows command prompt |
| 16 | # X64=1 if using an unprefixed 64-bit mingw compiler |
| 17 | # |
| 18 | |
| 19 | #### Select one of MinGW, MinGW-w64 (32-bit) or MinGW-w64 (64-bit) compilers. |
| 20 | # By default, this is an empty string (i.e. use the native compiler). |
| 21 | # |
| 22 | PREFIX = |
| @@ -197,23 +201,25 @@ | |
| 201 | # will run on the target platform. This is usually the same |
| 202 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 203 | # the finished binary for fossil. The BCC compiler above is used |
| 204 | # for building intermediate code-generator tools. |
| 205 | # |
| 206 | TCC = $(PREFIX)gcc -Wall |
| 207 | |
| 208 | #### Add the necessary command line options to build with debugging |
| 209 | # symbols, if enabled. |
| 210 | # |
| 211 | ifdef FOSSIL_ENABLE_SYMBOLS |
| 212 | TCC += -g |
| 213 | else |
| 214 | TCC += -Os |
| 215 | endif |
| 216 | |
| 217 | #### When not using the miniz compression library, zlib is required. |
| 218 | # |
| 219 | ifndef FOSSIL_ENABLE_MINIZ |
| 220 | TCC += -L$(ZLIBDIR) -I$(ZINCDIR) |
| 221 | endif |
| 222 | |
| 223 | #### Compile resources for use in building executables that will run |
| 224 | # on the target platform. |
| 225 | # |
| 226 |
+13
-7
| --- win/Makefile.mingw.mistachkin | ||
| +++ win/Makefile.mingw.mistachkin | ||
| @@ -9,10 +9,14 @@ | ||
| 9 | 9 | # to regenerate this file. |
| 10 | 10 | # |
| 11 | 11 | # This is a makefile for use on Cygwin/Darwin/FreeBSD/Linux/Windows using |
| 12 | 12 | # MinGW or MinGW-w64. |
| 13 | 13 | # |
| 14 | +# Some of the special options which can be passed to make | |
| 15 | +# USE_WINDOWS=1 if building under a windows command prompt | |
| 16 | +# X64=1 if using an unprefixed 64-bit mingw compiler | |
| 17 | +# | |
| 14 | 18 | |
| 15 | 19 | #### Select one of MinGW, MinGW-w64 (32-bit) or MinGW-w64 (64-bit) compilers. |
| 16 | 20 | # By default, this is an empty string (i.e. use the native compiler). |
| 17 | 21 | # |
| 18 | 22 | PREFIX = |
| @@ -197,23 +201,25 @@ | ||
| 197 | 201 | # will run on the target platform. This is usually the same |
| 198 | 202 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 199 | 203 | # the finished binary for fossil. The BCC compiler above is used |
| 200 | 204 | # for building intermediate code-generator tools. |
| 201 | 205 | # |
| 202 | -TCC = $(PREFIX)gcc -Os -Wall | |
| 203 | - | |
| 204 | -#### When not using the miniz compression library, zlib is required. | |
| 205 | -# | |
| 206 | -ifndef FOSSIL_ENABLE_MINIZ | |
| 207 | -TCC += -L$(ZLIBDIR) -I$(ZINCDIR) | |
| 208 | -endif | |
| 206 | +TCC = $(PREFIX)gcc -Wall | |
| 209 | 207 | |
| 210 | 208 | #### Add the necessary command line options to build with debugging |
| 211 | 209 | # symbols, if enabled. |
| 212 | 210 | # |
| 213 | 211 | ifdef FOSSIL_ENABLE_SYMBOLS |
| 214 | 212 | TCC += -g |
| 213 | +else | |
| 214 | +TCC += -Os | |
| 215 | +endif | |
| 216 | + | |
| 217 | +#### When not using the miniz compression library, zlib is required. | |
| 218 | +# | |
| 219 | +ifndef FOSSIL_ENABLE_MINIZ | |
| 220 | +TCC += -L$(ZLIBDIR) -I$(ZINCDIR) | |
| 215 | 221 | endif |
| 216 | 222 | |
| 217 | 223 | #### Compile resources for use in building executables that will run |
| 218 | 224 | # on the target platform. |
| 219 | 225 | # |
| 220 | 226 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -9,10 +9,14 @@ | |
| 9 | # to regenerate this file. |
| 10 | # |
| 11 | # This is a makefile for use on Cygwin/Darwin/FreeBSD/Linux/Windows using |
| 12 | # MinGW or MinGW-w64. |
| 13 | # |
| 14 | |
| 15 | #### Select one of MinGW, MinGW-w64 (32-bit) or MinGW-w64 (64-bit) compilers. |
| 16 | # By default, this is an empty string (i.e. use the native compiler). |
| 17 | # |
| 18 | PREFIX = |
| @@ -197,23 +201,25 @@ | |
| 197 | # will run on the target platform. This is usually the same |
| 198 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 199 | # the finished binary for fossil. The BCC compiler above is used |
| 200 | # for building intermediate code-generator tools. |
| 201 | # |
| 202 | TCC = $(PREFIX)gcc -Os -Wall |
| 203 | |
| 204 | #### When not using the miniz compression library, zlib is required. |
| 205 | # |
| 206 | ifndef FOSSIL_ENABLE_MINIZ |
| 207 | TCC += -L$(ZLIBDIR) -I$(ZINCDIR) |
| 208 | endif |
| 209 | |
| 210 | #### Add the necessary command line options to build with debugging |
| 211 | # symbols, if enabled. |
| 212 | # |
| 213 | ifdef FOSSIL_ENABLE_SYMBOLS |
| 214 | TCC += -g |
| 215 | endif |
| 216 | |
| 217 | #### Compile resources for use in building executables that will run |
| 218 | # on the target platform. |
| 219 | # |
| 220 |
| --- win/Makefile.mingw.mistachkin | |
| +++ win/Makefile.mingw.mistachkin | |
| @@ -9,10 +9,14 @@ | |
| 9 | # to regenerate this file. |
| 10 | # |
| 11 | # This is a makefile for use on Cygwin/Darwin/FreeBSD/Linux/Windows using |
| 12 | # MinGW or MinGW-w64. |
| 13 | # |
| 14 | # Some of the special options which can be passed to make |
| 15 | # USE_WINDOWS=1 if building under a windows command prompt |
| 16 | # X64=1 if using an unprefixed 64-bit mingw compiler |
| 17 | # |
| 18 | |
| 19 | #### Select one of MinGW, MinGW-w64 (32-bit) or MinGW-w64 (64-bit) compilers. |
| 20 | # By default, this is an empty string (i.e. use the native compiler). |
| 21 | # |
| 22 | PREFIX = |
| @@ -197,23 +201,25 @@ | |
| 201 | # will run on the target platform. This is usually the same |
| 202 | # as BCC, unless you are cross-compiling. This C compiler builds |
| 203 | # the finished binary for fossil. The BCC compiler above is used |
| 204 | # for building intermediate code-generator tools. |
| 205 | # |
| 206 | TCC = $(PREFIX)gcc -Wall |
| 207 | |
| 208 | #### Add the necessary command line options to build with debugging |
| 209 | # symbols, if enabled. |
| 210 | # |
| 211 | ifdef FOSSIL_ENABLE_SYMBOLS |
| 212 | TCC += -g |
| 213 | else |
| 214 | TCC += -Os |
| 215 | endif |
| 216 | |
| 217 | #### When not using the miniz compression library, zlib is required. |
| 218 | # |
| 219 | ifndef FOSSIL_ENABLE_MINIZ |
| 220 | TCC += -L$(ZLIBDIR) -I$(ZINCDIR) |
| 221 | endif |
| 222 | |
| 223 | #### Compile resources for use in building executables that will run |
| 224 | # on the target platform. |
| 225 | # |
| 226 |
+2
-2
| --- www/changes.wiki | ||
| +++ www/changes.wiki | ||
| @@ -6,12 +6,12 @@ | ||
| 6 | 6 | to enable them to work properly with certain relative paths. |
| 7 | 7 | * Make the [/help?cmd=clean|fossil clean] command undoable for files less |
| 8 | 8 | than 10MiB. |
| 9 | 9 | * Add minimal <nowiki>[lsearch]</nowiki> command to TH1. Only exact |
| 10 | 10 | case-sensitive matching is supported. |
| 11 | - * Add the <nowiki>[glob_match]</nowiki> and <nowiki>[markdown]</nowiki> | |
| 12 | - commands to TH1. | |
| 11 | + * Add the <nowiki>[glob_match]</nowiki>, <nowiki>[markdown]</nowiki>, and | |
| 12 | + <nowiki>[dir]</nowiki> commands to TH1. | |
| 13 | 13 | * Add the <nowiki>[tclIsSafe] and [tclMakeSafe]</nowiki> TH1 commands to |
| 14 | 14 | the Tcl integration subsystem. |
| 15 | 15 | * Add 'double', 'integer', and 'list' classes to the |
| 16 | 16 | <nowiki>[string is]</nowiki> command in TH1. |
| 17 | 17 | * Update internal Unicode character tables, used in regular expression |
| 18 | 18 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -6,12 +6,12 @@ | |
| 6 | to enable them to work properly with certain relative paths. |
| 7 | * Make the [/help?cmd=clean|fossil clean] command undoable for files less |
| 8 | than 10MiB. |
| 9 | * Add minimal <nowiki>[lsearch]</nowiki> command to TH1. Only exact |
| 10 | case-sensitive matching is supported. |
| 11 | * Add the <nowiki>[glob_match]</nowiki> and <nowiki>[markdown]</nowiki> |
| 12 | commands to TH1. |
| 13 | * Add the <nowiki>[tclIsSafe] and [tclMakeSafe]</nowiki> TH1 commands to |
| 14 | the Tcl integration subsystem. |
| 15 | * Add 'double', 'integer', and 'list' classes to the |
| 16 | <nowiki>[string is]</nowiki> command in TH1. |
| 17 | * Update internal Unicode character tables, used in regular expression |
| 18 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -6,12 +6,12 @@ | |
| 6 | to enable them to work properly with certain relative paths. |
| 7 | * Make the [/help?cmd=clean|fossil clean] command undoable for files less |
| 8 | than 10MiB. |
| 9 | * Add minimal <nowiki>[lsearch]</nowiki> command to TH1. Only exact |
| 10 | case-sensitive matching is supported. |
| 11 | * Add the <nowiki>[glob_match]</nowiki>, <nowiki>[markdown]</nowiki>, and |
| 12 | <nowiki>[dir]</nowiki> commands to TH1. |
| 13 | * Add the <nowiki>[tclIsSafe] and [tclMakeSafe]</nowiki> TH1 commands to |
| 14 | the Tcl integration subsystem. |
| 15 | * Add 'double', 'integer', and 'list' classes to the |
| 16 | <nowiki>[string is]</nowiki> command in TH1. |
| 17 | * Update internal Unicode character tables, used in regular expression |
| 18 |
+13
| --- www/th1.md | ||
| +++ www/th1.md | ||
| @@ -129,10 +129,11 @@ | ||
| 129 | 129 | * artifact |
| 130 | 130 | * checkout |
| 131 | 131 | * combobox |
| 132 | 132 | * date |
| 133 | 133 | * decorate |
| 134 | + * dir | |
| 134 | 135 | * enable_output |
| 135 | 136 | * getParameter |
| 136 | 137 | * glob_match |
| 137 | 138 | * globalState |
| 138 | 139 | * hascap |
| @@ -234,10 +235,22 @@ | ||
| 234 | 235 | * decorate STRING |
| 235 | 236 | |
| 236 | 237 | Renders STRING as wiki content; however, only links are handled. No |
| 237 | 238 | other markup is processed. |
| 238 | 239 | |
| 240 | +<a name="dir"></a>TH1 dir Command | |
| 241 | +------------------------------------------- | |
| 242 | + | |
| 243 | + * dir CHECKIN ?GLOB? ?DETAILS? | |
| 244 | + | |
| 245 | +Returns a list containing all files in CHECKIN. If GLOB is given only | |
| 246 | +the files matching the pattern GLOB within CHECKIN will be returned. | |
| 247 | +If DETAILS is non-zero, the result will be a list-of-lists, with each | |
| 248 | +element containing at least three elements: the file name, the file | |
| 249 | +size (in bytes), and the file last modification time (relative to the | |
| 250 | +time zone configured for the repository). | |
| 251 | + | |
| 239 | 252 | <a name="enable_output"></a>TH1 enable_output Command |
| 240 | 253 | ----------------------------------------------------- |
| 241 | 254 | |
| 242 | 255 | * enable_output BOOLEAN |
| 243 | 256 | |
| 244 | 257 |
| --- www/th1.md | |
| +++ www/th1.md | |
| @@ -129,10 +129,11 @@ | |
| 129 | * artifact |
| 130 | * checkout |
| 131 | * combobox |
| 132 | * date |
| 133 | * decorate |
| 134 | * enable_output |
| 135 | * getParameter |
| 136 | * glob_match |
| 137 | * globalState |
| 138 | * hascap |
| @@ -234,10 +235,22 @@ | |
| 234 | * decorate STRING |
| 235 | |
| 236 | Renders STRING as wiki content; however, only links are handled. No |
| 237 | other markup is processed. |
| 238 | |
| 239 | <a name="enable_output"></a>TH1 enable_output Command |
| 240 | ----------------------------------------------------- |
| 241 | |
| 242 | * enable_output BOOLEAN |
| 243 | |
| 244 |
| --- www/th1.md | |
| +++ www/th1.md | |
| @@ -129,10 +129,11 @@ | |
| 129 | * artifact |
| 130 | * checkout |
| 131 | * combobox |
| 132 | * date |
| 133 | * decorate |
| 134 | * dir |
| 135 | * enable_output |
| 136 | * getParameter |
| 137 | * glob_match |
| 138 | * globalState |
| 139 | * hascap |
| @@ -234,10 +235,22 @@ | |
| 235 | * decorate STRING |
| 236 | |
| 237 | Renders STRING as wiki content; however, only links are handled. No |
| 238 | other markup is processed. |
| 239 | |
| 240 | <a name="dir"></a>TH1 dir Command |
| 241 | ------------------------------------------- |
| 242 | |
| 243 | * dir CHECKIN ?GLOB? ?DETAILS? |
| 244 | |
| 245 | Returns a list containing all files in CHECKIN. If GLOB is given only |
| 246 | the files matching the pattern GLOB within CHECKIN will be returned. |
| 247 | If DETAILS is non-zero, the result will be a list-of-lists, with each |
| 248 | element containing at least three elements: the file name, the file |
| 249 | size (in bytes), and the file last modification time (relative to the |
| 250 | time zone configured for the repository). |
| 251 | |
| 252 | <a name="enable_output"></a>TH1 enable_output Command |
| 253 | ----------------------------------------------------- |
| 254 | |
| 255 | * enable_output BOOLEAN |
| 256 | |
| 257 |