Fossil

Changes On Branch leaves-command-branched-from
Login

Changes On Branch leaves-command-branched-from

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch leaves-command-branched-from Excluding Merge-Ins

This is equivalent to a diff from 47a4c4cb to ab047b62

2021-03-03
17:24
leaves command now shows the branch point of each leaf, as discussed in 5e52d31d2e. ... (check-in: d21e3c5a user: stephan tags: trunk)
2021-03-01
06:47
Fixed "debug" -> "cgi-debug" in the built-in docs for "fossil cgi". ... (check-in: e3dbb7d7 user: wyoung tags: trunk)
03:00
Merged in trunk. ... (Closed-Leaf check-in: ab047b62 user: stephan tags: leaves-command-branched-from)
2021-02-26
13:27
Disable the permuted index from the main documentation page, as moderns do not understand indexes. Replace it with a simple list of documents. People can use Ctrl-F or the "Search" box for search. ... (check-in: 47a4c4cb user: drh tags: trunk)
13:07
The new mainmenu element previously called "Setup" reverted a years-old change to use "Admin" for this menu because about half of the items on the /setup screen are also usable by people with only the Admin cap. This also changes the capexpr to include "a" for the same reason. ... (check-in: 7260ff21 user: wyoung tags: trunk)
2021-02-15
18:24
Use main-branch setting, instead of hard-coded trunk, for determining whether a given leaf should show its branch point, per forum feedback. ... (check-in: 0d5349cd user: stephan tags: leaves-command-branched-from)

Changes to src/checkin.c.

1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
    db_prepare(&q, "SELECT merge FROM vmerge WHERE id=0 OR id<-2");
    while( db_step(&q)==SQLITE_ROW ){
      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);
      if( zMergeUuid ){
        blob_appendf(pOut, " %s", zMergeUuid);
        if( p->verifyDate ) checkin_verify_younger(mid, zMergeUuid, zDate);
        free(zMergeUuid);
      }
    }
    db_finalize(&q);







|







1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
    db_prepare(&q, "SELECT merge FROM vmerge WHERE id=0 OR id<-2");
    while( db_step(&q)==SQLITE_ROW ){
      char *zMergeUuid;
      int mid = db_column_int(&q, 0);
      if( (!g.markPrivate && content_is_private(mid)) || (mid == vid) ){
        continue;
      }
      zMergeUuid = rid_to_uuid(mid);
      if( zMergeUuid ){
        blob_appendf(pOut, " %s", zMergeUuid);
        if( p->verifyDate ) checkin_verify_younger(mid, zMergeUuid, zDate);
        free(zMergeUuid);
      }
    }
    db_finalize(&q);

Changes to src/descendants.c.

420
421
422
423
424
425
426

427
428
429
430
431
432
433
  int recomputeFlag = find_option("recompute",0,0)!=0;
  int byBranch = find_option("bybranch",0,0)!=0;
  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];


  if( multipleFlag ) byBranch = 1;
  if( zWidth ){
    width = atoi(zWidth);
    if( (width!=0) && (width<=39) ){
      fossil_fatal("-W|--width value must be >39 or 0");
    }







>







420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
  int recomputeFlag = find_option("recompute",0,0)!=0;
  int byBranch = find_option("bybranch",0,0)!=0;
  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) ){
      fossil_fatal("-W|--width value must be >39 or 0");
    }
489
490
491
492
493
494
495
496

497
498
499
500
501
502
503
504
505
506










507

508
509

510

511
512
513
514
515
516
517
  blob_reset(&sql);
  n = 0;
  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;


    if( byBranch && fossil_strcmp(zBr, zLastBr)!=0 ){
      fossil_print("*** %s ***\n", zBr);
      fossil_free(zLastBr);
      zLastBr = fossil_strdup(zBr);
      if( multipleFlag ) n = 0;
    }
    n++;
    sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n);
    fossil_print("%6s ", zLineNo);










    z = mprintf("%s [%S] %s", zDate, zId, zCom);

    comment_print(z, zCom, 7, width, get_comment_format());
    fossil_free(z);

  }

  fossil_free(zLastBr);
  db_finalize(&q);
}

/*
** WEBPAGE: leaves
**







|
>










>
>
>
>
>
>
>
>
>
>
|
>


>

>







490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
  blob_reset(&sql);
  n = 0;
  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 = 0;
    char * zBranchPoint = 0;

    if( byBranch && fossil_strcmp(zBr, zLastBr)!=0 ){
      fossil_print("*** %s ***\n", zBr);
      fossil_free(zLastBr);
      zLastBr = fossil_strdup(zBr);
      if( multipleFlag ) n = 0;
    }
    n++;
    sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n);
    fossil_print("%6s ", zLineNo);
    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);
}

/*
** WEBPAGE: leaves
**