Check-in [12c30d33d4]
Not logged in

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

Overview
Comment:Use C-card in stead of T-card to put comment on timeline for "merge --integrate" Control artifact. Demo: [4d27a34ae936f30c]
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:12c30d33d477c81248285f45797fcf1a21313147
User & Date: jan.nijtmans 2013-08-19 13:21:57
Original Comment: Use C-card in stead of T-card to put comment on timeline for "merge --integrate" Control artifact
Context
2013-08-19
14:30
Don't use a separate Control artifact for "merge --integrate" any more check-in: daa8eb95e4 user: jan.nijtmans tags: trunk
14:28
Don't use a separate Control artifact for "merge --integrate" any more. Closed-Leaf check-in: eb8787a326 user: jan.nijtmans tags: merge-integrate
13:21
Use C-card in stead of T-card to put comment on timeline for "merge --integrate" Control artifact. Demo: [4d27a34ae936f30c] check-in: 12c30d33d4 user: jan.nijtmans tags: trunk
13:19
Use C-card in stead of T-card to put comment on timeline for "merge --integrate" Control artifact. Closed-Leaf check-in: 908a090c88 user: jan.nijtmans tags: merge-integrate
11:29
Better enforcement of lexicographical ordering of T cards. check-in: 2979c08271 user: drh tags: trunk
Changes

Changes to src/checkin.c.

1704
1705
1706
1707
1708
1709
1710



1711
1712
1713
1714
1715
1716
1717
....
1724
1725
1726
1727
1728
1729
1730

1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754

  nvid = content_put(&manifest);
  if( nvid==0 ){
    fossil_panic("trouble committing manifest: %s", g.zErrMsg);
  }
  db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nvid);
  manifest_crosslink(nvid, &manifest);




  db_prepare(&q, "SELECT uuid,merge FROM vmerge JOIN blob ON merge=rid"
                 " WHERE id=-4");
  while( db_step(&q)==SQLITE_ROW ){
    const char *zIntegrateUuid = db_column_text(&q, 0);
    int rid = db_column_int(&q, 1);
    if( !is_a_leaf(rid) ){
................................................................................
        Blob ctrl;
        Blob cksum;
        char *zDate;
        int nrid;

        blob_zero(&ctrl);
        zDate = date_in_standard_format(sCiInfo.zDateOvrd ? sCiInfo.zDateOvrd : "now");

        blob_appendf(&ctrl, "D %s\n", zDate);
        blob_appendf(&ctrl, "T +closed %s by\\smerge\\s--integrate\n", zIntegrateUuid);
        blob_appendf(&ctrl, "U %F\n", sCiInfo.zUserOvrd ? sCiInfo.zUserOvrd : g.zLogin);
        md5sum_blob(&ctrl, &cksum);
        blob_appendf(&ctrl, "Z %b\n", &cksum);
        nrid = content_put(&ctrl);
        manifest_crosslink(nrid, &ctrl);
        assert( blob_is_reset(&ctrl) );
      }
      fossil_print("Closed: %s\n", zIntegrateUuid);
    }
  }
  db_finalize(&q);

  assert( blob_is_reset(&manifest) );
  content_deltify(vid, nvid, 0);
  zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid);
  fossil_print("New_Version: %s\n", zUuid);
  if( outputManifest ){
    zManifestFile = mprintf("%smanifest.uuid", g.zLocalRoot);
    blob_zero(&muuid);
    blob_appendf(&muuid, "%s\n", zUuid);
    blob_write_to_file(&muuid, zManifestFile);
    free(zManifestFile);







>
>
>







 







>

|












<
<
<







1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
....
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748



1749
1750
1751
1752
1753
1754
1755

  nvid = content_put(&manifest);
  if( nvid==0 ){
    fossil_panic("trouble committing manifest: %s", g.zErrMsg);
  }
  db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nvid);
  manifest_crosslink(nvid, &manifest);
  assert( blob_is_reset(&manifest) );
  content_deltify(vid, nvid, 0);
  zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid);

  db_prepare(&q, "SELECT uuid,merge FROM vmerge JOIN blob ON merge=rid"
                 " WHERE id=-4");
  while( db_step(&q)==SQLITE_ROW ){
    const char *zIntegrateUuid = db_column_text(&q, 0);
    int rid = db_column_int(&q, 1);
    if( !is_a_leaf(rid) ){
................................................................................
        Blob ctrl;
        Blob cksum;
        char *zDate;
        int nrid;

        blob_zero(&ctrl);
        zDate = date_in_standard_format(sCiInfo.zDateOvrd ? sCiInfo.zDateOvrd : "now");
        blob_appendf(&ctrl, "C Merge\\s--integrate\\sinto\\s[%S]\n", zUuid);
        blob_appendf(&ctrl, "D %s\n", zDate);
        blob_appendf(&ctrl, "T +closed %s\n", zIntegrateUuid);
        blob_appendf(&ctrl, "U %F\n", sCiInfo.zUserOvrd ? sCiInfo.zUserOvrd : g.zLogin);
        md5sum_blob(&ctrl, &cksum);
        blob_appendf(&ctrl, "Z %b\n", &cksum);
        nrid = content_put(&ctrl);
        manifest_crosslink(nrid, &ctrl);
        assert( blob_is_reset(&ctrl) );
      }
      fossil_print("Closed: %s\n", zIntegrateUuid);
    }
  }
  db_finalize(&q);




  fossil_print("New_Version: %s\n", zUuid);
  if( outputManifest ){
    zManifestFile = mprintf("%smanifest.uuid", g.zLocalRoot);
    blob_zero(&muuid);
    blob_appendf(&muuid, "%s\n", zUuid);
    blob_write_to_file(&muuid, zManifestFile);
    free(zManifestFile);