Fossil SCM

(cherry-pick): Fixes to SVN import received from Christophe Gouiran (bechris13250 at gmail)

jan.nijtmans 2017-03-22 16:26 UTC branch-2.1
Commit dec3383ed428203f28f1740bd6592962158ddbf68d28805d0c6ab468520a8336
+1 -1
--- src/db.c
+++ src/db.c
@@ -2855,11 +2855,11 @@
28552855
**
28562856
** allow-symlinks If enabled, don't follow symlinks, and instead treat
28572857
** (versionable) them as symlinks on Unix. Has no effect on Windows
28582858
** (existing links in repository created on Unix become
28592859
** plain-text files with link destination path inside).
2860
-** Default: off
2860
+** Default: on
28612861
**
28622862
** auto-captcha If enabled, the Login page provides a button to
28632863
** fill in the captcha password. Default: on
28642864
**
28652865
** auto-hyperlink Use javascript to enable hyperlinks on web pages
28662866
--- src/db.c
+++ src/db.c
@@ -2855,11 +2855,11 @@
2855 **
2856 ** allow-symlinks If enabled, don't follow symlinks, and instead treat
2857 ** (versionable) them as symlinks on Unix. Has no effect on Windows
2858 ** (existing links in repository created on Unix become
2859 ** plain-text files with link destination path inside).
2860 ** Default: off
2861 **
2862 ** auto-captcha If enabled, the Login page provides a button to
2863 ** fill in the captcha password. Default: on
2864 **
2865 ** auto-hyperlink Use javascript to enable hyperlinks on web pages
2866
--- src/db.c
+++ src/db.c
@@ -2855,11 +2855,11 @@
2855 **
2856 ** allow-symlinks If enabled, don't follow symlinks, and instead treat
2857 ** (versionable) them as symlinks on Unix. Has no effect on Windows
2858 ** (existing links in repository created on Unix become
2859 ** plain-text files with link destination path inside).
2860 ** Default: on
2861 **
2862 ** auto-captcha If enabled, the Login page provides a button to
2863 ** fill in the captcha password. Default: on
2864 **
2865 ** auto-hyperlink Use javascript to enable hyperlinks on web pages
2866
+1 -1
--- src/db.c
+++ src/db.c
@@ -2855,11 +2855,11 @@
28552855
**
28562856
** allow-symlinks If enabled, don't follow symlinks, and instead treat
28572857
** (versionable) them as symlinks on Unix. Has no effect on Windows
28582858
** (existing links in repository created on Unix become
28592859
** plain-text files with link destination path inside).
2860
-** Default: off
2860
+** Default: on
28612861
**
28622862
** auto-captcha If enabled, the Login page provides a button to
28632863
** fill in the captcha password. Default: on
28642864
**
28652865
** auto-hyperlink Use javascript to enable hyperlinks on web pages
28662866
--- src/db.c
+++ src/db.c
@@ -2855,11 +2855,11 @@
2855 **
2856 ** allow-symlinks If enabled, don't follow symlinks, and instead treat
2857 ** (versionable) them as symlinks on Unix. Has no effect on Windows
2858 ** (existing links in repository created on Unix become
2859 ** plain-text files with link destination path inside).
2860 ** Default: off
2861 **
2862 ** auto-captcha If enabled, the Login page provides a button to
2863 ** fill in the captcha password. Default: on
2864 **
2865 ** auto-hyperlink Use javascript to enable hyperlinks on web pages
2866
--- src/db.c
+++ src/db.c
@@ -2855,11 +2855,11 @@
2855 **
2856 ** allow-symlinks If enabled, don't follow symlinks, and instead treat
2857 ** (versionable) them as symlinks on Unix. Has no effect on Windows
2858 ** (existing links in repository created on Unix become
2859 ** plain-text files with link destination path inside).
2860 ** Default: on
2861 **
2862 ** auto-captcha If enabled, the Login page provides a button to
2863 ** fill in the captcha password. Default: on
2864 **
2865 ** auto-hyperlink Use javascript to enable hyperlinks on web pages
2866
+43 -9
--- src/import.c
+++ src/import.c
@@ -69,11 +69,10 @@
6969
char **azMerge; /* Merge values */
7070
int nFile; /* Number of aFile values */
7171
int nFileAlloc; /* Number of slots in aFile[] */
7272
ImportFile *aFile; /* Information about files in a commit */
7373
int fromLoaded; /* True zFrom content loaded into aFile[] */
74
- int hasLinks; /* True if git repository contains symlinks */
7574
int tagCommit; /* True if the commit adds a tag */
7675
} gg;
7776
7877
/*
7978
** Duplicate a string.
@@ -273,11 +272,10 @@
273272
blob_appendf(&record, "F %F %s", gg.aFile[i].zName, zUuid);
274273
if( gg.aFile[i].isExe ){
275274
blob_append(&record, " x\n", 3);
276275
}else if( gg.aFile[i].isLink ){
277276
blob_append(&record, " l\n", 3);
278
- gg.hasLinks = 1;
279277
}else{
280278
blob_append(&record, "\n", 1);
281279
}
282280
}
283281
if( gg.zFrom ){
@@ -748,13 +746,10 @@
748746
{
749747
goto malformed_line;
750748
}
751749
}
752750
gg.xFinish();
753
- if( gg.hasLinks ){
754
- db_set_int("allow-symlinks", 1, 0);
755
- }
756751
import_reset(1);
757752
return;
758753
759754
malformed_line:
760755
trim_newline(zLine);
@@ -1252,10 +1247,34 @@
12521247
branchId = db_last_insert_rowid();
12531248
}
12541249
}
12551250
return branchId;
12561251
}
1252
+
1253
+/*
1254
+** Insert content of corresponding content blob into the database.
1255
+** If content is identified as a symbolic link then:
1256
+** 1)Trailing "link " characters are removed from content.
1257
+**
1258
+** content is considered to be a symlink if zPerm contains at least
1259
+** one "l" character.
1260
+*/
1261
+static int svn_handle_symlinks(const char *perms, Blob *content){
1262
+ Blob link_blob;
1263
+ if( perms && strstr(perms, "l")!=0 ){
1264
+ if( blob_size(content)>5 ){
1265
+ /* Skip trailing 'link ' characters */
1266
+ blob_seek(content, 5, BLOB_SEEK_SET);
1267
+ blob_tail(content, &link_blob);
1268
+ return content_put(&link_blob);
1269
+ }else{
1270
+ fossil_fatal("Too short symbolic link path");
1271
+ }
1272
+ }else{
1273
+ return content_put(content);
1274
+ }
1275
+}
12571276
12581277
/*
12591278
** Read the svn-dump format from pIn and insert the corresponding
12601279
** content into the database.
12611280
*/
@@ -1351,10 +1370,13 @@
13511370
int branchType;
13521371
int branchId = svn_parse_path(zTemp, &zFile, &branchType);
13531372
char *zAction = svn_find_header(rec, "Node-action");
13541373
char *zKind = svn_find_header(rec, "Node-kind");
13551374
char *zPerm = svn_find_prop(rec, "svn:executable") ? "x" : 0;
1375
+ if ( zPerm==0 ){
1376
+ zPerm = svn_find_prop(rec, "svn:special") ? "l" : 0;
1377
+ }
13561378
int deltaFlag = 0;
13571379
int srcRev = 0;
13581380
if( branchId==0 ){
13591381
svn_free_rec(&rec);
13601382
continue;
@@ -1464,13 +1486,19 @@
14641486
content_get(rid, &deltaSrc);
14651487
}else{
14661488
blob_zero(&deltaSrc);
14671489
}
14681490
svn_apply_svndiff(&rec.content, &deltaSrc, &target);
1469
- rid = content_put(&target);
1491
+ rid = svn_handle_symlinks(zPerm, &target);
14701492
}else if( rec.contentFlag ){
1471
- rid = content_put(&rec.content);
1493
+ rid = svn_handle_symlinks(zPerm, &rec.content);
1494
+ }else if( zSrcPath ){
1495
+ if ( zPerm==0 ){
1496
+ zPerm = db_text(0, "SELECT tperm FROM xfiles"
1497
+ " WHERE tpath=%Q AND tbranch=%d"
1498
+ "", zSrcPath, branchId);
1499
+ }
14721500
}
14731501
db_bind_text(&addFile, ":path", zFile);
14741502
db_bind_int(&addFile, ":branch", branchId);
14751503
db_bind_int(&addFile, ":rid", rid);
14761504
db_bind_text(&addFile, ":perm", zPerm);
@@ -1485,22 +1513,28 @@
14851513
int rid = 0;
14861514
if( zKind==0 ){
14871515
fossil_fatal("Missing Node-kind");
14881516
}
14891517
if( rec.contentFlag && strncmp(zKind, "dir", 3)!=0 ){
1518
+ if ( zPerm==0 ){
1519
+ zPerm = db_text(0, "SELECT tperm FROM xfiles"
1520
+ " WHERE tpath=%Q AND tbranch=%d"
1521
+ "", zFile, branchId);
1522
+ }
1523
+
14901524
if( deltaFlag ){
14911525
Blob deltaSrc;
14921526
Blob target;
14931527
rid = db_int(0, "SELECT rid FROM blob WHERE uuid=("
14941528
" SELECT tuuid FROM xfiles"
14951529
" WHERE tpath=%Q AND tbranch=%d"
14961530
")", zFile, branchId);
14971531
content_get(rid, &deltaSrc);
14981532
svn_apply_svndiff(&rec.content, &deltaSrc, &target);
1499
- rid = content_put(&target);
1533
+ rid = svn_handle_symlinks(zPerm, &target);
15001534
}else{
1501
- rid = content_put(&rec.content);
1535
+ rid = svn_handle_symlinks(zPerm, &rec.content);
15021536
}
15031537
db_bind_text(&addFile, ":path", zFile);
15041538
db_bind_int(&addFile, ":branch", branchId);
15051539
db_bind_int(&addFile, ":rid", rid);
15061540
db_bind_text(&addFile, ":perm", zPerm);
15071541
--- src/import.c
+++ src/import.c
@@ -69,11 +69,10 @@
69 char **azMerge; /* Merge values */
70 int nFile; /* Number of aFile values */
71 int nFileAlloc; /* Number of slots in aFile[] */
72 ImportFile *aFile; /* Information about files in a commit */
73 int fromLoaded; /* True zFrom content loaded into aFile[] */
74 int hasLinks; /* True if git repository contains symlinks */
75 int tagCommit; /* True if the commit adds a tag */
76 } gg;
77
78 /*
79 ** Duplicate a string.
@@ -273,11 +272,10 @@
273 blob_appendf(&record, "F %F %s", gg.aFile[i].zName, zUuid);
274 if( gg.aFile[i].isExe ){
275 blob_append(&record, " x\n", 3);
276 }else if( gg.aFile[i].isLink ){
277 blob_append(&record, " l\n", 3);
278 gg.hasLinks = 1;
279 }else{
280 blob_append(&record, "\n", 1);
281 }
282 }
283 if( gg.zFrom ){
@@ -748,13 +746,10 @@
748 {
749 goto malformed_line;
750 }
751 }
752 gg.xFinish();
753 if( gg.hasLinks ){
754 db_set_int("allow-symlinks", 1, 0);
755 }
756 import_reset(1);
757 return;
758
759 malformed_line:
760 trim_newline(zLine);
@@ -1252,10 +1247,34 @@
1252 branchId = db_last_insert_rowid();
1253 }
1254 }
1255 return branchId;
1256 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1257
1258 /*
1259 ** Read the svn-dump format from pIn and insert the corresponding
1260 ** content into the database.
1261 */
@@ -1351,10 +1370,13 @@
1351 int branchType;
1352 int branchId = svn_parse_path(zTemp, &zFile, &branchType);
1353 char *zAction = svn_find_header(rec, "Node-action");
1354 char *zKind = svn_find_header(rec, "Node-kind");
1355 char *zPerm = svn_find_prop(rec, "svn:executable") ? "x" : 0;
 
 
 
