Fossil SCM
Fix over-length source code lines in import.c.
Commit
8d9d8654a39db1893df0b79da63259a47e51fb76b35edd69769f1f3146e9a4af
Parent
1f2b6cedadf4e82…
1 file changed
+4
-3
+4
-3
| --- src/import.c | ||
| +++ src/import.c | ||
| @@ -571,11 +571,11 @@ | ||
| 571 | 571 | ** |
| 572 | 572 | ** None of the above is explained in the git-fast-export |
| 573 | 573 | ** documentation. We had to figure it out via trial and error. |
| 574 | 574 | */ |
| 575 | 575 | for(i=5; i<strlen(zRefName) && zRefName[i]!='/'; i++){} |
| 576 | - gg.tagCommit = strncmp(&zRefName[5], "tags", 4)==0; /* True for pattern B */ | |
| 576 | + gg.tagCommit = strncmp(&zRefName[5], "tags", 4)==0; /* pattern B */ | |
| 577 | 577 | if( zRefName[i+1]!=0 ) zRefName += i+1; |
| 578 | 578 | if( fossil_strcmp(zRefName, "master")==0 ) zRefName = ggit.zMasterName; |
| 579 | 579 | gg.zBranch = fossil_strdup(zRefName); |
| 580 | 580 | gg.fromLoaded = 0; |
| 581 | 581 | }else |
| @@ -657,11 +657,11 @@ | ||
| 657 | 657 | secSince1970 = 0; |
| 658 | 658 | for(zTo++; fossil_isdigit(*zTo); zTo++){ |
| 659 | 659 | secSince1970 = secSince1970*10 + *zTo - '0'; |
| 660 | 660 | } |
| 661 | 661 | fossil_free(gg.zDate); |
| 662 | - gg.zDate = db_text(0, "SELECT datetime(%lld, 'unixepoch')", secSince1970); | |
| 662 | + gg.zDate = db_text(0, "SELECT datetime(%lld, 'unixepoch')",secSince1970); | |
| 663 | 663 | gg.zDate[10] = 'T'; |
| 664 | 664 | }else |
| 665 | 665 | if( strncmp(zLine, "from ", 5)==0 ){ |
| 666 | 666 | trim_newline(&zLine[5]); |
| 667 | 667 | fossil_free(gg.zFromMark); |
| @@ -1349,11 +1349,12 @@ | ||
| 1349 | 1349 | db_prepare(&addRev, |
| 1350 | 1350 | "INSERT OR IGNORE INTO xrevisions (trev, tbranch) VALUES(:rev, :branch)" |
| 1351 | 1351 | ); |
| 1352 | 1352 | db_prepare(&cpyPath, |
| 1353 | 1353 | "INSERT INTO xfiles (tpath, tbranch, tuuid, tperm)" |
| 1354 | - " SELECT :path||:sep||substr(filename, length(:srcpath)+2), :branch, uuid, perm" | |
| 1354 | + " SELECT :path||:sep||substr(filename," | |
| 1355 | + " length(:srcpath)+2), :branch, uuid, perm" | |
| 1355 | 1356 | " FROM xfoci" |
| 1356 | 1357 | " WHERE checkinID=:rid" |
| 1357 | 1358 | " AND filename>:srcpath||'/'" |
| 1358 | 1359 | " AND filename<:srcpath||'0'" |
| 1359 | 1360 | ); |
| 1360 | 1361 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -571,11 +571,11 @@ | |
| 571 | ** |
| 572 | ** None of the above is explained in the git-fast-export |
| 573 | ** documentation. We had to figure it out via trial and error. |
| 574 | */ |
| 575 | for(i=5; i<strlen(zRefName) && zRefName[i]!='/'; i++){} |
| 576 | gg.tagCommit = strncmp(&zRefName[5], "tags", 4)==0; /* True for pattern B */ |
| 577 | if( zRefName[i+1]!=0 ) zRefName += i+1; |
| 578 | if( fossil_strcmp(zRefName, "master")==0 ) zRefName = ggit.zMasterName; |
| 579 | gg.zBranch = fossil_strdup(zRefName); |
| 580 | gg.fromLoaded = 0; |
| 581 | }else |
| @@ -657,11 +657,11 @@ | |
| 657 | secSince1970 = 0; |
| 658 | for(zTo++; fossil_isdigit(*zTo); zTo++){ |
| 659 | secSince1970 = secSince1970*10 + *zTo - '0'; |
| 660 | } |
| 661 | fossil_free(gg.zDate); |
| 662 | gg.zDate = db_text(0, "SELECT datetime(%lld, 'unixepoch')", secSince1970); |
| 663 | gg.zDate[10] = 'T'; |
| 664 | }else |
| 665 | if( strncmp(zLine, "from ", 5)==0 ){ |
| 666 | trim_newline(&zLine[5]); |
| 667 | fossil_free(gg.zFromMark); |
| @@ -1349,11 +1349,12 @@ | |
| 1349 | db_prepare(&addRev, |
| 1350 | "INSERT OR IGNORE INTO xrevisions (trev, tbranch) VALUES(:rev, :branch)" |
| 1351 | ); |
| 1352 | db_prepare(&cpyPath, |
| 1353 | "INSERT INTO xfiles (tpath, tbranch, tuuid, tperm)" |
| 1354 | " SELECT :path||:sep||substr(filename, length(:srcpath)+2), :branch, uuid, perm" |
| 1355 | " FROM xfoci" |
| 1356 | " WHERE checkinID=:rid" |
| 1357 | " AND filename>:srcpath||'/'" |
| 1358 | " AND filename<:srcpath||'0'" |
| 1359 | ); |
| 1360 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -571,11 +571,11 @@ | |
| 571 | ** |
| 572 | ** None of the above is explained in the git-fast-export |
| 573 | ** documentation. We had to figure it out via trial and error. |
| 574 | */ |
| 575 | for(i=5; i<strlen(zRefName) && zRefName[i]!='/'; i++){} |
| 576 | gg.tagCommit = strncmp(&zRefName[5], "tags", 4)==0; /* pattern B */ |
| 577 | if( zRefName[i+1]!=0 ) zRefName += i+1; |
| 578 | if( fossil_strcmp(zRefName, "master")==0 ) zRefName = ggit.zMasterName; |
| 579 | gg.zBranch = fossil_strdup(zRefName); |
| 580 | gg.fromLoaded = 0; |
| 581 | }else |
| @@ -657,11 +657,11 @@ | |
| 657 | secSince1970 = 0; |
| 658 | for(zTo++; fossil_isdigit(*zTo); zTo++){ |
| 659 | secSince1970 = secSince1970*10 + *zTo - '0'; |
| 660 | } |
| 661 | fossil_free(gg.zDate); |
| 662 | gg.zDate = db_text(0, "SELECT datetime(%lld, 'unixepoch')",secSince1970); |
| 663 | gg.zDate[10] = 'T'; |
| 664 | }else |
| 665 | if( strncmp(zLine, "from ", 5)==0 ){ |
| 666 | trim_newline(&zLine[5]); |
| 667 | fossil_free(gg.zFromMark); |
| @@ -1349,11 +1349,12 @@ | |
| 1349 | db_prepare(&addRev, |
| 1350 | "INSERT OR IGNORE INTO xrevisions (trev, tbranch) VALUES(:rev, :branch)" |
| 1351 | ); |
| 1352 | db_prepare(&cpyPath, |
| 1353 | "INSERT INTO xfiles (tpath, tbranch, tuuid, tperm)" |
| 1354 | " SELECT :path||:sep||substr(filename," |
| 1355 | " length(:srcpath)+2), :branch, uuid, perm" |
| 1356 | " FROM xfoci" |
| 1357 | " WHERE checkinID=:rid" |
| 1358 | " AND filename>:srcpath||'/'" |
| 1359 | " AND filename<:srcpath||'0'" |
| 1360 | ); |
| 1361 |