Fossil SCM
Moved a misplaced mprintf() and added a missing free() from the previous commit.
Commit
ad9e8b99a6d565b75d8f92dac21371ca113bb866a4af2732303617ded1ed0690
Parent
0b41f332f4f3c8e…
1 file changed
+9
-4
+9
-4
| --- src/descendants.c | ||
| +++ src/descendants.c | ||
| @@ -506,15 +506,20 @@ | ||
| 506 | 506 | n++; |
| 507 | 507 | sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n); |
| 508 | 508 | fossil_print("%6s ", zLineNo); |
| 509 | 509 | z = mprintf("root:%s", zId); |
| 510 | 510 | ridOfRoot = symbolic_name_to_rid(z, "ci"); |
| 511 | - if(ridOfRoot>0){ | |
| 512 | - zBranchPoint = mprintf(" Branched from [%.*z]", hash_digits(0), | |
| 513 | - rid_to_uuid(ridOfRoot)); | |
| 511 | + if(0!=fossil_strcmp(zBr,"trunk")){ | |
| 512 | + z = mprintf("root:%s", zId); | |
| 513 | + ridOfRoot = symbolic_name_to_rid(z, "ci"); | |
| 514 | + if(ridOfRoot>0){ | |
| 515 | + zBranchPoint = mprintf(" (branched from: [%.*z])", hash_digits(0), | |
| 516 | + rid_to_uuid(ridOfRoot)); | |
| 517 | + } | |
| 518 | + fossil_free(z); | |
| 514 | 519 | } |
| 515 | - z = mprintf("%s [%S] %s%.*s", zDate, zId, zCom, | |
| 520 | + z = mprintf("%s [%S] %s%s", zDate, zId, zCom, | |
| 516 | 521 | zBranchPoint ? zBranchPoint : 0); |
| 517 | 522 | comment_print(z, zCom, 7, width, get_comment_format()); |
| 518 | 523 | fossil_free(z); |
| 519 | 524 | fossil_free(zBranchPoint); |
| 520 | 525 | } |
| 521 | 526 |
| --- src/descendants.c | |
| +++ src/descendants.c | |
| @@ -506,15 +506,20 @@ | |
| 506 | n++; |
| 507 | sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n); |
| 508 | fossil_print("%6s ", zLineNo); |
| 509 | z = mprintf("root:%s", zId); |
| 510 | ridOfRoot = symbolic_name_to_rid(z, "ci"); |
| 511 | if(ridOfRoot>0){ |
| 512 | zBranchPoint = mprintf(" Branched from [%.*z]", hash_digits(0), |
| 513 | rid_to_uuid(ridOfRoot)); |
| 514 | } |
| 515 | z = mprintf("%s [%S] %s%.*s", zDate, zId, zCom, |
| 516 | zBranchPoint ? zBranchPoint : 0); |
| 517 | comment_print(z, zCom, 7, width, get_comment_format()); |
| 518 | fossil_free(z); |
| 519 | fossil_free(zBranchPoint); |
| 520 | } |
| 521 |
| --- src/descendants.c | |
| +++ src/descendants.c | |
| @@ -506,15 +506,20 @@ | |
| 506 | n++; |
| 507 | sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n); |
| 508 | fossil_print("%6s ", zLineNo); |
| 509 | z = mprintf("root:%s", zId); |
| 510 | ridOfRoot = symbolic_name_to_rid(z, "ci"); |
| 511 | if(0!=fossil_strcmp(zBr,"trunk")){ |
| 512 | z = mprintf("root:%s", zId); |
| 513 | ridOfRoot = symbolic_name_to_rid(z, "ci"); |
| 514 | if(ridOfRoot>0){ |
| 515 | zBranchPoint = mprintf(" (branched from: [%.*z])", hash_digits(0), |
| 516 | rid_to_uuid(ridOfRoot)); |
| 517 | } |
| 518 | fossil_free(z); |
| 519 | } |
| 520 | z = mprintf("%s [%S] %s%s", zDate, zId, zCom, |
| 521 | zBranchPoint ? zBranchPoint : 0); |
| 522 | comment_print(z, zCom, 7, width, get_comment_format()); |
| 523 | fossil_free(z); |
| 524 | fossil_free(zBranchPoint); |
| 525 | } |
| 526 |