1356 int deltaFlag = 0;
1357 int srcRev = 0;
1358 if( branchId==0 ){
1359 svn_free_rec(&rec);
1360 continue;
@@ -1464,13 +1486,19 @@
1464 content_get(rid, &deltaSrc);
1465 }else{
1466 blob_zero(&deltaSrc);
1467 }
1468 svn_apply_svndiff(&rec.content, &deltaSrc, &target);
1469 rid = content_put(&target);
1470 }else if( rec.contentFlag ){
1471 rid = content_put(&rec.content);
 
 
 
 
 
 
1472 }
1473 db_bind_text(&addFile, ":path", zFile);
1474 db_bind_int(&addFile, ":branch", branchId);
1475 db_bind_int(&addFile, ":rid", rid);
1476 db_bind_text(&addFile, ":perm", zPerm);
@@ -1485,22 +1513,28 @@
1485 int rid = 0;
1486 if( zKind==0 ){
1487 fossil_fatal("Missing Node-kind");
1488 }
1489 if( rec.contentFlag && strncmp(zKind, "dir", 3)!=0 ){
 
 
 
 
 
 
1490 if( deltaFlag ){
1491 Blob deltaSrc;
1492 Blob target;
1493 rid = db_int(0, "SELECT rid FROM blob WHERE uuid=("
1494 " SELECT tuuid FROM xfiles"
1495 " WHERE tpath=%Q AND tbranch=%d"
1496 ")", zFile, branchId);
1497 content_get(rid, &deltaSrc);
1498 svn_apply_svndiff(&rec.content, &deltaSrc, &target);
1499 rid = content_put(&target);
1500 }else{
1501 rid = content_put(&rec.content);
1502 }
1503 db_bind_text(&addFile, ":path", zFile);
1504 db_bind_int(&addFile, ":branch", branchId);
1505 db_bind_int(&addFile, ":rid", rid);
1506 db_bind_text(&addFile, ":perm", zPerm);
1507
--- src/import.c
+++ src/import.c
@@ -69,11 +69,10 @@
69 char **azMerge; /* Merge values */
70 int nFile; /* Number of aFile values */
71 int nFileAlloc; /* Number of slots in aFile[] */
72 ImportFile *aFile; /* Information about files in a commit */
73 int fromLoaded; /* True zFrom content loaded into aFile[] */
 
74 int tagCommit; /* True if the commit adds a tag */
75 } gg;
76
77 /*
78 ** Duplicate a string.
@@ -273,11 +272,10 @@
272 blob_appendf(&record, "F %F %s", gg.aFile[i].zName, zUuid);
273 if( gg.aFile[i].isExe ){
274 blob_append(&record, " x\n", 3);
275 }else if( gg.aFile[i].isLink ){
276 blob_append(&record, " l\n", 3);
 
277 }else{
278 blob_append(&record, "\n", 1);
279 }
280 }
281 if( gg.zFrom ){
@@ -748,13 +746,10 @@
746 {
747 goto malformed_line;
748 }
749 }
750 gg.xFinish();
 
 
 
751 import_reset(1);
752 return;
753
754 malformed_line:
755 trim_newline(zLine);
@@ -1252,10 +1247,34 @@
1247 branchId = db_last_insert_rowid();
1248 }
1249 }
1250 return branchId;
1251 }
1252
1253 /*
1254 ** Insert content of corresponding content blob into the database.
1255 ** If content is identified as a symbolic link then:
1256 ** 1)Trailing "link " characters are removed from content.
1257 **
1258 ** content is considered to be a symlink if zPerm contains at least
1259 ** one "l" character.
1260 */
1261 static int svn_handle_symlinks(const char *perms, Blob *content){
1262 Blob link_blob;
1263 if( perms && strstr(perms, "l")!=0 ){
1264 if( blob_size(content)>5 ){
1265 /* Skip trailing 'link ' characters */
1266 blob_seek(content, 5, BLOB_SEEK_SET);
1267 blob_tail(content, &link_blob);
1268 return content_put(&link_blob);
1269 }else{
1270 fossil_fatal("Too short symbolic link path");
1271 }
1272 }else{
1273 return content_put(content);
1274 }
1275 }
1276
1277 /*
1278 ** Read the svn-dump format from pIn and insert the corresponding
1279 ** content into the database.
1280 */
@@ -1351,10 +1370,13 @@
1370 int branchType;
1371 int branchId = svn_parse_path(zTemp, &zFile, &branchType);
1372 char *zAction = svn_find_header(rec, "Node-action");
1373 char *zKind = svn_find_header(rec, "Node-kind");
1374 char *zPerm = svn_find_prop(rec, "svn:executable") ? "x" : 0;
1375 if ( zPerm==0 ){
1376 zPerm = svn_find_prop(rec, "svn:special") ? "l" : 0;
1377 }
1378 int deltaFlag = 0;
1379 int srcRev = 0;
1380 if( branchId==0 ){
1381 svn_free_rec(&rec);
1382 continue;
@@ -1464,13 +1486,19 @@
1486 content_get(rid, &deltaSrc);
1487 }else{
1488 blob_zero(&deltaSrc);
1489 }
1490 svn_apply_svndiff(&rec.content, &deltaSrc, &target);
1491 rid = svn_handle_symlinks(zPerm, &target);
1492 }else if( rec.contentFlag ){
1493 rid = svn_handle_symlinks(zPerm, &rec.content);
1494 }else if( zSrcPath ){
1495 if ( zPerm==0 ){
1496 zPerm = db_text(0, "SELECT tperm FROM xfiles"
1497 " WHERE tpath=%Q AND tbranch=%d"
1498 "", zSrcPath, branchId);
1499 }
1500 }
1501 db_bind_text(&addFile, ":path", zFile);
1502 db_bind_int(&addFile, ":branch", branchId);
1503 db_bind_int(&addFile, ":rid", rid);
1504 db_bind_text(&addFile, ":perm", zPerm);
@@ -1485,22 +1513,28 @@
1513 int rid = 0;
1514 if( zKind==0 ){
1515 fossil_fatal("Missing Node-kind");
1516 }
1517 if( rec.contentFlag && strncmp(zKind, "dir", 3)!=0 ){
1518 if ( zPerm==0 ){
1519 zPerm = db_text(0, "SELECT tperm FROM xfiles"
1520 " WHERE tpath=%Q AND tbranch=%d"
1521 "", zFile, branchId);
1522 }
1523
1524 if( deltaFlag ){
1525 Blob deltaSrc;
1526 Blob target;
1527 rid = db_int(0, "SELECT rid FROM blob WHERE uuid=("
1528 " SELECT tuuid FROM xfiles"
1529 " WHERE tpath=%Q AND tbranch=%d"
1530 ")", zFile, branchId);
1531 content_get(rid, &deltaSrc);
1532 svn_apply_svndiff(&rec.content, &deltaSrc, &target);
1533 rid = svn_handle_symlinks(zPerm, &target);
1534 }else{
1535 rid = svn_handle_symlinks(zPerm, &rec.content);
1536 }
1537 db_bind_text(&addFile, ":path", zFile);
1538 db_bind_int(&addFile, ":branch", branchId);
1539 db_bind_int(&addFile, ":rid", rid);
1540 db_bind_text(&addFile, ":perm", zPerm);
1541
+43 -9
--- src/import.c
+++ src/import.c
@@ -69,11 +69,10 @@
6969
char **azMerge; /* Merge values */
7070
int nFile; /* Number of aFile values */
7171
int nFileAlloc; /* Number of slots in aFile[] */
7272
ImportFile *aFile; /* Information about files in a commit */
7373
int fromLoaded; /* True zFrom content loaded into aFile[] */
74
- int hasLinks; /* True if git repository contains symlinks */
7574
int tagCommit; /* True if the commit adds a tag */
7675
} gg;
7776
7877
/*
7978
** Duplicate a string.
@@ -273,11 +272,10 @@
273272
blob_appendf(&record, "F %F %s", gg.aFile[i].zName, zUuid);
274273
if( gg.aFile[i].isExe ){
275274
blob_append(&record, " x\n", 3);
276275
}else if( gg.aFile[i].isLink ){
277276
blob_append(&record, " l\n", 3);
278
- gg.hasLinks = 1;
279277
}else{
280278
blob_append(&record, "\n", 1);
281279
}
282280
}
283281
if( gg.zFrom ){
@@ -748,13 +746,10 @@
748746
{
749747
goto malformed_line;
750748
}
751749
}
752750
gg.xFinish();
753
- if( gg.hasLinks ){
754
- db_set_int("allow-symlinks", 1, 0);
755
- }
756751
import_reset(1);
757752
return;
758753
759754
malformed_line:
760755
trim_newline(zLine);
@@ -1252,10 +1247,34 @@
12521247
branchId = db_last_insert_rowid();
12531248
}
12541249
}
12551250
return branchId;
12561251
}
1252
+
1253
+/*
1254
+** Insert content of corresponding content blob into the database.
1255
+** If content is identified as a symbolic link then:
1256
+** 1)Trailing "link " characters are removed from content.
1257
+**
1258
+** content is considered to be a symlink if zPerm contains at least
1259
+** one "l" character.
1260
+*/
1261
+static int svn_handle_symlinks(const char *perms, Blob *content){
1262
+ Blob link_blob;
1263
+ if( perms && strstr(perms, "l")!=0 ){
1264
+ if( blob_size(content)>5 ){
1265
+ /* Skip trailing 'link ' characters */
1266
+ blob_seek(content, 5, BLOB_SEEK_SET);
1267
+ blob_tail(content, &link_blob);
1268
+ return content_put(&link_blob);
1269
+ }else{
1270
+ fossil_fatal("Too short symbolic link path");
1271
+ }
1272
+ }else{
1273
+ return content_put(content);
1274
+ }
1275
+}
12571276
12581277
/*
12591278
** Read the svn-dump format from pIn and insert the corresponding
12601279
** content into the database.
12611280
*/
@@ -1351,10 +1370,13 @@
13511370
int branchType;
13521371
int branchId = svn_parse_path(zTemp, &zFile, &branchType);
13531372
char *zAction = svn_find_header(rec, "Node-action");
13541373
char *zKind = svn_find_header(rec, "Node-kind");
13551374
char *zPerm = svn_find_prop(rec, "svn:executable") ? "x" : 0;
1375
+ if ( zPerm==0 ){
1376
+ zPerm = svn_find_prop(rec, "svn:special") ? "l" : 0;
1377
+ }
13561378
int deltaFlag = 0;
13571379
int srcRev = 0;
13581380
if( branchId==0 ){
13591381
svn_free_rec(&rec);
13601382
continue;
@@ -1464,13 +1486,19 @@
14641486
content_get(rid, &deltaSrc);
14651487
}else{
14661488
blob_zero(&deltaSrc);
14671489
}
14681490
svn_apply_svndiff(&rec.content, &deltaSrc, &target);
1469
- rid = content_put(&target);
1491
+ rid = svn_handle_symlinks(zPerm, &target);
14701492
}else if( rec.contentFlag ){
1471
- rid = content_put(&rec.content);
1493
+ rid = svn_handle_symlinks(zPerm, &rec.content);
1494
+ }else if( zSrcPath ){
1495
+ if ( zPerm==0 ){
1496
+ zPerm = db_text(0, "SELECT tperm FROM xfiles"
1497
+ " WHERE tpath=%Q AND tbranch=%d"
1498
+ "", zSrcPath, branchId);
1499
+ }
14721500
}
14731501
db_bind_text(&addFile, ":path", zFile);
14741502
db_bind_int(&addFile, ":branch", branchId);
14751503
db_bind_int(&addFile, ":rid", rid);
14761504
db_bind_text(&addFile, ":perm", zPerm);
@@ -1485,22 +1513,28 @@
14851513
int rid = 0;
14861514
if( zKind==0 ){
14871515
fossil_fatal("Missing Node-kind");
14881516
}
14891517
if( rec.contentFlag && strncmp(zKind, "dir", 3)!=0 ){
1518
+ if ( zPerm==0 ){
1519
+ zPerm = db_text(0, "SELECT tperm FROM xfiles"
1520
+ " WHERE tpath=%Q AND tbranch=%d"
1521
+ "", zFile, branchId);
1522
+ }
1523
+
14901524
if( deltaFlag ){
14911525
Blob deltaSrc;
14921526
Blob target;
14931527
rid = db_int(0, "SELECT rid FROM blob WHERE uuid=("
14941528
" SELECT tuuid FROM xfiles"
14951529
" WHERE tpath=%Q AND tbranch=%d"
14961530
")", zFile, branchId);
14971531
content_get(rid, &deltaSrc);
14981532
svn_apply_svndiff(&rec.content, &deltaSrc, &target);
1499
- rid = content_put(&target);
1533
+ rid = svn_handle_symlinks(zPerm, &target);
15001534
}else{
1501
- rid = content_put(&rec.content);
1535
+ rid = svn_handle_symlinks(zPerm, &rec.content);
15021536
}
15031537
db_bind_text(&addFile, ":path", zFile);
15041538
db_bind_int(&addFile, ":branch", branchId);
15051539
db_bind_int(&addFile, ":rid", rid);
15061540
db_bind_text(&addFile, ":perm", zPerm);
15071541
--- src/import.c
+++ src/import.c
@@ -69,11 +69,10 @@
69 char **azMerge; /* Merge values */
70 int nFile; /* Number of aFile values */
71 int nFileAlloc; /* Number of slots in aFile[] */
72 ImportFile *aFile; /* Information about files in a commit */
73 int fromLoaded; /* True zFrom content loaded into aFile[] */
74 int hasLinks; /* True if git repository contains symlinks */
75 int tagCommit; /* True if the commit adds a tag */
76 } gg;
77
78 /*
79 ** Duplicate a string.
@@ -273,11 +272,10 @@
273 blob_appendf(&record, "F %F %s", gg.aFile[i].zName, zUuid);
274 if( gg.aFile[i].isExe ){
275 blob_append(&record, " x\n", 3);
276 }else if( gg.aFile[i].isLink ){
277 blob_append(&record, " l\n", 3);
278 gg.hasLinks = 1;
279 }else{
280 blob_append(&record, "\n", 1);
281 }
282 }
283 if( gg.zFrom ){
@@ -748,13 +746,10 @@
748 {
749 goto malformed_line;
750 }
751 }
752 gg.xFinish();
753 if( gg.hasLinks ){
754 db_set_int("allow-symlinks", 1, 0);
755 }
756 import_reset(1);
757 return;
758
759 malformed_line:
760 trim_newline(zLine);
@@ -1252,10 +1247,34 @@
1252 branchId = db_last_insert_rowid();
1253 }
1254 }
1255 return branchId;
1256 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1257
1258 /*
1259 ** Read the svn-dump format from pIn and insert the corresponding
1260 ** content into the database.
1261 */
@@ -1351,10 +1370,13 @@
1351 int branchType;
1352 int branchId = svn_parse_path(zTemp, &zFile, &branchType);
1353 char *zAction = svn_find_header(rec, "Node-action");
1354 char *zKind = svn_find_header(rec, "Node-kind");
1355 char *zPerm = svn_find_prop(rec, "svn:executable") ? "x" : 0;
 
 
 
