Fossil SCM
Record files added by merge using mlink.pid=-1. Improve the web interface to better indicate files added by merge.
Commit
8e44cf6f4df4f9f004a55071445851ee4e25c7c1
Parent
acd670f2519599a…
6 files changed
+1
-1
+3
-3
+12
-10
+11
-8
+1
-1
+11
-5
+1
-1
| --- src/finfo.c | ||
| +++ src/finfo.c | ||
| @@ -509,11 +509,11 @@ | ||
| 509 | 509 | @ %z(href("%R/annotate?filename=%h&checkin=%s",z,zCkin)) |
| 510 | 510 | @ [annotate]</a> |
| 511 | 511 | @ %z(href("%R/blame?filename=%h&checkin=%s",z,zCkin)) |
| 512 | 512 | @ [blame]</a> |
| 513 | 513 | @ %z(href("%R/timeline?n=200&uf=%!S",zUuid))[check-ins using]</a> |
| 514 | - if( fpid ){ | |
| 514 | + if( fpid>0 ){ | |
| 515 | 515 | @ %z(href("%R/fdiff?sbs=1&v1=%!S&v2=%!S",zPUuid,zUuid))[diff]</a> |
| 516 | 516 | } |
| 517 | 517 | } |
| 518 | 518 | if( fDebug & FINFO_DEBUG_MLINK ){ |
| 519 | 519 | int ii; |
| 520 | 520 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -509,11 +509,11 @@ | |
| 509 | @ %z(href("%R/annotate?filename=%h&checkin=%s",z,zCkin)) |
| 510 | @ [annotate]</a> |
| 511 | @ %z(href("%R/blame?filename=%h&checkin=%s",z,zCkin)) |
| 512 | @ [blame]</a> |
| 513 | @ %z(href("%R/timeline?n=200&uf=%!S",zUuid))[check-ins using]</a> |
| 514 | if( fpid ){ |
| 515 | @ %z(href("%R/fdiff?sbs=1&v1=%!S&v2=%!S",zPUuid,zUuid))[diff]</a> |
| 516 | } |
| 517 | } |
| 518 | if( fDebug & FINFO_DEBUG_MLINK ){ |
| 519 | int ii; |
| 520 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -509,11 +509,11 @@ | |
| 509 | @ %z(href("%R/annotate?filename=%h&checkin=%s",z,zCkin)) |
| 510 | @ [annotate]</a> |
| 511 | @ %z(href("%R/blame?filename=%h&checkin=%s",z,zCkin)) |
| 512 | @ [blame]</a> |
| 513 | @ %z(href("%R/timeline?n=200&uf=%!S",zUuid))[check-ins using]</a> |
| 514 | if( fpid>0 ){ |
| 515 | @ %z(href("%R/fdiff?sbs=1&v1=%!S&v2=%!S",zPUuid,zUuid))[diff]</a> |
| 516 | } |
| 517 | } |
| 518 | if( fDebug & FINFO_DEBUG_MLINK ){ |
| 519 | int ii; |
| 520 |
+3
-3
| --- src/manifest.c | ||
| +++ src/manifest.c | ||
| @@ -1344,10 +1344,11 @@ | ||
| 1344 | 1344 | ** A single mlink entry is added for every file that changed content, |
| 1345 | 1345 | ** name, and/or permissions going from pid to cid. |
| 1346 | 1346 | ** |
| 1347 | 1347 | ** Deleted files have mlink.fid=0. |
| 1348 | 1348 | ** Added files have mlink.pid=0. |
| 1349 | +** File added by merge have mlink.pid=-1 | |
| 1349 | 1350 | ** Edited files have both mlink.pid!=0 and mlink.fid!=0 |
| 1350 | 1351 | */ |
| 1351 | 1352 | static void add_mlink( |
| 1352 | 1353 | int pmid, Manifest *pParent, /* Parent check-in */ |
| 1353 | 1354 | int mid, Manifest *pChild, /* The child check-in */ |
| @@ -1801,14 +1802,13 @@ | ||
| 1801 | 1802 | pid, rid, i==0, p->rDate, zBaseId/*safe-for-%s*/); |
| 1802 | 1803 | add_mlink(pid, 0, rid, p, i==0); |
| 1803 | 1804 | if( i==0 ) parentid = pid; |
| 1804 | 1805 | } |
| 1805 | 1806 | if( p->nParent>1 ){ |
| 1806 | - /* Remove incorrect MLINK create-file entries that arise when a | |
| 1807 | - ** file is added by merge. */ | |
| 1807 | + /* Change MLINK.PID from 0 to -1 for files that are added by merge. */ | |
| 1808 | 1808 | db_multi_exec( |
| 1809 | - "DELETE FROM mlink" | |
| 1809 | + "UPDATE mlink SET pid=-1" | |
| 1810 | 1810 | " WHERE mid=%d" |
| 1811 | 1811 | " AND pid=0" |
| 1812 | 1812 | " AND fnid IN " |
| 1813 | 1813 | " (SELECT fnid FROM mlink WHERE mid=%d GROUP BY fnid" |
| 1814 | 1814 | " HAVING count(*)<%d)", |
| 1815 | 1815 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -1344,10 +1344,11 @@ | |
| 1344 | ** A single mlink entry is added for every file that changed content, |
| 1345 | ** name, and/or permissions going from pid to cid. |
| 1346 | ** |
| 1347 | ** Deleted files have mlink.fid=0. |
| 1348 | ** Added files have mlink.pid=0. |
| 1349 | ** Edited files have both mlink.pid!=0 and mlink.fid!=0 |
| 1350 | */ |
| 1351 | static void add_mlink( |
| 1352 | int pmid, Manifest *pParent, /* Parent check-in */ |
| 1353 | int mid, Manifest *pChild, /* The child check-in */ |
| @@ -1801,14 +1802,13 @@ | |
| 1801 | pid, rid, i==0, p->rDate, zBaseId/*safe-for-%s*/); |
| 1802 | add_mlink(pid, 0, rid, p, i==0); |
| 1803 | if( i==0 ) parentid = pid; |
| 1804 | } |
| 1805 | if( p->nParent>1 ){ |
| 1806 | /* Remove incorrect MLINK create-file entries that arise when a |
| 1807 | ** file is added by merge. */ |
| 1808 | db_multi_exec( |
| 1809 | "DELETE FROM mlink" |
| 1810 | " WHERE mid=%d" |
| 1811 | " AND pid=0" |
| 1812 | " AND fnid IN " |
| 1813 | " (SELECT fnid FROM mlink WHERE mid=%d GROUP BY fnid" |
| 1814 | " HAVING count(*)<%d)", |
| 1815 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -1344,10 +1344,11 @@ | |
| 1344 | ** A single mlink entry is added for every file that changed content, |
| 1345 | ** name, and/or permissions going from pid to cid. |
| 1346 | ** |
| 1347 | ** Deleted files have mlink.fid=0. |
| 1348 | ** Added files have mlink.pid=0. |
| 1349 | ** File added by merge have mlink.pid=-1 |
| 1350 | ** Edited files have both mlink.pid!=0 and mlink.fid!=0 |
| 1351 | */ |
| 1352 | static void add_mlink( |
| 1353 | int pmid, Manifest *pParent, /* Parent check-in */ |
| 1354 | int mid, Manifest *pChild, /* The child check-in */ |
| @@ -1801,14 +1802,13 @@ | |
| 1802 | pid, rid, i==0, p->rDate, zBaseId/*safe-for-%s*/); |
| 1803 | add_mlink(pid, 0, rid, p, i==0); |
| 1804 | if( i==0 ) parentid = pid; |
| 1805 | } |
| 1806 | if( p->nParent>1 ){ |
| 1807 | /* Change MLINK.PID from 0 to -1 for files that are added by merge. */ |
| 1808 | db_multi_exec( |
| 1809 | "UPDATE mlink SET pid=-1" |
| 1810 | " WHERE mid=%d" |
| 1811 | " AND pid=0" |
| 1812 | " AND fnid IN " |
| 1813 | " (SELECT fnid FROM mlink WHERE mid=%d GROUP BY fnid" |
| 1814 | " HAVING count(*)<%d)", |
| 1815 |
+12
-10
| --- src/schema.c | ||
| +++ src/schema.c | ||
| @@ -249,22 +249,24 @@ | ||
| 249 | 249 | @ -- pid = Parent file ID. |
| 250 | 250 | @ -- fnid = File Name ID. |
| 251 | 251 | @ -- pfnid = Parent File Name ID. |
| 252 | 252 | @ -- isaux = pmid IS AUXiliary parent, not primary parent |
| 253 | 253 | @ -- |
| 254 | -@ -- pid==0 if the file is added by check-in mid. | |
| 255 | -@ -- fid==0 if the file is removed by check-in mid. | |
| 254 | +@ -- pid==0 if the file is added by check-in mid. | |
| 255 | +@ -- pid==(-1) if the file exists in a merge parents but not in the primary | |
| 256 | +@ -- parent. In other words, if the file file was added by merge. | |
| 257 | +@ -- fid==0 if the file is removed by check-in mid. | |
| 256 | 258 | @ -- |
| 257 | 259 | @ CREATE TABLE mlink( |
| 258 | -@ mid INTEGER REFERENCES plink(cid), -- Check-in that contains fid | |
| 259 | -@ fid INTEGER REFERENCES blob, -- New file content. 0 if deleted | |
| 260 | -@ pmid INTEGER REFERENCES plink(cid), -- Check-in that contains pid | |
| 261 | -@ pid INTEGER REFERENCES blob, -- Prev file content. 0 if new | |
| 262 | -@ fnid INTEGER REFERENCES filename, -- Name of the file | |
| 263 | -@ pfnid INTEGER REFERENCES filename, -- Previous name. 0 if unchanged | |
| 264 | -@ mperm INTEGER, -- File permissions. 1==exec | |
| 265 | -@ isaux BOOLEAN DEFAULT 0 -- TRUE if pmid is the primary | |
| 260 | +@ mid INTEGER, -- Check-in that contains fid | |
| 261 | +@ fid INTEGER, -- New file content. 0 if deleted | |
| 262 | +@ pmid INTEGER, -- Check-in that contains pid | |
| 263 | +@ pid INTEGER, -- Prev file content. 0 if new. -1 merge | |
| 264 | +@ fnid INTEGER REFERENCES filename, -- Name of the file | |
| 265 | +@ pfnid INTEGER REFERENCES filename, -- Previous name. 0 if unchanged | |
| 266 | +@ mperm INTEGER, -- File permissions. 1==exec | |
| 267 | +@ isaux BOOLEAN DEFAULT 0 -- TRUE if pmid is the primary | |
| 266 | 268 | @ ); |
| 267 | 269 | @ CREATE INDEX mlink_i1 ON mlink(mid); |
| 268 | 270 | @ CREATE INDEX mlink_i2 ON mlink(fnid); |
| 269 | 271 | @ CREATE INDEX mlink_i3 ON mlink(fid); |
| 270 | 272 | @ CREATE INDEX mlink_i4 ON mlink(pid); |
| 271 | 273 |
| --- src/schema.c | |
| +++ src/schema.c | |
| @@ -249,22 +249,24 @@ | |
| 249 | @ -- pid = Parent file ID. |
| 250 | @ -- fnid = File Name ID. |
| 251 | @ -- pfnid = Parent File Name ID. |
| 252 | @ -- isaux = pmid IS AUXiliary parent, not primary parent |
| 253 | @ -- |
| 254 | @ -- pid==0 if the file is added by check-in mid. |
| 255 | @ -- fid==0 if the file is removed by check-in mid. |
| 256 | @ -- |
| 257 | @ CREATE TABLE mlink( |
| 258 | @ mid INTEGER REFERENCES plink(cid), -- Check-in that contains fid |
| 259 | @ fid INTEGER REFERENCES blob, -- New file content. 0 if deleted |
| 260 | @ pmid INTEGER REFERENCES plink(cid), -- Check-in that contains pid |
| 261 | @ pid INTEGER REFERENCES blob, -- Prev file content. 0 if new |
| 262 | @ fnid INTEGER REFERENCES filename, -- Name of the file |
| 263 | @ pfnid INTEGER REFERENCES filename, -- Previous name. 0 if unchanged |
| 264 | @ mperm INTEGER, -- File permissions. 1==exec |
| 265 | @ isaux BOOLEAN DEFAULT 0 -- TRUE if pmid is the primary |
| 266 | @ ); |
| 267 | @ CREATE INDEX mlink_i1 ON mlink(mid); |
| 268 | @ CREATE INDEX mlink_i2 ON mlink(fnid); |
| 269 | @ CREATE INDEX mlink_i3 ON mlink(fid); |
| 270 | @ CREATE INDEX mlink_i4 ON mlink(pid); |
| 271 |
| --- src/schema.c | |
| +++ src/schema.c | |
| @@ -249,22 +249,24 @@ | |
| 249 | @ -- pid = Parent file ID. |
| 250 | @ -- fnid = File Name ID. |
| 251 | @ -- pfnid = Parent File Name ID. |
| 252 | @ -- isaux = pmid IS AUXiliary parent, not primary parent |
| 253 | @ -- |
| 254 | @ -- pid==0 if the file is added by check-in mid. |
| 255 | @ -- pid==(-1) if the file exists in a merge parents but not in the primary |
| 256 | @ -- parent. In other words, if the file file was added by merge. |
| 257 | @ -- fid==0 if the file is removed by check-in mid. |
| 258 | @ -- |
| 259 | @ CREATE TABLE mlink( |
| 260 | @ mid INTEGER, -- Check-in that contains fid |
| 261 | @ fid INTEGER, -- New file content. 0 if deleted |
| 262 | @ pmid INTEGER, -- Check-in that contains pid |
| 263 | @ pid INTEGER, -- Prev file content. 0 if new. -1 merge |
| 264 | @ fnid INTEGER REFERENCES filename, -- Name of the file |
| 265 | @ pfnid INTEGER REFERENCES filename, -- Previous name. 0 if unchanged |
| 266 | @ mperm INTEGER, -- File permissions. 1==exec |
| 267 | @ isaux BOOLEAN DEFAULT 0 -- TRUE if pmid is the primary |
| 268 | @ ); |
| 269 | @ CREATE INDEX mlink_i1 ON mlink(mid); |
| 270 | @ CREATE INDEX mlink_i2 ON mlink(fnid); |
| 271 | @ CREATE INDEX mlink_i3 ON mlink(fid); |
| 272 | @ CREATE INDEX mlink_i4 ON mlink(pid); |
| 273 |
+11
-8
| --- src/sqlite3.c | ||
| +++ src/sqlite3.c | ||
| @@ -318,11 +318,11 @@ | ||
| 318 | 318 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 319 | 319 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 320 | 320 | */ |
| 321 | 321 | #define SQLITE_VERSION "3.8.10" |
| 322 | 322 | #define SQLITE_VERSION_NUMBER 3008010 |
| 323 | -#define SQLITE_SOURCE_ID "2015-05-04 19:13:25 850c11866686a7b39d7b163fb60898c11283688e" | |
| 323 | +#define SQLITE_SOURCE_ID "2015-05-05 18:52:54 04afa3febee32854fbb09ef8d4ffffd432119716" | |
| 324 | 324 | |
| 325 | 325 | /* |
| 326 | 326 | ** CAPI3REF: Run-Time Library Version Numbers |
| 327 | 327 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 328 | 328 | ** |
| @@ -21590,11 +21590,10 @@ | ||
| 21590 | 21590 | case '0': flag_zeropad = 1; break; |
| 21591 | 21591 | default: done = 1; break; |
| 21592 | 21592 | } |
| 21593 | 21593 | }while( !done && (c=(*++fmt))!=0 ); |
| 21594 | 21594 | /* Get the field width */ |
| 21595 | - width = 0; | |
| 21596 | 21595 | if( c=='*' ){ |
| 21597 | 21596 | if( bArgList ){ |
| 21598 | 21597 | width = (int)getIntArg(pArgList); |
| 21599 | 21598 | }else{ |
| 21600 | 21599 | width = va_arg(ap,int); |
| @@ -21614,11 +21613,10 @@ | ||
| 21614 | 21613 | width = wx & 0x7fffffff; |
| 21615 | 21614 | } |
| 21616 | 21615 | |
| 21617 | 21616 | /* Get the precision */ |
| 21618 | 21617 | if( c=='.' ){ |
| 21619 | - precision = 0; | |
| 21620 | 21618 | c = *++fmt; |
| 21621 | 21619 | if( c=='*' ){ |
| 21622 | 21620 | if( bArgList ){ |
| 21623 | 21621 | precision = (int)getIntArg(pArgList); |
| 21624 | 21622 | }else{ |
| @@ -55477,11 +55475,11 @@ | ||
| 55477 | 55475 | } |
| 55478 | 55476 | assert( nReserve>=0 && nReserve<=255 ); |
| 55479 | 55477 | if( pageSize>=512 && pageSize<=SQLITE_MAX_PAGE_SIZE && |
| 55480 | 55478 | ((pageSize-1)&pageSize)==0 ){ |
| 55481 | 55479 | assert( (pageSize & 7)==0 ); |
| 55482 | - assert( !pBt->pPage1 && !pBt->pCursor ); | |
| 55480 | + assert( !pBt->pCursor ); | |
| 55483 | 55481 | pBt->pageSize = (u32)pageSize; |
| 55484 | 55482 | freeTempSpace(pBt); |
| 55485 | 55483 | } |
| 55486 | 55484 | rc = sqlite3PagerSetPagesize(pBt->pPager, &pBt->pageSize, nReserve); |
| 55487 | 55485 | pBt->usableSize = pBt->pageSize - (u16)nReserve; |
| @@ -71814,11 +71812,10 @@ | ||
| 71814 | 71812 | }else{ |
| 71815 | 71813 | assert( rc==SQLITE_OK || (p->rc&0xff)==SQLITE_CONSTRAINT ); |
| 71816 | 71814 | assert( rc==SQLITE_OK || db->nDeferredCons>0 || db->nDeferredImmCons>0 ); |
| 71817 | 71815 | rc = p->rc ? SQLITE_ERROR : SQLITE_DONE; |
| 71818 | 71816 | } |
| 71819 | - pOp = &aOp[pcx]; | |
| 71820 | 71817 | goto vdbe_return; |
| 71821 | 71818 | } |
| 71822 | 71819 | |
| 71823 | 71820 | /* Opcode: Integer P1 P2 * * * |
| 71824 | 71821 | ** Synopsis: r[P2]=P1 |
| @@ -76742,11 +76739,10 @@ | ||
| 76742 | 76739 | if( rc ){ |
| 76743 | 76740 | eNew = eOld; |
| 76744 | 76741 | } |
| 76745 | 76742 | eNew = sqlite3PagerSetJournalMode(pPager, eNew); |
| 76746 | 76743 | |
| 76747 | - pOut = &aMem[pOp->p2]; | |
| 76748 | 76744 | pOut->flags = MEM_Str|MEM_Static|MEM_Term; |
| 76749 | 76745 | pOut->z = (char *)sqlite3JournalModename(eNew); |
| 76750 | 76746 | pOut->n = sqlite3Strlen30(pOut->z); |
| 76751 | 76747 | pOut->enc = SQLITE_UTF8; |
| 76752 | 76748 | sqlite3VdbeChangeEncoding(pOut, encoding); |
| @@ -84054,11 +84050,11 @@ | ||
| 84054 | 84050 | int i; |
| 84055 | 84051 | u32 m = 0; |
| 84056 | 84052 | if( pList ){ |
| 84057 | 84053 | for(i=0; i<pList->nExpr; i++){ |
| 84058 | 84054 | Expr *pExpr = pList->a[i].pExpr; |
| 84059 | - if( ALWAYS(pExpr) ) m |= pList->a[i].pExpr->flags; | |
| 84055 | + if( ALWAYS(pExpr) ) m |= pExpr->flags; | |
| 84060 | 84056 | } |
| 84061 | 84057 | } |
| 84062 | 84058 | return m; |
| 84063 | 84059 | } |
| 84064 | 84060 | |
| @@ -130865,10 +130861,17 @@ | ||
| 130865 | 130861 | #ifdef SQLITE_ENABLE_RTREE |
| 130866 | 130862 | if( !db->mallocFailed && rc==SQLITE_OK){ |
| 130867 | 130863 | rc = sqlite3RtreeInit(db); |
| 130868 | 130864 | } |
| 130869 | 130865 | #endif |
| 130866 | + | |
| 130867 | +#ifdef SQLITE_ENABLE_DBSTAT_VTAB | |
| 130868 | + if( !db->mallocFailed && rc==SQLITE_OK){ | |
| 130869 | + int sqlite3_dbstat_register(sqlite3*); | |
| 130870 | + rc = sqlite3_dbstat_register(db); | |
| 130871 | + } | |
| 130872 | +#endif | |
| 130870 | 130873 | |
| 130871 | 130874 | /* -DSQLITE_DEFAULT_LOCKING_MODE=1 makes EXCLUSIVE the default locking |
| 130872 | 130875 | ** mode. -DSQLITE_DEFAULT_LOCKING_MODE=0 make NORMAL the default locking |
| 130873 | 130876 | ** mode. Doing nothing at all also makes NORMAL the default. |
| 130874 | 130877 | */ |
| @@ -155227,11 +155230,11 @@ | ||
| 155227 | 155230 | ** "sqlite3_analyzer" utility. See the ../tool/spaceanal.tcl script |
| 155228 | 155231 | ** for an example implementation. |
| 155229 | 155232 | */ |
| 155230 | 155233 | |
| 155231 | 155234 | #if (defined(SQLITE_ENABLE_DBSTAT_VTAB) || defined(SQLITE_TEST)) \ |
| 155232 | - && !defined(SQLITE_OMIT_VIRTUAL_TABLE) | |
| 155235 | + && !defined(SQLITE_OMIT_VIRTUALTABLE) | |
| 155233 | 155236 | |
| 155234 | 155237 | /* |
| 155235 | 155238 | ** Page paths: |
| 155236 | 155239 | ** |
| 155237 | 155240 | ** The value of the 'path' column describes the path taken from the |
| 155238 | 155241 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -318,11 +318,11 @@ | |
| 318 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 319 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 320 | */ |
| 321 | #define SQLITE_VERSION "3.8.10" |
| 322 | #define SQLITE_VERSION_NUMBER 3008010 |
| 323 | #define SQLITE_SOURCE_ID "2015-05-04 19:13:25 850c11866686a7b39d7b163fb60898c11283688e" |
| 324 | |
| 325 | /* |
| 326 | ** CAPI3REF: Run-Time Library Version Numbers |
| 327 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 328 | ** |
| @@ -21590,11 +21590,10 @@ | |
| 21590 | case '0': flag_zeropad = 1; break; |
| 21591 | default: done = 1; break; |
| 21592 | } |
| 21593 | }while( !done && (c=(*++fmt))!=0 ); |
| 21594 | /* Get the field width */ |
| 21595 | width = 0; |
| 21596 | if( c=='*' ){ |
| 21597 | if( bArgList ){ |
| 21598 | width = (int)getIntArg(pArgList); |
| 21599 | }else{ |
| 21600 | width = va_arg(ap,int); |
| @@ -21614,11 +21613,10 @@ | |
| 21614 | width = wx & 0x7fffffff; |
| 21615 | } |
| 21616 | |
| 21617 | /* Get the precision */ |
| 21618 | if( c=='.' ){ |
| 21619 | precision = 0; |
| 21620 | c = *++fmt; |
| 21621 | if( c=='*' ){ |
| 21622 | if( bArgList ){ |
| 21623 | precision = (int)getIntArg(pArgList); |
| 21624 | }else{ |
| @@ -55477,11 +55475,11 @@ | |
| 55477 | } |
| 55478 | assert( nReserve>=0 && nReserve<=255 ); |
| 55479 | if( pageSize>=512 && pageSize<=SQLITE_MAX_PAGE_SIZE && |
| 55480 | ((pageSize-1)&pageSize)==0 ){ |
| 55481 | assert( (pageSize & 7)==0 ); |
| 55482 | assert( !pBt->pPage1 && !pBt->pCursor ); |
| 55483 | pBt->pageSize = (u32)pageSize; |
| 55484 | freeTempSpace(pBt); |
| 55485 | } |
| 55486 | rc = sqlite3PagerSetPagesize(pBt->pPager, &pBt->pageSize, nReserve); |
| 55487 | pBt->usableSize = pBt->pageSize - (u16)nReserve; |
| @@ -71814,11 +71812,10 @@ | |
| 71814 | }else{ |
| 71815 | assert( rc==SQLITE_OK || (p->rc&0xff)==SQLITE_CONSTRAINT ); |
| 71816 | assert( rc==SQLITE_OK || db->nDeferredCons>0 || db->nDeferredImmCons>0 ); |
| 71817 | rc = p->rc ? SQLITE_ERROR : SQLITE_DONE; |
| 71818 | } |
| 71819 | pOp = &aOp[pcx]; |
| 71820 | goto vdbe_return; |
| 71821 | } |
| 71822 | |
| 71823 | /* Opcode: Integer P1 P2 * * * |
| 71824 | ** Synopsis: r[P2]=P1 |
| @@ -76742,11 +76739,10 @@ | |
| 76742 | if( rc ){ |
| 76743 | eNew = eOld; |
| 76744 | } |
| 76745 | eNew = sqlite3PagerSetJournalMode(pPager, eNew); |
| 76746 | |
| 76747 | pOut = &aMem[pOp->p2]; |
| 76748 | pOut->flags = MEM_Str|MEM_Static|MEM_Term; |
| 76749 | pOut->z = (char *)sqlite3JournalModename(eNew); |
| 76750 | pOut->n = sqlite3Strlen30(pOut->z); |
| 76751 | pOut->enc = SQLITE_UTF8; |
| 76752 | sqlite3VdbeChangeEncoding(pOut, encoding); |
| @@ -84054,11 +84050,11 @@ | |
| 84054 | int i; |
| 84055 | u32 m = 0; |
| 84056 | if( pList ){ |
| 84057 | for(i=0; i<pList->nExpr; i++){ |
| 84058 | Expr *pExpr = pList->a[i].pExpr; |
| 84059 | if( ALWAYS(pExpr) ) m |= pList->a[i].pExpr->flags; |
| 84060 | } |
| 84061 | } |
| 84062 | return m; |
| 84063 | } |
| 84064 | |
| @@ -130865,10 +130861,17 @@ | |
| 130865 | #ifdef SQLITE_ENABLE_RTREE |
| 130866 | if( !db->mallocFailed && rc==SQLITE_OK){ |
| 130867 | rc = sqlite3RtreeInit(db); |
| 130868 | } |
| 130869 | #endif |
| 130870 | |
| 130871 | /* -DSQLITE_DEFAULT_LOCKING_MODE=1 makes EXCLUSIVE the default locking |
| 130872 | ** mode. -DSQLITE_DEFAULT_LOCKING_MODE=0 make NORMAL the default locking |
| 130873 | ** mode. Doing nothing at all also makes NORMAL the default. |
| 130874 | */ |
| @@ -155227,11 +155230,11 @@ | |
| 155227 | ** "sqlite3_analyzer" utility. See the ../tool/spaceanal.tcl script |
| 155228 | ** for an example implementation. |
| 155229 | */ |
| 155230 | |
| 155231 | #if (defined(SQLITE_ENABLE_DBSTAT_VTAB) || defined(SQLITE_TEST)) \ |
| 155232 | && !defined(SQLITE_OMIT_VIRTUAL_TABLE) |
| 155233 | |
| 155234 | /* |
| 155235 | ** Page paths: |
| 155236 | ** |
| 155237 | ** The value of the 'path' column describes the path taken from the |
| 155238 |
| --- src/sqlite3.c | |
| +++ src/sqlite3.c | |
| @@ -318,11 +318,11 @@ | |
| 318 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 319 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 320 | */ |
| 321 | #define SQLITE_VERSION "3.8.10" |
| 322 | #define SQLITE_VERSION_NUMBER 3008010 |
| 323 | #define SQLITE_SOURCE_ID "2015-05-05 18:52:54 04afa3febee32854fbb09ef8d4ffffd432119716" |
| 324 | |
| 325 | /* |
| 326 | ** CAPI3REF: Run-Time Library Version Numbers |
| 327 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 328 | ** |
| @@ -21590,11 +21590,10 @@ | |
| 21590 | case '0': flag_zeropad = 1; break; |
| 21591 | default: done = 1; break; |
| 21592 | } |
| 21593 | }while( !done && (c=(*++fmt))!=0 ); |
| 21594 | /* Get the field width */ |
| 21595 | if( c=='*' ){ |
| 21596 | if( bArgList ){ |
| 21597 | width = (int)getIntArg(pArgList); |
| 21598 | }else{ |
| 21599 | width = va_arg(ap,int); |
| @@ -21614,11 +21613,10 @@ | |
| 21613 | width = wx & 0x7fffffff; |
| 21614 | } |
| 21615 | |
| 21616 | /* Get the precision */ |
| 21617 | if( c=='.' ){ |
| 21618 | c = *++fmt; |
| 21619 | if( c=='*' ){ |
| 21620 | if( bArgList ){ |
| 21621 | precision = (int)getIntArg(pArgList); |
| 21622 | }else{ |
| @@ -55477,11 +55475,11 @@ | |
| 55475 | } |
| 55476 | assert( nReserve>=0 && nReserve<=255 ); |
| 55477 | if( pageSize>=512 && pageSize<=SQLITE_MAX_PAGE_SIZE && |
| 55478 | ((pageSize-1)&pageSize)==0 ){ |
| 55479 | assert( (pageSize & 7)==0 ); |
| 55480 | assert( !pBt->pCursor ); |
| 55481 | pBt->pageSize = (u32)pageSize; |
| 55482 | freeTempSpace(pBt); |
| 55483 | } |
| 55484 | rc = sqlite3PagerSetPagesize(pBt->pPager, &pBt->pageSize, nReserve); |
| 55485 | pBt->usableSize = pBt->pageSize - (u16)nReserve; |
| @@ -71814,11 +71812,10 @@ | |
| 71812 | }else{ |
| 71813 | assert( rc==SQLITE_OK || (p->rc&0xff)==SQLITE_CONSTRAINT ); |
| 71814 | assert( rc==SQLITE_OK || db->nDeferredCons>0 || db->nDeferredImmCons>0 ); |
| 71815 | rc = p->rc ? SQLITE_ERROR : SQLITE_DONE; |
| 71816 | } |
| 71817 | goto vdbe_return; |
| 71818 | } |
| 71819 | |
| 71820 | /* Opcode: Integer P1 P2 * * * |
| 71821 | ** Synopsis: r[P2]=P1 |
| @@ -76742,11 +76739,10 @@ | |
| 76739 | if( rc ){ |
| 76740 | eNew = eOld; |
| 76741 | } |
| 76742 | eNew = sqlite3PagerSetJournalMode(pPager, eNew); |
| 76743 | |
| 76744 | pOut->flags = MEM_Str|MEM_Static|MEM_Term; |
| 76745 | pOut->z = (char *)sqlite3JournalModename(eNew); |
| 76746 | pOut->n = sqlite3Strlen30(pOut->z); |
| 76747 | pOut->enc = SQLITE_UTF8; |
| 76748 | sqlite3VdbeChangeEncoding(pOut, encoding); |
| @@ -84054,11 +84050,11 @@ | |
| 84050 | int i; |
| 84051 | u32 m = 0; |
| 84052 | if( pList ){ |
| 84053 | for(i=0; i<pList->nExpr; i++){ |
| 84054 | Expr *pExpr = pList->a[i].pExpr; |
| 84055 | if( ALWAYS(pExpr) ) m |= pExpr->flags; |
| 84056 | } |
| 84057 | } |
| 84058 | return m; |
| 84059 | } |
| 84060 | |
| @@ -130865,10 +130861,17 @@ | |
| 130861 | #ifdef SQLITE_ENABLE_RTREE |
| 130862 | if( !db->mallocFailed && rc==SQLITE_OK){ |
| 130863 | rc = sqlite3RtreeInit(db); |
| 130864 | } |
| 130865 | #endif |
| 130866 | |
| 130867 | #ifdef SQLITE_ENABLE_DBSTAT_VTAB |
| 130868 | if( !db->mallocFailed && rc==SQLITE_OK){ |
| 130869 | int sqlite3_dbstat_register(sqlite3*); |
| 130870 | rc = sqlite3_dbstat_register(db); |
| 130871 | } |
| 130872 | #endif |
| 130873 | |
| 130874 | /* -DSQLITE_DEFAULT_LOCKING_MODE=1 makes EXCLUSIVE the default locking |
| 130875 | ** mode. -DSQLITE_DEFAULT_LOCKING_MODE=0 make NORMAL the default locking |
| 130876 | ** mode. Doing nothing at all also makes NORMAL the default. |
| 130877 | */ |
| @@ -155227,11 +155230,11 @@ | |
| 155230 | ** "sqlite3_analyzer" utility. See the ../tool/spaceanal.tcl script |
| 155231 | ** for an example implementation. |
| 155232 | */ |
| 155233 | |
| 155234 | #if (defined(SQLITE_ENABLE_DBSTAT_VTAB) || defined(SQLITE_TEST)) \ |
| 155235 | && !defined(SQLITE_OMIT_VIRTUALTABLE) |
| 155236 | |
| 155237 | /* |
| 155238 | ** Page paths: |
| 155239 | ** |
| 155240 | ** The value of the 'path' column describes the path taken from the |
| 155241 |
+1
-1
| --- src/sqlite3.h | ||
| +++ src/sqlite3.h | ||
| @@ -111,11 +111,11 @@ | ||
| 111 | 111 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 112 | 112 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 113 | 113 | */ |
| 114 | 114 | #define SQLITE_VERSION "3.8.10" |
| 115 | 115 | #define SQLITE_VERSION_NUMBER 3008010 |
| 116 | -#define SQLITE_SOURCE_ID "2015-05-04 19:13:25 850c11866686a7b39d7b163fb60898c11283688e" | |
| 116 | +#define SQLITE_SOURCE_ID "2015-05-05 18:52:54 04afa3febee32854fbb09ef8d4ffffd432119716" | |
| 117 | 117 | |
| 118 | 118 | /* |
| 119 | 119 | ** CAPI3REF: Run-Time Library Version Numbers |
| 120 | 120 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 121 | 121 | ** |
| 122 | 122 |
| --- src/sqlite3.h | |
| +++ src/sqlite3.h | |
| @@ -111,11 +111,11 @@ | |
| 111 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 112 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 113 | */ |
| 114 | #define SQLITE_VERSION "3.8.10" |
| 115 | #define SQLITE_VERSION_NUMBER 3008010 |
| 116 | #define SQLITE_SOURCE_ID "2015-05-04 19:13:25 850c11866686a7b39d7b163fb60898c11283688e" |
| 117 | |
| 118 | /* |
| 119 | ** CAPI3REF: Run-Time Library Version Numbers |
| 120 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 121 | ** |
| 122 |
| --- src/sqlite3.h | |
| +++ src/sqlite3.h | |
| @@ -111,11 +111,11 @@ | |
| 111 | ** [sqlite3_libversion_number()], [sqlite3_sourceid()], |
| 112 | ** [sqlite_version()] and [sqlite_source_id()]. |
| 113 | */ |
| 114 | #define SQLITE_VERSION "3.8.10" |
| 115 | #define SQLITE_VERSION_NUMBER 3008010 |
| 116 | #define SQLITE_SOURCE_ID "2015-05-05 18:52:54 04afa3febee32854fbb09ef8d4ffffd432119716" |
| 117 | |
| 118 | /* |
| 119 | ** CAPI3REF: Run-Time Library Version Numbers |
| 120 | ** KEYWORDS: sqlite3_version, sqlite3_sourceid |
| 121 | ** |
| 122 |
+11
-5
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -499,11 +499,11 @@ | ||
| 499 | 499 | && zType[0]=='c' && g.perm.Hyperlink |
| 500 | 500 | ){ |
| 501 | 501 | int inUl = 0; |
| 502 | 502 | if( !fchngQueryInit ){ |
| 503 | 503 | db_prepare(&fchngQuery, |
| 504 | - "SELECT (pid==0) AS isnew," | |
| 504 | + "SELECT pid," | |
| 505 | 505 | " fid," |
| 506 | 506 | " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name," |
| 507 | 507 | " (SELECT uuid FROM blob WHERE rid=fid)," |
| 508 | 508 | " (SELECT uuid FROM blob WHERE rid=pid)," |
| 509 | 509 | " (SELECT name FROM filename WHERE fnid=mlink.pfnid) AS oldnm" |
| @@ -517,11 +517,12 @@ | ||
| 517 | 517 | fchngQueryInit = 1; |
| 518 | 518 | } |
| 519 | 519 | db_bind_int(&fchngQuery, ":mid", rid); |
| 520 | 520 | while( db_step(&fchngQuery)==SQLITE_ROW ){ |
| 521 | 521 | const char *zFilename = db_column_text(&fchngQuery, 2); |
| 522 | - int isNew = db_column_int(&fchngQuery, 0); | |
| 522 | + int isNew = db_column_int(&fchngQuery, 0)<=0; | |
| 523 | + int isMergeNew = db_column_int(&fchngQuery, 0)<0; | |
| 523 | 524 | int fid = db_column_int(&fchngQuery, 1); |
| 524 | 525 | int isDel = fid==0; |
| 525 | 526 | const char *zOldName = db_column_text(&fchngQuery, 5); |
| 526 | 527 | const char *zOld = db_column_text(&fchngQuery, 4); |
| 527 | 528 | const char *zNew = db_column_text(&fchngQuery, 3); |
| @@ -546,12 +547,17 @@ | ||
| 546 | 547 | zA = href("%R/artifact/%!S",fid?zNew:zOld); |
| 547 | 548 | if( content_is_private(fid) ){ |
| 548 | 549 | zUnpub = UNPUB_TAG; |
| 549 | 550 | } |
| 550 | 551 | if( isNew ){ |
| 551 | - @ <li> %s(zA)%h(zFilename)</a>%s(zId) %s(zUnpub) (new file) | |
| 552 | - @ %z(href("%R/artifact/%!S",zNew))[view]</a></li> | |
| 552 | + @ <li> %s(zA)%h(zFilename)</a>%s(zId) %s(zUnpub) | |
| 553 | + if( isMergeNew ){ | |
| 554 | + @ (added by merge) | |
| 555 | + }else{ | |
| 556 | + @ (new file) | |
| 557 | + } | |
| 558 | + @ %z(href("%R/artifact/%!S",zNew))[view]</a></li> | |
| 553 | 559 | }else if( isDel ){ |
| 554 | 560 | @ <li> %s(zA)%h(zFilename)</a> (deleted)</li> |
| 555 | 561 | }else if( fossil_strcmp(zOld,zNew)==0 && zOldName!=0 ){ |
| 556 | 562 | @ <li> %h(zOldName) → %s(zA)%h(zFilename)</a>%s(zId) |
| 557 | 563 | @ %s(zUnpub) %z(href("%R/artifact/%!S",zNew))[view]</a></li> |
| @@ -1873,11 +1879,11 @@ | ||
| 1873 | 1879 | fossil_free(zFree); |
| 1874 | 1880 | |
| 1875 | 1881 | if(verboseFlag){ |
| 1876 | 1882 | if( !fchngQueryInit ){ |
| 1877 | 1883 | db_prepare(&fchngQuery, |
| 1878 | - "SELECT (pid==0) AS isnew," | |
| 1884 | + "SELECT (pid<=0) AS isnew," | |
| 1879 | 1885 | " (fid==0) AS isdel," |
| 1880 | 1886 | " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name," |
| 1881 | 1887 | " (SELECT uuid FROM blob WHERE rid=fid)," |
| 1882 | 1888 | " (SELECT uuid FROM blob WHERE rid=pid)" |
| 1883 | 1889 | " FROM mlink" |
| 1884 | 1890 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -499,11 +499,11 @@ | |
| 499 | && zType[0]=='c' && g.perm.Hyperlink |
| 500 | ){ |
| 501 | int inUl = 0; |
| 502 | if( !fchngQueryInit ){ |
| 503 | db_prepare(&fchngQuery, |
| 504 | "SELECT (pid==0) AS isnew," |
| 505 | " fid," |
| 506 | " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name," |
| 507 | " (SELECT uuid FROM blob WHERE rid=fid)," |
| 508 | " (SELECT uuid FROM blob WHERE rid=pid)," |
| 509 | " (SELECT name FROM filename WHERE fnid=mlink.pfnid) AS oldnm" |
| @@ -517,11 +517,12 @@ | |
| 517 | fchngQueryInit = 1; |
| 518 | } |
| 519 | db_bind_int(&fchngQuery, ":mid", rid); |
| 520 | while( db_step(&fchngQuery)==SQLITE_ROW ){ |
| 521 | const char *zFilename = db_column_text(&fchngQuery, 2); |
| 522 | int isNew = db_column_int(&fchngQuery, 0); |
| 523 | int fid = db_column_int(&fchngQuery, 1); |
| 524 | int isDel = fid==0; |
| 525 | const char *zOldName = db_column_text(&fchngQuery, 5); |
| 526 | const char *zOld = db_column_text(&fchngQuery, 4); |
| 527 | const char *zNew = db_column_text(&fchngQuery, 3); |
| @@ -546,12 +547,17 @@ | |
| 546 | zA = href("%R/artifact/%!S",fid?zNew:zOld); |
| 547 | if( content_is_private(fid) ){ |
| 548 | zUnpub = UNPUB_TAG; |
| 549 | } |
| 550 | if( isNew ){ |
| 551 | @ <li> %s(zA)%h(zFilename)</a>%s(zId) %s(zUnpub) (new file) |
| 552 | @ %z(href("%R/artifact/%!S",zNew))[view]</a></li> |
| 553 | }else if( isDel ){ |
| 554 | @ <li> %s(zA)%h(zFilename)</a> (deleted)</li> |
| 555 | }else if( fossil_strcmp(zOld,zNew)==0 && zOldName!=0 ){ |
| 556 | @ <li> %h(zOldName) → %s(zA)%h(zFilename)</a>%s(zId) |
| 557 | @ %s(zUnpub) %z(href("%R/artifact/%!S",zNew))[view]</a></li> |
| @@ -1873,11 +1879,11 @@ | |
| 1873 | fossil_free(zFree); |
| 1874 | |
| 1875 | if(verboseFlag){ |
| 1876 | if( !fchngQueryInit ){ |
| 1877 | db_prepare(&fchngQuery, |
| 1878 | "SELECT (pid==0) AS isnew," |
| 1879 | " (fid==0) AS isdel," |
| 1880 | " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name," |
| 1881 | " (SELECT uuid FROM blob WHERE rid=fid)," |
| 1882 | " (SELECT uuid FROM blob WHERE rid=pid)" |
| 1883 | " FROM mlink" |
| 1884 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -499,11 +499,11 @@ | |
| 499 | && zType[0]=='c' && g.perm.Hyperlink |
| 500 | ){ |
| 501 | int inUl = 0; |
| 502 | if( !fchngQueryInit ){ |
| 503 | db_prepare(&fchngQuery, |
| 504 | "SELECT pid," |
| 505 | " fid," |
| 506 | " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name," |
| 507 | " (SELECT uuid FROM blob WHERE rid=fid)," |
| 508 | " (SELECT uuid FROM blob WHERE rid=pid)," |
| 509 | " (SELECT name FROM filename WHERE fnid=mlink.pfnid) AS oldnm" |
| @@ -517,11 +517,12 @@ | |
| 517 | fchngQueryInit = 1; |
| 518 | } |
| 519 | db_bind_int(&fchngQuery, ":mid", rid); |
| 520 | while( db_step(&fchngQuery)==SQLITE_ROW ){ |
| 521 | const char *zFilename = db_column_text(&fchngQuery, 2); |
| 522 | int isNew = db_column_int(&fchngQuery, 0)<=0; |
| 523 | int isMergeNew = db_column_int(&fchngQuery, 0)<0; |
| 524 | int fid = db_column_int(&fchngQuery, 1); |
| 525 | int isDel = fid==0; |
| 526 | const char *zOldName = db_column_text(&fchngQuery, 5); |
| 527 | const char *zOld = db_column_text(&fchngQuery, 4); |
| 528 | const char *zNew = db_column_text(&fchngQuery, 3); |
| @@ -546,12 +547,17 @@ | |
| 547 | zA = href("%R/artifact/%!S",fid?zNew:zOld); |
| 548 | if( content_is_private(fid) ){ |
| 549 | zUnpub = UNPUB_TAG; |
| 550 | } |
| 551 | if( isNew ){ |
| 552 | @ <li> %s(zA)%h(zFilename)</a>%s(zId) %s(zUnpub) |
| 553 | if( isMergeNew ){ |
| 554 | @ (added by merge) |
| 555 | }else{ |
| 556 | @ (new file) |
| 557 | } |
| 558 | @ %z(href("%R/artifact/%!S",zNew))[view]</a></li> |
| 559 | }else if( isDel ){ |
| 560 | @ <li> %s(zA)%h(zFilename)</a> (deleted)</li> |
| 561 | }else if( fossil_strcmp(zOld,zNew)==0 && zOldName!=0 ){ |
| 562 | @ <li> %h(zOldName) → %s(zA)%h(zFilename)</a>%s(zId) |
| 563 | @ %s(zUnpub) %z(href("%R/artifact/%!S",zNew))[view]</a></li> |
| @@ -1873,11 +1879,11 @@ | |
| 1879 | fossil_free(zFree); |
| 1880 | |
| 1881 | if(verboseFlag){ |
| 1882 | if( !fchngQueryInit ){ |
| 1883 | db_prepare(&fchngQuery, |
| 1884 | "SELECT (pid<=0) AS isnew," |
| 1885 | " (fid==0) AS isdel," |
| 1886 | " (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name," |
| 1887 | " (SELECT uuid FROM blob WHERE rid=fid)," |
| 1888 | " (SELECT uuid FROM blob WHERE rid=pid)" |
| 1889 | " FROM mlink" |
| 1890 |