Fossil SCM
Some minor fixes to the /finfo tree construction. Still having problems with incorrect mlink entries being created for files added by merge.
Commit
f603a914320243fb1a1914cde14333933b4092f5
Parent
7d5a85bba8db9f2…
1 file changed
+5
-1
+5
-1
| --- src/finfo.c | ||
| +++ src/finfo.c | ||
| @@ -294,10 +294,11 @@ | ||
| 294 | 294 | char zPrevDate[20]; |
| 295 | 295 | const char *zA; |
| 296 | 296 | const char *zB; |
| 297 | 297 | int n; |
| 298 | 298 | int baseCheckin; |
| 299 | + int fnid; | |
| 299 | 300 | |
| 300 | 301 | Blob title; |
| 301 | 302 | Blob sql; |
| 302 | 303 | HQuery url; |
| 303 | 304 | GraphContext *pGraph; |
| @@ -402,10 +403,12 @@ | ||
| 402 | 403 | fossil_free(zUuid); |
| 403 | 404 | }else{ |
| 404 | 405 | blob_appendf(&title, "History of files named "); |
| 405 | 406 | hyperlinked_path(zFilename, &title, 0, "tree", ""); |
| 406 | 407 | } |
| 408 | + fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename); | |
| 409 | + if( fShowId ) blob_appendf(&title, " (%d)", fnid); | |
| 407 | 410 | @ <h2>%b(&title)</h2> |
| 408 | 411 | blob_reset(&title); |
| 409 | 412 | pGraph = graph_init(); |
| 410 | 413 | @ <div id="canvas" style="position:relative;width:1px;height:1px;" |
| 411 | 414 | @ onclick="clickOnGraph(event)"></div> |
| @@ -428,15 +431,16 @@ | ||
| 428 | 431 | int nParent = 0; |
| 429 | 432 | int aParent[32]; |
| 430 | 433 | static Stmt qparent; |
| 431 | 434 | db_static_prepare(&qparent, |
| 432 | 435 | "SELECT DISTINCT pid FROM mlink" |
| 433 | - " WHERE fid=:fid AND mid=:mid" | |
| 436 | + " WHERE fid=:fid AND mid=:mid AND pid>0 AND fnid=:fnid" | |
| 434 | 437 | " ORDER BY isaux /*sort*/" |
| 435 | 438 | ); |
| 436 | 439 | db_bind_int(&qparent, ":fid", frid); |
| 437 | 440 | db_bind_int(&qparent, ":mid", fmid); |
| 441 | + db_bind_int(&qparent, ":fnid", fnid); | |
| 438 | 442 | while( db_step(&qparent)==SQLITE_ROW && nParent<32 ){ |
| 439 | 443 | aParent[nParent++] = db_column_int(&qparent, 0); |
| 440 | 444 | } |
| 441 | 445 | db_reset(&qparent); |
| 442 | 446 | if( zBr==0 ) zBr = "trunk"; |
| 443 | 447 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -294,10 +294,11 @@ | |
| 294 | char zPrevDate[20]; |
| 295 | const char *zA; |
| 296 | const char *zB; |
| 297 | int n; |
| 298 | int baseCheckin; |
| 299 | |
| 300 | Blob title; |
| 301 | Blob sql; |
| 302 | HQuery url; |
| 303 | GraphContext *pGraph; |
| @@ -402,10 +403,12 @@ | |
| 402 | fossil_free(zUuid); |
| 403 | }else{ |
| 404 | blob_appendf(&title, "History of files named "); |
| 405 | hyperlinked_path(zFilename, &title, 0, "tree", ""); |
| 406 | } |
| 407 | @ <h2>%b(&title)</h2> |
| 408 | blob_reset(&title); |
| 409 | pGraph = graph_init(); |
| 410 | @ <div id="canvas" style="position:relative;width:1px;height:1px;" |
| 411 | @ onclick="clickOnGraph(event)"></div> |
| @@ -428,15 +431,16 @@ | |
| 428 | int nParent = 0; |
| 429 | int aParent[32]; |
| 430 | static Stmt qparent; |
| 431 | db_static_prepare(&qparent, |
| 432 | "SELECT DISTINCT pid FROM mlink" |
| 433 | " WHERE fid=:fid AND mid=:mid" |
| 434 | " ORDER BY isaux /*sort*/" |
| 435 | ); |
| 436 | db_bind_int(&qparent, ":fid", frid); |
| 437 | db_bind_int(&qparent, ":mid", fmid); |
| 438 | while( db_step(&qparent)==SQLITE_ROW && nParent<32 ){ |
| 439 | aParent[nParent++] = db_column_int(&qparent, 0); |
| 440 | } |
| 441 | db_reset(&qparent); |
| 442 | if( zBr==0 ) zBr = "trunk"; |
| 443 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -294,10 +294,11 @@ | |
| 294 | char zPrevDate[20]; |
| 295 | const char *zA; |
| 296 | const char *zB; |
| 297 | int n; |
| 298 | int baseCheckin; |
| 299 | int fnid; |
| 300 | |
| 301 | Blob title; |
| 302 | Blob sql; |
| 303 | HQuery url; |
| 304 | GraphContext *pGraph; |
| @@ -402,10 +403,12 @@ | |
| 403 | fossil_free(zUuid); |
| 404 | }else{ |
| 405 | blob_appendf(&title, "History of files named "); |
| 406 | hyperlinked_path(zFilename, &title, 0, "tree", ""); |
| 407 | } |
| 408 | fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename); |
| 409 | if( fShowId ) blob_appendf(&title, " (%d)", fnid); |
| 410 | @ <h2>%b(&title)</h2> |
| 411 | blob_reset(&title); |
| 412 | pGraph = graph_init(); |
| 413 | @ <div id="canvas" style="position:relative;width:1px;height:1px;" |
| 414 | @ onclick="clickOnGraph(event)"></div> |
| @@ -428,15 +431,16 @@ | |
| 431 | int nParent = 0; |
| 432 | int aParent[32]; |
| 433 | static Stmt qparent; |
| 434 | db_static_prepare(&qparent, |
| 435 | "SELECT DISTINCT pid FROM mlink" |
| 436 | " WHERE fid=:fid AND mid=:mid AND pid>0 AND fnid=:fnid" |
| 437 | " ORDER BY isaux /*sort*/" |
| 438 | ); |
| 439 | db_bind_int(&qparent, ":fid", frid); |
| 440 | db_bind_int(&qparent, ":mid", fmid); |
| 441 | db_bind_int(&qparent, ":fnid", fnid); |
| 442 | while( db_step(&qparent)==SQLITE_ROW && nParent<32 ){ |
| 443 | aParent[nParent++] = db_column_int(&qparent, 0); |
| 444 | } |
| 445 | db_reset(&qparent); |
| 446 | if( zBr==0 ) zBr = "trunk"; |
| 447 |