1356 int deltaFlag = 0;
1357 int srcRev = 0;
1358 if( branchId==0 ){
1359 svn_free_rec(&rec);
1360 continue;
@@ -1464,13 +1486,19 @@
1464 content_get(rid, &deltaSrc);
1465 }else{
1466 blob_zero(&deltaSrc);
1467 }
1468 svn_apply_svndiff(&rec.content, &deltaSrc, &target);
1469 rid = content_put(&target);
1470 }else if( rec.contentFlag ){
1471 rid = content_put(&rec.content);
 
 
 
 
 
 
1472 }
1473 db_bind_text(&addFile, ":path", zFile);
1474 db_bind_int(&addFile, ":branch", branchId);
1475 db_bind_int(&addFile, ":rid", rid);
1476 db_bind_text(&addFile, ":perm", zPerm);
@@ -1485,22 +1513,28 @@
1485 int rid = 0;
1486 if( zKind==0 ){
1487 fossil_fatal("Missing Node-kind");
1488 }
1489 if( rec.contentFlag && strncmp(zKind, "dir", 3)!=0 ){
 
 
 
 
 
 
1490 if( deltaFlag ){
1491 Blob deltaSrc;
1492 Blob target;
1493 rid = db_int(0, "SELECT rid FROM blob WHERE uuid=("
1494 " SELECT tuuid FROM xfiles"
1495 " WHERE tpath=%Q AND tbranch=%d"
1496 ")", zFile, branchId);
1497 content_get(rid, &deltaSrc);
1498 svn_apply_svndiff(&rec.content, &deltaSrc, &target);
1499 rid = content_put(&target);
1500 }else{
1501 rid = content_put(&rec.content);
1502 }
1503 db_bind_text(&addFile, ":path", zFile);
1504 db_bind_int(&addFile, ":branch", branchId);
1505 db_bind_int(&addFile, ":rid", rid);
1506 db_bind_text(&addFile, ":perm", zPerm);
1507
--- src/import.c
+++ src/import.c
@@ -69,11 +69,10 @@
69 char **azMerge; /* Merge values */
70 int nFile; /* Number of aFile values */
71 int nFileAlloc; /* Number of slots in aFile[] */
72 ImportFile *aFile; /* Information about files in a commit */
73 int fromLoaded; /* True zFrom content loaded into aFile[] */
 
74 int tagCommit; /* True if the commit adds a tag */
75 } gg;
76
77 /*
78 ** Duplicate a string.
@@ -273,11 +272,10 @@
272 blob_appendf(&record, "F %F %s", gg.aFile[i].zName, zUuid);
273 if( gg.aFile[i].isExe ){
274 blob_append(&record, " x\n", 3);
275 }else if( gg.aFile[i].isLink ){
276 blob_append(&record, " l\n", 3);
 
277 }else{
278 blob_append(&record, "\n", 1);
279 }
280 }
281 if( gg.zFrom ){
@@ -748,13 +746,10 @@
746 {
747 goto malformed_line;
748 }
749 }
750 gg.xFinish();
 
 
 
751 import_reset(1);
752 return;
753
754 malformed_line:
755 trim_newline(zLine);
@@ -1252,10 +1247,34 @@
1247 branchId = db_last_insert_rowid();
1248 }
1249 }
1250 return branchId;
1251 }
1252
1253 /*
1254 ** Insert content of corresponding content blob into the database.
1255 ** If content is identified as a symbolic link then:
1256 ** 1)Trailing "link " characters are removed from content.
1257 **
1258 ** content is considered to be a symlink if zPerm contains at least
1259 ** one "l" character.
1260 */
1261 static int svn_handle_symlinks(const char *perms, Blob *content){
1262 Blob link_blob;
1263 if( perms && strstr(perms, "l")!=0 ){
1264 if( blob_size(content)>5 ){
1265 /* Skip trailing 'link ' characters */
1266 blob_seek(content, 5, BLOB_SEEK_SET);
1267 blob_tail(content, &link_blob);
1268 return content_put(&link_blob);
1269 }else{
1270 fossil_fatal("Too short symbolic link path");
1271 }
1272 }else{
1273 return content_put(content);
1274 }
1275 }
1276
1277 /*
1278 ** Read the svn-dump format from pIn and insert the corresponding
1279 ** content into the database.
1280 */
@@ -1351,10 +1370,13 @@
1370 int branchType;
1371 int branchId = svn_parse_path(zTemp, &zFile, &branchType);
1372 char *zAction = svn_find_header(rec, "Node-action");
1373 char *zKind = svn_find_header(rec, "Node-kind");
1374 char *zPerm = svn_find_prop(rec, "svn:executable") ? "x" : 0;
1375 if ( zPerm==0 ){
1376 zPerm = svn_find_prop(rec, "svn:special") ? "l" : 0;
1377 }
1378 int deltaFlag = 0;
1379 int srcRev = 0;
1380 if( branchId==0 ){
1381 svn_free_rec(&rec);
1382 continue;
@@ -1464,13 +1486,19 @@
1486 content_get(rid, &deltaSrc);
1487 }else{
1488 blob_zero(&deltaSrc);
1489 }
1490 svn_apply_svndiff(&rec.content, &deltaSrc, &target);
1491 rid = svn_handle_symlinks(zPerm, &target);
1492 }else if( rec.contentFlag ){
1493 rid = svn_handle_symlinks(zPerm, &rec.content);
1494 }else if( zSrcPath ){
1495 if ( zPerm==0 ){
1496 zPerm = db_text(0, "SELECT tperm FROM xfiles"
1497 " WHERE tpath=%Q AND tbranch=%d"
1498 "", zSrcPath, branchId);
1499 }
1500 }
1501 db_bind_text(&addFile, ":path", zFile);
1502 db_bind_int(&addFile, ":branch", branchId);
1503 db_bind_int(&addFile, ":rid", rid);
1504 db_bind_text(&addFile, ":perm", zPerm);
@@ -1485,22 +1513,28 @@
1513 int rid = 0;
1514 if( zKind==0 ){
1515 fossil_fatal("Missing Node-kind");
1516 }
1517 if( rec.contentFlag && strncmp(zKind, "dir", 3)!=0 ){
1518 if ( zPerm==0 ){
1519 zPerm = db_text(0, "SELECT tperm FROM xfiles"
1520 " WHERE tpath=%Q AND tbranch=%d"
1521 "", zFile, branchId);
1522 }
1523
1524 if( deltaFlag ){
1525 Blob deltaSrc;
1526 Blob target;
1527 rid = db_int(0, "SELECT rid FROM blob WHERE uuid=("
1528 " SELECT tuuid FROM xfiles"
1529 " WHERE tpath=%Q AND tbranch=%d"
1530 ")", zFile, branchId);
1531 content_get(rid, &deltaSrc);
1532 svn_apply_svndiff(&rec.content, &deltaSrc, &target);
1533 rid = svn_handle_symlinks(zPerm, &target);
1534 }else{
1535 rid = svn_handle_symlinks(zPerm, &rec.content);
1536 }
1537 db_bind_text(&addFile, ":path", zFile);
1538 db_bind_int(&addFile, ":branch", branchId);
1539 db_bind_int(&addFile, ":rid", rid);
1540 db_bind_text(&addFile, ":perm", zPerm);
1541
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -728,11 +728,11 @@
728728
# run on the target platform. This is usually the almost the same
729729
# as BCC, unless you are cross-compiling. This C compiler builds
730730
# the finished binary for fossil. The BCC compiler above is used
731731
# for building intermediate code-generator tools.
732732
#
733
-TCC = $(PREFIX)$(TCCEXE) -Wall
733
+TCC = $(PREFIX)$(TCCEXE) -Wall -Wdeclaration-after-statement
734734
735735
#### Add the necessary command line options to build with debugging
736736
# symbols, if enabled.
737737
#
738738
ifdef FOSSIL_ENABLE_SYMBOLS
739739
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -728,11 +728,11 @@
728 # run on the target platform. This is usually the almost the same
729 # as BCC, unless you are cross-compiling. This C compiler builds
730 # the finished binary for fossil. The BCC compiler above is used
731 # for building intermediate code-generator tools.
732 #
733 TCC = $(PREFIX)$(TCCEXE) -Wall
734
735 #### Add the necessary command line options to build with debugging
736 # symbols, if enabled.
737 #
738 ifdef FOSSIL_ENABLE_SYMBOLS
739
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -728,11 +728,11 @@
728 # run on the target platform. This is usually the almost the same
729 # as BCC, unless you are cross-compiling. This C compiler builds
730 # the finished binary for fossil. The BCC compiler above is used
731 # for building intermediate code-generator tools.
732 #
733 TCC = $(PREFIX)$(TCCEXE) -Wall -Wdeclaration-after-statement
734
735 #### Add the necessary command line options to build with debugging
736 # symbols, if enabled.
737 #
738 ifdef FOSSIL_ENABLE_SYMBOLS
739
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -728,11 +728,11 @@
728728
# run on the target platform. This is usually the almost the same
729729
# as BCC, unless you are cross-compiling. This C compiler builds
730730
# the finished binary for fossil. The BCC compiler above is used
731731
# for building intermediate code-generator tools.
732732
#
733
-TCC = $(PREFIX)$(TCCEXE) -Wall
733
+TCC = $(PREFIX)$(TCCEXE) -Wall -Wdeclaration-after-statement
734734
735735
#### Add the necessary command line options to build with debugging
736736
# symbols, if enabled.
737737
#
738738
ifdef FOSSIL_ENABLE_SYMBOLS
739739
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -728,11 +728,11 @@
728 # run on the target platform. This is usually the almost the same
729 # as BCC, unless you are cross-compiling. This C compiler builds
730 # the finished binary for fossil. The BCC compiler above is used
731 # for building intermediate code-generator tools.
732 #
733 TCC = $(PREFIX)$(TCCEXE) -Wall
734
735 #### Add the necessary command line options to build with debugging
736 # symbols, if enabled.
737 #
738 ifdef FOSSIL_ENABLE_SYMBOLS
739
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -728,11 +728,11 @@
728 # run on the target platform. This is usually the almost the same
729 # as BCC, unless you are cross-compiling. This C compiler builds
730 # the finished binary for fossil. The BCC compiler above is used
731 # for building intermediate code-generator tools.
732 #
733 TCC = $(PREFIX)$(TCCEXE) -Wall -Wdeclaration-after-statement
734
735 #### Add the necessary command line options to build with debugging
736 # symbols, if enabled.
737 #
738 ifdef FOSSIL_ENABLE_SYMBOLS
739
+2 -3
--- src/shell.c
+++ src/shell.c
@@ -2924,11 +2924,10 @@
29242924
if( i>nCol ){
29252925
/* At this point, we know that azRowid[j] is not the name of any
29262926
** ordinary column in the table. Verify that azRowid[j] is a valid
29272927
** name for the rowid before adding it to azCol[0]. WITHOUT ROWID
29282928
** tables will fail this last check */
2929
- int rc;
29302929
rc = sqlite3_table_column_metadata(p->db,0,zTab,azRowid[j],0,0,0,0,0);
29312930
if( rc==SQLITE_OK ) azCol[0] = azRowid[j];
29322931
break;
29332932
}
29342933
}
@@ -2957,18 +2956,18 @@
29572956
** This is a different callback routine used for dumping the database.
29582957
** Each row received by this callback consists of a table name,
29592958
** the table type ("index" or "table") and SQL to create the table.
29602959
** This routine should print text sufficient to recreate the table.
29612960
*/
2962
-static int dump_callback(void *pArg, int nArg, char **azArg, char **azCol){
2961
+static int dump_callback(void *pArg, int nArg, char **azArg, char **azNotUsed){
29632962
int rc;
29642963
const char *zTable;
29652964
const char *zType;
29662965
const char *zSql;
29672966
ShellState *p = (ShellState *)pArg;
29682967
2969
- UNUSED_PARAMETER(azCol);
2968
+ UNUSED_PARAMETER(azNotUsed);
29702969
if( nArg!=3 ) return 1;
29712970
zTable = azArg[0];
29722971
zType = azArg[1];
29732972
zSql = azArg[2];
29742973
29752974
--- src/shell.c
+++ src/shell.c
@@ -2924,11 +2924,10 @@
2924 if( i>nCol ){
2925 /* At this point, we know that azRowid[j] is not the name of any
2926 ** ordinary column in the table. Verify that azRowid[j] is a valid
2927 ** name for the rowid before adding it to azCol[0]. WITHOUT ROWID
2928 ** tables will fail this last check */
2929 int rc;
2930 rc = sqlite3_table_column_metadata(p->db,0,zTab,azRowid[j],0,0,0,0,0);
2931 if( rc==SQLITE_OK ) azCol[0] = azRowid[j];
2932 break;
2933 }
2934 }
@@ -2957,18 +2956,18 @@
2957 ** This is a different callback routine used for dumping the database.
2958 ** Each row received by this callback consists of a table name,
2959 ** the table type ("index" or "table") and SQL to create the table.
2960 ** This routine should print text sufficient to recreate the table.
2961 */
2962 static int dump_callback(void *pArg, int nArg, char **azArg, char **azCol){
2963 int rc;
2964 const char *zTable;
2965 const char *zType;
2966 const char *zSql;
2967 ShellState *p = (ShellState *)pArg;
2968
2969 UNUSED_PARAMETER(azCol);
2970 if( nArg!=3 ) return 1;
2971 zTable = azArg[0];
2972 zType = azArg[1];
2973 zSql = azArg[2];
2974
2975
--- src/shell.c
+++ src/shell.c
@@ -2924,11 +2924,10 @@
2924 if( i>nCol ){
2925 /* At this point, we know that azRowid[j] is not the name of any
2926 ** ordinary column in the table. Verify that azRowid[j] is a valid
2927 ** name for the rowid before adding it to azCol[0]. WITHOUT ROWID
2928 ** tables will fail this last check */
 
2929 rc = sqlite3_table_column_metadata(p->db,0,zTab,azRowid[j],0,0,0,0,0);
2930 if( rc==SQLITE_OK ) azCol[0] = azRowid[j];
2931 break;
2932 }
2933 }
@@ -2957,18 +2956,18 @@
2956 ** This is a different callback routine used for dumping the database.
2957 ** Each row received by this callback consists of a table name,
2958 ** the table type ("index" or "table") and SQL to create the table.
2959 ** This routine should print text sufficient to recreate the table.
2960 */
2961 static int dump_callback(void *pArg, int nArg, char **azArg, char **azNotUsed){
2962 int rc;
2963 const char *zTable;
2964 const char *zType;
2965 const char *zSql;
2966 ShellState *p = (ShellState *)pArg;
2967
2968 UNUSED_PARAMETER(azNotUsed);
2969 if( nArg!=3 ) return 1;
2970 zTable = azArg[0];
2971 zType = azArg[1];
2972 zSql = azArg[2];
2973
2974
+2 -3
--- src/shell.c
+++ src/shell.c
@@ -2924,11 +2924,10 @@
29242924
if( i>nCol ){
29252925
/* At this point, we know that azRowid[j] is not the name of any
29262926
** ordinary column in the table. Verify that azRowid[j] is a valid
29272927
** name for the rowid before adding it to azCol[0]. WITHOUT ROWID
29282928
** tables will fail this last check */
2929
- int rc;
29302929
rc = sqlite3_table_column_metadata(p->db,0,zTab,azRowid[j],0,0,0,0,0);
29312930
if( rc==SQLITE_OK ) azCol[0] = azRowid[j];
29322931
break;
29332932
}
29342933
}
@@ -2957,18 +2956,18 @@
29572956
** This is a different callback routine used for dumping the database.
29582957
** Each row received by this callback consists of a table name,
29592958
** the table type ("index" or "table") and SQL to create the table.
29602959
** This routine should print text sufficient to recreate the table.
29612960
*/
2962
-static int dump_callback(void *pArg, int nArg, char **azArg, char **azCol){
2961
+static int dump_callback(void *pArg, int nArg, char **azArg, char **azNotUsed){
29632962
int rc;
29642963
const char *zTable;
29652964
const char *zType;
29662965
const char *zSql;
29672966
ShellState *p = (ShellState *)pArg;
29682967
2969
- UNUSED_PARAMETER(azCol);
2968
+ UNUSED_PARAMETER(azNotUsed);
29702969
if( nArg!=3 ) return 1;
29712970
zTable = azArg[0];
29722971
zType = azArg[1];
29732972
zSql = azArg[2];
29742973
29752974
--- src/shell.c
+++ src/shell.c
@@ -2924,11 +2924,10 @@
2924 if( i>nCol ){
2925 /* At this point, we know that azRowid[j] is not the name of any
2926 ** ordinary column in the table. Verify that azRowid[j] is a valid
2927 ** name for the rowid before adding it to azCol[0]. WITHOUT ROWID
2928 ** tables will fail this last check */
2929 int rc;
2930 rc = sqlite3_table_column_metadata(p->db,0,zTab,azRowid[j],0,0,0,0,0);
2931 if( rc==SQLITE_OK ) azCol[0] = azRowid[j];
2932 break;
2933 }
2934 }
@@ -2957,18 +2956,18 @@
2957 ** This is a different callback routine used for dumping the database.
2958 ** Each row received by this callback consists of a table name,
2959 ** the table type ("index" or "table") and SQL to create the table.
2960 ** This routine should print text sufficient to recreate the table.
2961 */
2962 static int dump_callback(void *pArg, int nArg, char **azArg, char **azCol){
2963 int rc;
2964 const char *zTable;
2965 const char *zType;
2966 const char *zSql;
2967 ShellState *p = (ShellState *)pArg;
2968
2969 UNUSED_PARAMETER(azCol);
2970 if( nArg!=3 ) return 1;
2971 zTable = azArg[0];
2972 zType = azArg[1];
2973 zSql = azArg[2];
2974
2975
--- src/shell.c
+++ src/shell.c
@@ -2924,11 +2924,10 @@
2924 if( i>nCol ){
2925 /* At this point, we know that azRowid[j] is not the name of any
2926 ** ordinary column in the table. Verify that azRowid[j] is a valid
2927 ** name for the rowid before adding it to azCol[0]. WITHOUT ROWID
2928 ** tables will fail this last check */
 
2929 rc = sqlite3_table_column_metadata(p->db,0,zTab,azRowid[j],0,0,0,0,0);
2930 if( rc==SQLITE_OK ) azCol[0] = azRowid[j];
2931 break;
2932 }
2933 }
@@ -2957,18 +2956,18 @@
2956 ** This is a different callback routine used for dumping the database.
2957 ** Each row received by this callback consists of a table name,
2958 ** the table type ("index" or "table") and SQL to create the table.
2959 ** This routine should print text sufficient to recreate the table.
2960 */
2961 static int dump_callback(void *pArg, int nArg, char **azArg, char **azNotUsed){
2962 int rc;
2963 const char *zTable;
2964 const char *zType;
2965 const char *zSql;
2966 ShellState *p = (ShellState *)pArg;
2967
2968 UNUSED_PARAMETER(azNotUsed);
2969 if( nArg!=3 ) return 1;
2970 zTable = azArg[0];
2971 zType = azArg[1];
2972 zSql = azArg[2];
2973
2974
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -225,11 +225,11 @@
225225
# run on the target platform. This is usually the almost the same
226226
# as BCC, unless you are cross-compiling. This C compiler builds
227227
# the finished binary for fossil. The BCC compiler above is used
228228
# for building intermediate code-generator tools.
229229
#
230
-TCC = $(PREFIX)$(TCCEXE) -Wall
230
+TCC = $(PREFIX)$(TCCEXE) -Wall -Wdeclaration-after-statement
231231
232232
#### Add the necessary command line options to build with debugging
233233
# symbols, if enabled.
234234
#
235235
ifdef FOSSIL_ENABLE_SYMBOLS
236236
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -225,11 +225,11 @@
225 # run on the target platform. This is usually the almost the same
226 # as BCC, unless you are cross-compiling. This C compiler builds
227 # the finished binary for fossil. The BCC compiler above is used
228 # for building intermediate code-generator tools.
229 #
230 TCC = $(PREFIX)$(TCCEXE) -Wall
231
232 #### Add the necessary command line options to build with debugging
233 # symbols, if enabled.
234 #
235 ifdef FOSSIL_ENABLE_SYMBOLS
236
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -225,11 +225,11 @@
225 # run on the target platform. This is usually the almost the same
226 # as BCC, unless you are cross-compiling. This C compiler builds
227 # the finished binary for fossil. The BCC compiler above is used
228 # for building intermediate code-generator tools.
229 #
230 TCC = $(PREFIX)$(TCCEXE) -Wall -Wdeclaration-after-statement
231
232 #### Add the necessary command line options to build with debugging
233 # symbols, if enabled.
234 #
235 ifdef FOSSIL_ENABLE_SYMBOLS
236
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -225,11 +225,11 @@
225225
# run on the target platform. This is usually the almost the same
226226
# as BCC, unless you are cross-compiling. This C compiler builds
227227
# the finished binary for fossil. The BCC compiler above is used
228228
# for building intermediate code-generator tools.
229229
#
230
-TCC = $(PREFIX)$(TCCEXE) -Wall
230
+TCC = $(PREFIX)$(TCCEXE) -Wall -Wdeclaration-after-statement
231231
232232
#### Add the necessary command line options to build with debugging
233233
# symbols, if enabled.
234234
#
235235
ifdef FOSSIL_ENABLE_SYMBOLS
236236
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -225,11 +225,11 @@
225 # run on the target platform. This is usually the almost the same
226 # as BCC, unless you are cross-compiling. This C compiler builds
227 # the finished binary for fossil. The BCC compiler above is used
228 # for building intermediate code-generator tools.
229 #
230 TCC = $(PREFIX)$(TCCEXE) -Wall
231
232 #### Add the necessary command line options to build with debugging
233 # symbols, if enabled.
234 #
235 ifdef FOSSIL_ENABLE_SYMBOLS
236
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -225,11 +225,11 @@
225 # run on the target platform. This is usually the almost the same
226 # as BCC, unless you are cross-compiling. This C compiler builds
227 # the finished binary for fossil. The BCC compiler above is used
228 # for building intermediate code-generator tools.
229 #
230 TCC = $(PREFIX)$(TCCEXE) -Wall -Wdeclaration-after-statement
231
232 #### Add the necessary command line options to build with debugging
233 # symbols, if enabled.
234 #
235 ifdef FOSSIL_ENABLE_SYMBOLS
236
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -225,11 +225,11 @@
225225
# run on the target platform. This is usually the almost the same
226226
# as BCC, unless you are cross-compiling. This C compiler builds
227227
# the finished binary for fossil. The BCC compiler above is used
228228
# for building intermediate code-generator tools.
229229
#
230
-TCC = $(PREFIX)$(TCCEXE) -Wall
230
+TCC = $(PREFIX)$(TCCEXE) -Wall -Wdeclaration-after-statement
231231
232232
#### Add the necessary command line options to build with debugging
233233
# symbols, if enabled.
234234
#
235235
ifdef FOSSIL_ENABLE_SYMBOLS
236236
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -225,11 +225,11 @@
225 # run on the target platform. This is usually the almost the same
226 # as BCC, unless you are cross-compiling. This C compiler builds
227 # the finished binary for fossil. The BCC compiler above is used
228 # for building intermediate code-generator tools.
229 #
230 TCC = $(PREFIX)$(TCCEXE) -Wall
231
232 #### Add the necessary command line options to build with debugging
233 # symbols, if enabled.
234 #
235 ifdef FOSSIL_ENABLE_SYMBOLS
236
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -225,11 +225,11 @@
225 # run on the target platform. This is usually the almost the same
226 # as BCC, unless you are cross-compiling. This C compiler builds
227 # the finished binary for fossil. The BCC compiler above is used
228 # for building intermediate code-generator tools.
229 #
230 TCC = $(PREFIX)$(TCCEXE) -Wall -Wdeclaration-after-statement
231
232 #### Add the necessary command line options to build with debugging
233 # symbols, if enabled.
234 #
235 ifdef FOSSIL_ENABLE_SYMBOLS
236
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -225,11 +225,11 @@
225225
# run on the target platform. This is usually the almost the same
226226
# as BCC, unless you are cross-compiling. This C compiler builds
227227
# the finished binary for fossil. The BCC compiler above is used
228228
# for building intermediate code-generator tools.
229229
#
230
-TCC = $(PREFIX)$(TCCEXE) -Wall
230
+TCC = $(PREFIX)$(TCCEXE) -Wall -Wdeclaration-after-statement
231231
232232
#### Add the necessary command line options to build with debugging
233233
# symbols, if enabled.
234234
#
235235
ifdef FOSSIL_ENABLE_SYMBOLS
236236
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -225,11 +225,11 @@
225 # run on the target platform. This is usually the almost the same
226 # as BCC, unless you are cross-compiling. This C compiler builds
227 # the finished binary for fossil. The BCC compiler above is used
228 # for building intermediate code-generator tools.
229 #
230 TCC = $(PREFIX)$(TCCEXE) -Wall
231
232 #### Add the necessary command line options to build with debugging
233 # symbols, if enabled.
234 #
235 ifdef FOSSIL_ENABLE_SYMBOLS
236
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -225,11 +225,11 @@
225 # run on the target platform. This is usually the almost the same
226 # as BCC, unless you are cross-compiling. This C compiler builds
227 # the finished binary for fossil. The BCC compiler above is used
228 # for building intermediate code-generator tools.
229 #
230 TCC = $(PREFIX)$(TCCEXE) -Wall -Wdeclaration-after-statement
231
232 #### Add the necessary command line options to build with debugging
233 # symbols, if enabled.
234 #
235 ifdef FOSSIL_ENABLE_SYMBOLS
236

Keyboard Shortcuts

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