Fossil SCM

Record files added by merge using mlink.pid=-1. Improve the web interface to better indicate files added by merge.

drh 2015-05-06 12:35 trunk merge
Commit 8e44cf6f4df4f9f004a55071445851ee4e25c7c1
+1 -1
--- src/finfo.c
+++ src/finfo.c
@@ -509,11 +509,11 @@
509509
@ %z(href("%R/annotate?filename=%h&checkin=%s",z,zCkin))
510510
@ [annotate]</a>
511511
@ %z(href("%R/blame?filename=%h&checkin=%s",z,zCkin))
512512
@ [blame]</a>
513513
@ %z(href("%R/timeline?n=200&uf=%!S",zUuid))[check-ins&nbsp;using]</a>
514
- if( fpid ){
514
+ if( fpid>0 ){
515515
@ %z(href("%R/fdiff?sbs=1&v1=%!S&v2=%!S",zPUuid,zUuid))[diff]</a>
516516
}
517517
}
518518
if( fDebug & FINFO_DEBUG_MLINK ){
519519
int ii;
520520
--- 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&nbsp;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&nbsp;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 @@
13441344
** A single mlink entry is added for every file that changed content,
13451345
** name, and/or permissions going from pid to cid.
13461346
**
13471347
** Deleted files have mlink.fid=0.
13481348
** Added files have mlink.pid=0.
1349
+** File added by merge have mlink.pid=-1
13491350
** Edited files have both mlink.pid!=0 and mlink.fid!=0
13501351
*/
13511352
static void add_mlink(
13521353
int pmid, Manifest *pParent, /* Parent check-in */
13531354
int mid, Manifest *pChild, /* The child check-in */
@@ -1801,14 +1802,13 @@
18011802
pid, rid, i==0, p->rDate, zBaseId/*safe-for-%s*/);
18021803
add_mlink(pid, 0, rid, p, i==0);
18031804
if( i==0 ) parentid = pid;
18041805
}
18051806
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. */
18081808
db_multi_exec(
1809
- "DELETE FROM mlink"
1809
+ "UPDATE mlink SET pid=-1"
18101810
" WHERE mid=%d"
18111811
" AND pid=0"
18121812
" AND fnid IN "
18131813
" (SELECT fnid FROM mlink WHERE mid=%d GROUP BY fnid"
18141814
" HAVING count(*)<%d)",
18151815
--- 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 @@
249249
@ -- pid = Parent file ID.
250250
@ -- fnid = File Name ID.
251251
@ -- pfnid = Parent File Name ID.
252252
@ -- isaux = pmid IS AUXiliary parent, not primary parent
253253
@ --
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.
256258
@ --
257259
@ 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
266268
@ );
267269
@ CREATE INDEX mlink_i1 ON mlink(mid);
268270
@ CREATE INDEX mlink_i2 ON mlink(fnid);
269271
@ CREATE INDEX mlink_i3 ON mlink(fid);
270272
@ CREATE INDEX mlink_i4 ON mlink(pid);
271273
--- 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 @@
318318
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
319319
** [sqlite_version()] and [sqlite_source_id()].
320320
*/
321321
#define SQLITE_VERSION "3.8.10"
322322
#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"
324324
325325
/*
326326
** CAPI3REF: Run-Time Library Version Numbers
327327
** KEYWORDS: sqlite3_version, sqlite3_sourceid
328328
**
@@ -21590,11 +21590,10 @@
2159021590
case '0': flag_zeropad = 1; break;
2159121591
default: done = 1; break;
2159221592
}
2159321593
}while( !done && (c=(*++fmt))!=0 );
2159421594
/* Get the field width */
21595
- width = 0;
2159621595
if( c=='*' ){
2159721596
if( bArgList ){
2159821597
width = (int)getIntArg(pArgList);
2159921598
}else{
2160021599
width = va_arg(ap,int);
@@ -21614,11 +21613,10 @@
2161421613
width = wx & 0x7fffffff;
2161521614
}
2161621615
2161721616
/* Get the precision */
2161821617
if( c=='.' ){
21619
- precision = 0;
2162021618
c = *++fmt;
2162121619
if( c=='*' ){
2162221620
if( bArgList ){
2162321621
precision = (int)getIntArg(pArgList);
2162421622
}else{
@@ -55477,11 +55475,11 @@
5547755475
}
5547855476
assert( nReserve>=0 && nReserve<=255 );
5547955477
if( pageSize>=512 && pageSize<=SQLITE_MAX_PAGE_SIZE &&
5548055478
((pageSize-1)&pageSize)==0 ){
5548155479
assert( (pageSize & 7)==0 );
55482
- assert( !pBt->pPage1 && !pBt->pCursor );
55480
+ assert( !pBt->pCursor );
5548355481
pBt->pageSize = (u32)pageSize;
5548455482
freeTempSpace(pBt);
5548555483
}
5548655484
rc = sqlite3PagerSetPagesize(pBt->pPager, &pBt->pageSize, nReserve);
5548755485
pBt->usableSize = pBt->pageSize - (u16)nReserve;
@@ -71814,11 +71812,10 @@
7181471812
}else{
7181571813
assert( rc==SQLITE_OK || (p->rc&0xff)==SQLITE_CONSTRAINT );
7181671814
assert( rc==SQLITE_OK || db->nDeferredCons>0 || db->nDeferredImmCons>0 );
7181771815
rc = p->rc ? SQLITE_ERROR : SQLITE_DONE;
7181871816
}
71819
- pOp = &aOp[pcx];
7182071817
goto vdbe_return;
7182171818
}
7182271819
7182371820
/* Opcode: Integer P1 P2 * * *
7182471821
** Synopsis: r[P2]=P1
@@ -76742,11 +76739,10 @@
7674276739
if( rc ){
7674376740
eNew = eOld;
7674476741
}
7674576742
eNew = sqlite3PagerSetJournalMode(pPager, eNew);
7674676743
76747
- pOut = &aMem[pOp->p2];
7674876744
pOut->flags = MEM_Str|MEM_Static|MEM_Term;
7674976745
pOut->z = (char *)sqlite3JournalModename(eNew);
7675076746
pOut->n = sqlite3Strlen30(pOut->z);
7675176747
pOut->enc = SQLITE_UTF8;
7675276748
sqlite3VdbeChangeEncoding(pOut, encoding);
@@ -84054,11 +84050,11 @@
8405484050
int i;
8405584051
u32 m = 0;
8405684052
if( pList ){
8405784053
for(i=0; i<pList->nExpr; i++){
8405884054
Expr *pExpr = pList->a[i].pExpr;
84059
- if( ALWAYS(pExpr) ) m |= pList->a[i].pExpr->flags;
84055
+ if( ALWAYS(pExpr) ) m |= pExpr->flags;
8406084056
}
8406184057
}
8406284058
return m;
8406384059
}
8406484060
@@ -130865,10 +130861,17 @@
130865130861
#ifdef SQLITE_ENABLE_RTREE
130866130862
if( !db->mallocFailed && rc==SQLITE_OK){
130867130863
rc = sqlite3RtreeInit(db);
130868130864
}
130869130865
#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
130870130873
130871130874
/* -DSQLITE_DEFAULT_LOCKING_MODE=1 makes EXCLUSIVE the default locking
130872130875
** mode. -DSQLITE_DEFAULT_LOCKING_MODE=0 make NORMAL the default locking
130873130876
** mode. Doing nothing at all also makes NORMAL the default.
130874130877
*/
@@ -155227,11 +155230,11 @@
155227155230
** "sqlite3_analyzer" utility. See the ../tool/spaceanal.tcl script
155228155231
** for an example implementation.
155229155232
*/
155230155233
155231155234
#if (defined(SQLITE_ENABLE_DBSTAT_VTAB) || defined(SQLITE_TEST)) \
155232
- && !defined(SQLITE_OMIT_VIRTUAL_TABLE)
155235
+ && !defined(SQLITE_OMIT_VIRTUALTABLE)
155233155236
155234155237
/*
155235155238
** Page paths:
155236155239
**
155237155240
** The value of the 'path' column describes the path taken from the
155238155241
--- 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 @@
111111
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
112112
** [sqlite_version()] and [sqlite_source_id()].
113113
*/
114114
#define SQLITE_VERSION "3.8.10"
115115
#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"
117117
118118
/*
119119
** CAPI3REF: Run-Time Library Version Numbers
120120
** KEYWORDS: sqlite3_version, sqlite3_sourceid
121121
**
122122
--- 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 @@
499499
&& zType[0]=='c' && g.perm.Hyperlink
500500
){
501501
int inUl = 0;
502502
if( !fchngQueryInit ){
503503
db_prepare(&fchngQuery,
504
- "SELECT (pid==0) AS isnew,"
504
+ "SELECT pid,"
505505
" fid,"
506506
" (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name,"
507507
" (SELECT uuid FROM blob WHERE rid=fid),"
508508
" (SELECT uuid FROM blob WHERE rid=pid),"
509509
" (SELECT name FROM filename WHERE fnid=mlink.pfnid) AS oldnm"
@@ -517,11 +517,12 @@
517517
fchngQueryInit = 1;
518518
}
519519
db_bind_int(&fchngQuery, ":mid", rid);
520520
while( db_step(&fchngQuery)==SQLITE_ROW ){
521521
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;
523524
int fid = db_column_int(&fchngQuery, 1);
524525
int isDel = fid==0;
525526
const char *zOldName = db_column_text(&fchngQuery, 5);
526527
const char *zOld = db_column_text(&fchngQuery, 4);
527528
const char *zNew = db_column_text(&fchngQuery, 3);
@@ -546,12 +547,17 @@
546547
zA = href("%R/artifact/%!S",fid?zNew:zOld);
547548
if( content_is_private(fid) ){
548549
zUnpub = UNPUB_TAG;
549550
}
550551
if( isNew ){
551
- @ <li> %s(zA)%h(zFilename)</a>%s(zId) %s(zUnpub) (new file) &nbsp;
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
+ @ &nbsp; %z(href("%R/artifact/%!S",zNew))[view]</a></li>
553559
}else if( isDel ){
554560
@ <li> %s(zA)%h(zFilename)</a> (deleted)</li>
555561
}else if( fossil_strcmp(zOld,zNew)==0 && zOldName!=0 ){
556562
@ <li> %h(zOldName) &rarr; %s(zA)%h(zFilename)</a>%s(zId)
557563
@ %s(zUnpub) %z(href("%R/artifact/%!S",zNew))[view]</a></li>
@@ -1873,11 +1879,11 @@
18731879
fossil_free(zFree);
18741880
18751881
if(verboseFlag){
18761882
if( !fchngQueryInit ){
18771883
db_prepare(&fchngQuery,
1878
- "SELECT (pid==0) AS isnew,"
1884
+ "SELECT (pid<=0) AS isnew,"
18791885
" (fid==0) AS isdel,"
18801886
" (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name,"
18811887
" (SELECT uuid FROM blob WHERE rid=fid),"
18821888
" (SELECT uuid FROM blob WHERE rid=pid)"
18831889
" FROM mlink"
18841890
--- 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) &nbsp;
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) &rarr; %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 @ &nbsp; %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) &rarr; %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

Keyboard Shortcuts

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