Fossil SCM

merge trunk

jan.nijtmans 2015-09-04 11:45 cleanX merge
Commit 45cbbad4dd825cc9dd216fdbddd488682fae5d54
+4 -3
--- Dockerfile
+++ Dockerfile
@@ -1,24 +1,25 @@
11
###
22
# Dockerfile for Fossil
33
###
4
-FROM fedora:21
4
+FROM fedora:22
55
66
### 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
88
99
### If you want to build "release", change the next line accordingly.
1010
ENV FOSSIL_INSTALL_VERSION trunk
1111
1212
RUN curl "http://core.tcl.tk/tcl/tarball/tcl-src.tar.gz?name=tcl-src&uuid=release" | tar zx
1313
RUN cd tcl-src/unix && ./configure --prefix=/usr --disable-shared --disable-threads --disable-load && make && make install
1414
RUN curl "http://www.fossil-scm.org/index.html/tarball/fossil-src.tar.gz?name=fossil-src&uuid=${FOSSIL_INSTALL_VERSION}" | tar zx
1515
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
1617
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
1718
1819
### 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
2021
2122
USER fossil
2223
2324
ENV HOME /opt/fossil
2425
2526
--- 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 @@
6262
zName, filename_collation()
6363
);
6464
}
6565
6666
db_prepare(&q,
67
- "SELECT pathname, deleted, chnged, rid, coalesce(origname!=pathname,0)"
67
+ "SELECT pathname, deleted, chnged, rid, coalesce(origname!=pathname,0), islink"
6868
" FROM vfile "
6969
" WHERE is_selected(id) %s"
7070
" AND (chnged OR deleted OR rid=0 OR pathname!=origname)"
7171
" ORDER BY 1 /*scan*/",
7272
blob_sql_text(&where)
@@ -77,10 +77,11 @@
7777
const char *zDisplayName = zPathname;
7878
int isDeleted = db_column_int(&q, 1);
7979
int isChnged = db_column_int(&q,2);
8080
int isNew = db_column_int(&q,3)==0;
8181
int isRenamed = db_column_int(&q,4);
82
+ int isLink = db_column_int(&q,5);
8283
char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname);
8384
if( cwdRelative ){
8485
file_relative_name(zFullName, &rewrittenPathname, 0);
8586
zDisplayName = blob_str(&rewrittenPathname);
8687
if( zDisplayName[0]=='.' && zDisplayName[1]=='/' ){
@@ -121,11 +122,11 @@
121122
blob_appendf(report, "SYMLINK %s\n", zDisplayName);
122123
}else if( isChnged==8 ){
123124
blob_appendf(report, "UNEXEC %s\n", zDisplayName);
124125
}else if( isChnged==9 ){
125126
blob_appendf(report, "UNLINK %s\n", zDisplayName);
126
- }else if( file_contains_merge_marker(zFullName) ){
127
+ }else if( !isLink && file_contains_merge_marker(zFullName) ){
127128
blob_appendf(report, "CONFLICT %s\n", zDisplayName);
128129
}else{
129130
blob_appendf(report, "EDITED %s\n", zDisplayName);
130131
}
131132
}else if( isRenamed ){
@@ -434,11 +435,11 @@
434435
" ORDER BY %s",
435436
vid, timeline_utc(), blob_sql_text(&where), zOrderBy /*safe-for-%s*/
436437
);
437438
}else{
438439
db_prepare(&q,
439
- "SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0)"
440
+ "SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0), islink"
440441
" FROM vfile %s"
441442
" ORDER BY %s", blob_sql_text(&where), zOrderBy /*safe-for-%s*/
442443
);
443444
}
444445
blob_reset(&where);
@@ -446,10 +447,11 @@
446447
const char *zPathname = db_column_text(&q,0);
447448
int isDeleted = db_column_int(&q, 1);
448449
int isNew = db_column_int(&q,2)==0;
449450
int chnged = db_column_int(&q,3);
450451
int renamed = db_column_int(&q,4);
452
+ int isLink = db_column_int(&q,5);
451453
char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname);
452454
const char *type = "";
453455
if( verboseFlag ){
454456
if( isNew ){
455457
type = "ADDED ";
@@ -468,11 +470,11 @@
468470
type = "ADDED_BY_MERGE ";
469471
}else if( chnged==4 ){
470472
type = "UPDATED_BY_INTEGRATE ";
471473
}else if( chnged==5 ){
472474
type = "ADDED_BY_INTEGRATE ";
473
- }else if( file_contains_merge_marker(zFullName) ){
475
+ }else if( !isLink && file_contains_merge_marker(zFullName) ){
474476
type = "CONFLICT ";
475477
}else{
476478
type = "EDITED ";
477479
}
478480
}else if( renamed ){
479481
--- 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 @@
6262
zName, filename_collation()
6363
);
6464
}
6565
6666
db_prepare(&q,
67
- "SELECT pathname, deleted, chnged, rid, coalesce(origname!=pathname,0)"
67
+ "SELECT pathname, deleted, chnged, rid, coalesce(origname!=pathname,0), islink"
6868
" FROM vfile "
6969
" WHERE is_selected(id) %s"
7070
" AND (chnged OR deleted OR rid=0 OR pathname!=origname)"
7171
" ORDER BY 1 /*scan*/",
7272
blob_sql_text(&where)
@@ -77,10 +77,11 @@
7777
const char *zDisplayName = zPathname;
7878
int isDeleted = db_column_int(&q, 1);
7979
int isChnged = db_column_int(&q,2);
8080
int isNew = db_column_int(&q,3)==0;
8181
int isRenamed = db_column_int(&q,4);
82
+ int isLink = db_column_int(&q,5);
8283
char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname);
8384
if( cwdRelative ){
8485
file_relative_name(zFullName, &rewrittenPathname, 0);
8586
zDisplayName = blob_str(&rewrittenPathname);
8687
if( zDisplayName[0]=='.' && zDisplayName[1]=='/' ){
@@ -121,11 +122,11 @@
121122
blob_appendf(report, "SYMLINK %s\n", zDisplayName);
122123
}else if( isChnged==8 ){
123124
blob_appendf(report, "UNEXEC %s\n", zDisplayName);
124125
}else if( isChnged==9 ){
125126
blob_appendf(report, "UNLINK %s\n", zDisplayName);
126
- }else if( file_contains_merge_marker(zFullName) ){
127
+ }else if( !isLink && file_contains_merge_marker(zFullName) ){
127128
blob_appendf(report, "CONFLICT %s\n", zDisplayName);
128129
}else{
129130
blob_appendf(report, "EDITED %s\n", zDisplayName);
130131
}
131132
}else if( isRenamed ){
@@ -434,11 +435,11 @@
434435
" ORDER BY %s",
435436
vid, timeline_utc(), blob_sql_text(&where), zOrderBy /*safe-for-%s*/
436437
);
437438
}else{
438439
db_prepare(&q,
439
- "SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0)"
440
+ "SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0), islink"
440441
" FROM vfile %s"
441442
" ORDER BY %s", blob_sql_text(&where), zOrderBy /*safe-for-%s*/
442443
);
443444
}
444445
blob_reset(&where);
@@ -446,10 +447,11 @@
446447
const char *zPathname = db_column_text(&q,0);
447448
int isDeleted = db_column_int(&q, 1);
448449
int isNew = db_column_int(&q,2)==0;
449450
int chnged = db_column_int(&q,3);
450451
int renamed = db_column_int(&q,4);
452
+ int isLink = db_column_int(&q,5);
451453
char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname);
452454
const char *type = "";
453455
if( verboseFlag ){
454456
if( isNew ){
455457
type = "ADDED ";
@@ -468,11 +470,11 @@
468470
type = "ADDED_BY_MERGE ";
469471
}else if( chnged==4 ){
470472
type = "UPDATED_BY_INTEGRATE ";
471473
}else if( chnged==5 ){
472474
type = "ADDED_BY_INTEGRATE ";
473
- }else if( file_contains_merge_marker(zFullName) ){
475
+ }else if( !isLink && file_contains_merge_marker(zFullName) ){
474476
type = "CONFLICT ";
475477
}else{
476478
type = "EDITED ";
477479
}
478480
}else if( renamed ){
479481
--- 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 @@
522522
** for looking at what a file will look like using the /doc webpage after
523523
** it gets checked in.
524524
**
525525
** The file extension is used to decide how to render the file.
526526
**
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.
531533
*/
532534
void doc_page(void){
533535
const char *zName; /* Argument to the /doc page */
534536
const char *zOrigName = "?"; /* Original document name */
535537
const char *zMime; /* Document MIME type */
@@ -540,10 +542,13 @@
540542
Blob filebody; /* Content of the documentation file */
541543
Blob title; /* Document title */
542544
int nMiss = (-1); /* Failed attempts to find the document */
543545
static const char *const azSuffix[] = {
544546
"index.html", "index.wiki", "index.md"
547
+#ifdef FOSSIL_ENABLE_TH1_DOCS
548
+ , "index.th1"
549
+#endif
545550
};
546551
547552
login_check_credentials();
548553
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
549554
blob_init(&title, 0, 0);
550555
--- 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 @@
14191419
if( strncmp(zKind, "dir", 3)!=0 ){
14201420
if( deltaFlag ){
14211421
Blob deltaSrc;
14221422
Blob target;
14231423
rid = db_int(0, "SELECT rid FROM blob WHERE uuid=("
1424
- " SELECT uuid FROM xfiles"
1424
+ " SELECT tuuid FROM xfiles"
14251425
" WHERE tpath=%Q AND tbranch=%d"
14261426
")", zFile, branchId);
14271427
content_get(rid, &deltaSrc);
14281428
svn_apply_svndiff(&rec.content, &deltaSrc, &target);
14291429
rid = content_put(&target);
14301430
--- 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 @@
456456
# to regenerate this file.
457457
#
458458
# This is a makefile for use on Cygwin/Darwin/FreeBSD/Linux/Windows using
459459
# MinGW or MinGW-w64.
460460
#
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
+#
461465
462466
#### Select one of MinGW, MinGW-w64 (32-bit) or MinGW-w64 (64-bit) compilers.
463467
# By default, this is an empty string (i.e. use the native compiler).
464468
#
465469
PREFIX =
@@ -644,23 +648,25 @@
644648
# will run on the target platform. This is usually the same
645649
# as BCC, unless you are cross-compiling. This C compiler builds
646650
# the finished binary for fossil. The BCC compiler above is used
647651
# for building intermediate code-generator tools.
648652
#
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
656654
657655
#### Add the necessary command line options to build with debugging
658656
# symbols, if enabled.
659657
#
660658
ifdef FOSSIL_ENABLE_SYMBOLS
661659
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)
662668
endif
663669
664670
#### Compile resources for use in building executables that will run
665671
# on the target platform.
666672
#
667673
--- 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
--- src/th_main.c
+++ src/th_main.c
@@ -142,10 +142,103 @@
142142
fossil_print("\n------------------ BEGIN TRACE LOG ------------------\n");
143143
fossil_print("%s", blob_str(&g.thLog));
144144
fossil_print("\n------------------- END TRACE LOG -------------------\n");
145145
}
146146
}
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
+}
147240
148241
/*
149242
** TH1 command: httpize STRING
150243
**
151244
** Escape all characters of STRING which have special meaning in URI
@@ -1632,10 +1725,11 @@
16321725
{"artifact", artifactCmd, 0},
16331726
{"checkout", checkoutCmd, 0},
16341727
{"combobox", comboboxCmd, 0},
16351728
{"date", dateCmd, 0},
16361729
{"decorate", wikiCmd, (void*)&aFlags[2]},
1730
+ {"dir", dirCmd, 0},
16371731
{"enable_output", enableOutputCmd, 0},
16381732
{"getParameter", getParameterCmd, 0},
16391733
{"glob_match", globMatchCmd, 0},
16401734
{"globalState", globalStateCmd, 0},
16411735
{"httpize", httpizeCmd, 0},
16421736
--- 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 @@
240240
* Unable to perform access check.
241241
*/
242242
243243
rc = -1; goto done;
244244
}
245
- if( !accessYesNo ) rc = -1;
245
+ if( !accessYesNo ){
246
+ rc = -1;
247
+ }
246248
247249
done:
248250
249251
if( hToken != NULL ){
250252
CloseHandle(hToken);
251253
252254
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
--- 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 @@
861861
# NOTE: This test may fail if the command names do not always come
862862
# out in a deterministic order from TH1.
863863
#
864864
fossil test-th-eval "info commands"
865865
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\
867867
tclReady searchable reinitialize combobox lindex query html anoncap randhex\
868868
llength for set break regexp markdown styleHeader puts return checkout\
869869
decorate artifact trace wiki proc hascap globalState continue getParameter\
870870
hasfeature setting lsearch breakpoint upvar render repository string unset\
871871
setParameter list error info rename anycap httpize}}
872872
--- 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
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -9,10 +9,14 @@
99
# to regenerate this file.
1010
#
1111
# This is a makefile for use on Cygwin/Darwin/FreeBSD/Linux/Windows using
1212
# MinGW or MinGW-w64.
1313
#
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
+#
1418
1519
#### Select one of MinGW, MinGW-w64 (32-bit) or MinGW-w64 (64-bit) compilers.
1620
# By default, this is an empty string (i.e. use the native compiler).
1721
#
1822
PREFIX =
@@ -197,23 +201,25 @@
197201
# will run on the target platform. This is usually the same
198202
# as BCC, unless you are cross-compiling. This C compiler builds
199203
# the finished binary for fossil. The BCC compiler above is used
200204
# for building intermediate code-generator tools.
201205
#
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
209207
210208
#### Add the necessary command line options to build with debugging
211209
# symbols, if enabled.
212210
#
213211
ifdef FOSSIL_ENABLE_SYMBOLS
214212
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)
215221
endif
216222
217223
#### Compile resources for use in building executables that will run
218224
# on the target platform.
219225
#
220226
--- 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
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -9,10 +9,14 @@
99
# to regenerate this file.
1010
#
1111
# This is a makefile for use on Cygwin/Darwin/FreeBSD/Linux/Windows using
1212
# MinGW or MinGW-w64.
1313
#
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
+#
1418
1519
#### Select one of MinGW, MinGW-w64 (32-bit) or MinGW-w64 (64-bit) compilers.
1620
# By default, this is an empty string (i.e. use the native compiler).
1721
#
1822
PREFIX =
@@ -197,23 +201,25 @@
197201
# will run on the target platform. This is usually the same
198202
# as BCC, unless you are cross-compiling. This C compiler builds
199203
# the finished binary for fossil. The BCC compiler above is used
200204
# for building intermediate code-generator tools.
201205
#
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
209207
210208
#### Add the necessary command line options to build with debugging
211209
# symbols, if enabled.
212210
#
213211
ifdef FOSSIL_ENABLE_SYMBOLS
214212
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)
215221
endif
216222
217223
#### Compile resources for use in building executables that will run
218224
# on the target platform.
219225
#
220226
--- 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
--- www/changes.wiki
+++ www/changes.wiki
@@ -6,12 +6,12 @@
66
to enable them to work properly with certain relative paths.
77
* Make the [/help?cmd=clean|fossil clean] command undoable for files less
88
than 10MiB.
99
* Add minimal <nowiki>[lsearch]</nowiki> command to TH1. Only exact
1010
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.
1313
* Add the <nowiki>[tclIsSafe] and [tclMakeSafe]</nowiki> TH1 commands to
1414
the Tcl integration subsystem.
1515
* Add 'double', 'integer', and 'list' classes to the
1616
<nowiki>[string is]</nowiki> command in TH1.
1717
* Update internal Unicode character tables, used in regular expression
1818
--- 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 @@
129129
* artifact
130130
* checkout
131131
* combobox
132132
* date
133133
* decorate
134
+ * dir
134135
* enable_output
135136
* getParameter
136137
* glob_match
137138
* globalState
138139
* hascap
@@ -234,10 +235,22 @@
234235
* decorate STRING
235236
236237
Renders STRING as wiki content; however, only links are handled. No
237238
other markup is processed.
238239
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
+
239252
<a name="enable_output"></a>TH1 enable_output Command
240253
-----------------------------------------------------
241254
242255
* enable_output BOOLEAN
243256
244257
--- 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

Keyboard Shortcuts

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