Fossil

Check-in [72f5101ef0]
Login

Check-in [72f5101ef0]

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

Overview
Comment:Give a better error message if structural artifact cards are out-of-order.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | manifest-sort-check
Files: files | file ages | folders
SHA3-256: 72f5101ef0ba008897643dc6e90acb645c995e3d4572e7825ba77f7fbb68f0b2
User & Date: drh 2021-02-10 23:49:09.775
Context
2021-02-10
23:53
Do a better job of detecting misformatted structural artifacts and reporting the error. Ticket [15d04de574383d61]. ... (check-in: 023fddeec4 user: drh tags: trunk)
23:49
Give a better error message if structural artifact cards are out-of-order. ... (Closed-Leaf check-in: 72f5101ef0 user: drh tags: manifest-sort-check)
23:34
Modify the out-of-order card detection in the structural artifact parser to allow N and P cards of a technote to be in the wrong order. [15d04de574383d61|Ticket 15d04de574383d61]. ... (check-in: 36620b74a4 user: drh tags: manifest-sort-check)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/manifest.c.
541
542
543
544
545
546
547
548


549
550
551
552
553
554
555
      /* Cards must be in increasing order.  However, out-of-order detection
      ** was broken prior to 2021-02-10 due to a bug.  Furthermore, there
      ** was a bug in technote generation (prior to 2021-02-10) that caused
      ** the P card to occur before the N card.  Hence, for historical
      ** compatibility, we do allow the N card of a technote to occur after
      ** the P card.  See tickets 15d04de574383d61 and 5e67a7f4041a36ad.
      */
      if( cType!='N' || cPrevType!='P' || p->zEventId==0 ) break;


    }
    lineNo++;
    if( cType<'A' || cType>'Z' ) SYNTAX("bad card type");
    seenCard |= 1 << (cType-'A');
    cPrevType = cType;
    switch( cType ){
      /*







|
>
>







541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
      /* Cards must be in increasing order.  However, out-of-order detection
      ** was broken prior to 2021-02-10 due to a bug.  Furthermore, there
      ** was a bug in technote generation (prior to 2021-02-10) that caused
      ** the P card to occur before the N card.  Hence, for historical
      ** compatibility, we do allow the N card of a technote to occur after
      ** the P card.  See tickets 15d04de574383d61 and 5e67a7f4041a36ad.
      */
      if( cType!='N' || cPrevType!='P' || p->zEventId==0 ){
        SYNTAX("cards not in lexicographical order");
      }
    }
    lineNo++;
    if( cType<'A' || cType>'Z' ) SYNTAX("bad card type");
    seenCard |= 1 << (cType-'A');
    cPrevType = cType;
    switch( cType ){
      /*