Fossil SCM

Bug-fix, discovered by Stephan Beal and Andy Bradford, in handling the --integrate tag on a fork merge: the "closed" tag should not be added in this case.

jan.nijtmans 2013-08-02 08:58 UTC trunk
Commit 9eb3f5f605a860697f4fe3a5ff1fe01f7378a001
1 file changed +13 -13
+13 -13
--- src/checkin.c
+++ src/checkin.c
@@ -1687,10 +1687,23 @@
16871687
** and rollback the transaction.
16881688
*/
16891689
if( dryRunFlag ){
16901690
blob_write_to_file(&manifest, "");
16911691
}
1692
+ nvid = content_put(&manifest);
1693
+ if( nvid==0 ){
1694
+ fossil_panic("trouble committing manifest: %s", g.zErrMsg);
1695
+ }
1696
+ if( outputManifest ){
1697
+ zManifestFile = mprintf("%smanifest", g.zLocalRoot);
1698
+ blob_write_to_file(&manifest, zManifestFile);
1699
+ blob_reset(&manifest);
1700
+ blob_read_from_file(&manifest, zManifestFile);
1701
+ free(zManifestFile);
1702
+ }
1703
+ db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nvid);
1704
+ manifest_crosslink(nvid, &manifest);
16921705
16931706
db_prepare(&q, "SELECT uuid,merge FROM vmerge JOIN blob ON merge=rid"
16941707
" WHERE id=-4");
16951708
while( db_step(&q)==SQLITE_ROW ){
16961709
const char *zIntegrateUuid = db_column_text(&q, 0);
@@ -1721,23 +1734,10 @@
17211734
fossil_print("Closed: %s\n", zIntegrateUuid);
17221735
}
17231736
}
17241737
db_finalize(&q);
17251738
1726
- if( outputManifest ){
1727
- zManifestFile = mprintf("%smanifest", g.zLocalRoot);
1728
- blob_write_to_file(&manifest, zManifestFile);
1729
- blob_reset(&manifest);
1730
- blob_read_from_file(&manifest, zManifestFile);
1731
- free(zManifestFile);
1732
- }
1733
- nvid = content_put(&manifest);
1734
- if( nvid==0 ){
1735
- fossil_panic("trouble committing manifest: %s", g.zErrMsg);
1736
- }
1737
- db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nvid);
1738
- manifest_crosslink(nvid, &manifest);
17391739
assert( blob_is_reset(&manifest) );
17401740
content_deltify(vid, nvid, 0);
17411741
zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid);
17421742
fossil_print("New_Version: %s\n", zUuid);
17431743
if( outputManifest ){
17441744
--- src/checkin.c
+++ src/checkin.c
@@ -1687,10 +1687,23 @@
1687 ** and rollback the transaction.
1688 */
1689 if( dryRunFlag ){
1690 blob_write_to_file(&manifest, "");
1691 }
 
 
 
 
 
 
 
 
 
 
 
 
 
1692
1693 db_prepare(&q, "SELECT uuid,merge FROM vmerge JOIN blob ON merge=rid"
1694 " WHERE id=-4");
1695 while( db_step(&q)==SQLITE_ROW ){
1696 const char *zIntegrateUuid = db_column_text(&q, 0);
@@ -1721,23 +1734,10 @@
1721 fossil_print("Closed: %s\n", zIntegrateUuid);
1722 }
1723 }
1724 db_finalize(&q);
1725
1726 if( outputManifest ){
1727 zManifestFile = mprintf("%smanifest", g.zLocalRoot);
1728 blob_write_to_file(&manifest, zManifestFile);
1729 blob_reset(&manifest);
1730 blob_read_from_file(&manifest, zManifestFile);
1731 free(zManifestFile);
1732 }
1733 nvid = content_put(&manifest);
1734 if( nvid==0 ){
1735 fossil_panic("trouble committing manifest: %s", g.zErrMsg);
1736 }
1737 db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nvid);
1738 manifest_crosslink(nvid, &manifest);
1739 assert( blob_is_reset(&manifest) );
1740 content_deltify(vid, nvid, 0);
1741 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid);
1742 fossil_print("New_Version: %s\n", zUuid);
1743 if( outputManifest ){
1744
--- src/checkin.c
+++ src/checkin.c
@@ -1687,10 +1687,23 @@
1687 ** and rollback the transaction.
1688 */
1689 if( dryRunFlag ){
1690 blob_write_to_file(&manifest, "");
1691 }
1692 nvid = content_put(&manifest);
1693 if( nvid==0 ){
1694 fossil_panic("trouble committing manifest: %s", g.zErrMsg);
1695 }
1696 if( outputManifest ){
1697 zManifestFile = mprintf("%smanifest", g.zLocalRoot);
1698 blob_write_to_file(&manifest, zManifestFile);
1699 blob_reset(&manifest);
1700 blob_read_from_file(&manifest, zManifestFile);
1701 free(zManifestFile);
1702 }
1703 db_multi_exec("INSERT OR IGNORE INTO unsent VALUES(%d)", nvid);
1704 manifest_crosslink(nvid, &manifest);
1705
1706 db_prepare(&q, "SELECT uuid,merge FROM vmerge JOIN blob ON merge=rid"
1707 " WHERE id=-4");
1708 while( db_step(&q)==SQLITE_ROW ){
1709 const char *zIntegrateUuid = db_column_text(&q, 0);
@@ -1721,23 +1734,10 @@
1734 fossil_print("Closed: %s\n", zIntegrateUuid);
1735 }
1736 }
1737 db_finalize(&q);
1738
 
 
 
 
 
 
 
 
 
 
 
 
 
1739 assert( blob_is_reset(&manifest) );
1740 content_deltify(vid, nvid, 0);
1741 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid);
1742 fossil_print("New_Version: %s\n", zUuid);
1743 if( outputManifest ){
1744

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button