Index: src/checkin.c ================================================================== --- src/checkin.c +++ src/checkin.c @@ -1739,11 +1739,11 @@ char *zMergeUuid; int mid = db_column_int(&q, 0); if( (!g.markPrivate && content_is_private(mid)) || (mid == vid) ){ continue; } - zMergeUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", mid); + zMergeUuid = rid_to_uuid(mid); if( zMergeUuid ){ blob_appendf(pOut, " %s", zMergeUuid); if( p->verifyDate ) checkin_verify_younger(mid, zMergeUuid, zDate); free(zMergeUuid); } Index: src/descendants.c ================================================================== --- src/descendants.c +++ src/descendants.c @@ -422,10 +422,11 @@ int multipleFlag = find_option("multiple","m",0)!=0; const char *zWidth = find_option("width","W",1); char *zLastBr = 0; int n, width; char zLineNo[10]; + char * const zMainBranch = db_get("main-branch","trunk"); if( multipleFlag ) byBranch = 1; if( zWidth ){ width = atoi(zWidth); if( (width!=0) && (width<=39) ){ @@ -491,11 +492,12 @@ while( db_step(&q)==SQLITE_ROW ){ const char *zId = db_column_text(&q, 1); const char *zDate = db_column_text(&q, 2); const char *zCom = db_column_text(&q, 3); const char *zBr = db_column_text(&q, 7); - char *z; + char *z = 0; + char * zBranchPoint = 0; if( byBranch && fossil_strcmp(zBr, zLastBr)!=0 ){ fossil_print("*** %s ***\n", zBr); fossil_free(zLastBr); zLastBr = fossil_strdup(zBr); @@ -502,14 +504,27 @@ if( multipleFlag ) n = 0; } n++; sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n); fossil_print("%6s ", zLineNo); - z = mprintf("%s [%S] %s", zDate, zId, zCom); + if(0!=fossil_strcmp(zBr,zMainBranch)){ + int ridOfRoot; + z = mprintf("root:%s", zId); + ridOfRoot = symbolic_name_to_rid(z, "ci"); + if(ridOfRoot>0){ + zBranchPoint = mprintf(" (branched from: [%.*z])", hash_digits(0), + rid_to_uuid(ridOfRoot)); + } + fossil_free(z); + } + z = mprintf("%s [%S] %s%s", zDate, zId, zCom, + zBranchPoint ? zBranchPoint : ""); comment_print(z, zCom, 7, width, get_comment_format()); fossil_free(z); + fossil_free(zBranchPoint); } + fossil_free(zMainBranch); fossil_free(zLastBr); db_finalize(&q); } /*