Fossil

Check-in [38daa9aa]
Login

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

Overview
Comment:Fix a bug in the error message when the --checkin argument of fossil diff has no parent.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | diff-show-changes
Files: files | file ages | folders
SHA1:38daa9aa75cf616688848035edb97c22110d964e
User & Date: drh 2016-09-30 15:22:23
Context
2016-09-30
15:24
Add the --checkin option to the "fossil diff" command. check-in: e7c2454d user: drh tags: trunk
15:22
Fix a bug in the error message when the --checkin argument of fossil diff has no parent. Closed-Leaf check-in: 38daa9aa user: drh tags: diff-show-changes
15:18
Change the name of the --changes option on "fossil diff" to --checkin. check-in: 65724af1 user: drh tags: diff-show-changes
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/diffcmd.c.

898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
    int ridTo = name_to_typed_rid(zCheckin, "ci");
    zTo = zCheckin;
    zFrom = db_text(0,
      "SELECT uuid FROM blob, plink"
      " WHERE plink.cid=%d AND plink.isprim AND plink.pid=blob.rid",
      ridTo);
    if( zFrom==0 ){
      fossil_fatal("check-in %z has no parent", zTo);
    }
  }
  if( againstUndo ){
    if( db_lget_int("undo_available",0)==0 ){
      fossil_print("No undo or redo is available\n");
      return;
    }







|







898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
    int ridTo = name_to_typed_rid(zCheckin, "ci");
    zTo = zCheckin;
    zFrom = db_text(0,
      "SELECT uuid FROM blob, plink"
      " WHERE plink.cid=%d AND plink.isprim AND plink.pid=blob.rid",
      ridTo);
    if( zFrom==0 ){
      fossil_fatal("check-in %s has no parent", zTo);
    }
  }
  if( againstUndo ){
    if( db_lget_int("undo_available",0)==0 ){
      fossil_print("No undo or redo is available\n");
      return;
    }