Fossil SCM

Make sure the initial empty check-in shows up in the timeline and branch lists of newly created repositories.

drh 2009-01-21 18:12 trunk
Commit 54e7410c2ad6a2e2f7a74cc4e7eb7542d48d9859
1 file changed +3 -1
+3 -1
--- src/db.c
+++ src/db.c
@@ -931,10 +931,11 @@
931931
if( !db_is_global("localauth") ) db_set_int("localauth", 0, 0);
932932
db_create_default_users(0);
933933
user_select();
934934
935935
if (makeInitialVersion){
936
+ int rid;
936937
blob_zero(&manifest);
937938
blob_appendf(&manifest, "C initial\\sempty\\scheck-in\n");
938939
zDate = db_text(0, "SELECT datetime('now')");
939940
zDate[10]='T';
940941
blob_appendf(&manifest, "D %s\n", zDate);
@@ -945,11 +946,12 @@
945946
blob_appendf(&manifest, "T +newbranch *\n");
946947
blob_appendf(&manifest, "U %F\n", g.zLogin);
947948
md5sum_blob(&manifest, &hash);
948949
blob_appendf(&manifest, "Z %b\n", &hash);
949950
blob_reset(&hash);
950
- content_put(&manifest, 0, 0);
951
+ rid = content_put(&manifest, 0, 0);
952
+ manifest_crosslink(rid, &manifest);
951953
}
952954
}
953955
954956
/*
955957
** COMMAND: new
956958
--- src/db.c
+++ src/db.c
@@ -931,10 +931,11 @@
931 if( !db_is_global("localauth") ) db_set_int("localauth", 0, 0);
932 db_create_default_users(0);
933 user_select();
934
935 if (makeInitialVersion){
 
936 blob_zero(&manifest);
937 blob_appendf(&manifest, "C initial\\sempty\\scheck-in\n");
938 zDate = db_text(0, "SELECT datetime('now')");
939 zDate[10]='T';
940 blob_appendf(&manifest, "D %s\n", zDate);
@@ -945,11 +946,12 @@
945 blob_appendf(&manifest, "T +newbranch *\n");
946 blob_appendf(&manifest, "U %F\n", g.zLogin);
947 md5sum_blob(&manifest, &hash);
948 blob_appendf(&manifest, "Z %b\n", &hash);
949 blob_reset(&hash);
950 content_put(&manifest, 0, 0);
 
951 }
952 }
953
954 /*
955 ** COMMAND: new
956
--- src/db.c
+++ src/db.c
@@ -931,10 +931,11 @@
931 if( !db_is_global("localauth") ) db_set_int("localauth", 0, 0);
932 db_create_default_users(0);
933 user_select();
934
935 if (makeInitialVersion){
936 int rid;
937 blob_zero(&manifest);
938 blob_appendf(&manifest, "C initial\\sempty\\scheck-in\n");
939 zDate = db_text(0, "SELECT datetime('now')");
940 zDate[10]='T';
941 blob_appendf(&manifest, "D %s\n", zDate);
@@ -945,11 +946,12 @@
946 blob_appendf(&manifest, "T +newbranch *\n");
947 blob_appendf(&manifest, "U %F\n", g.zLogin);
948 md5sum_blob(&manifest, &hash);
949 blob_appendf(&manifest, "Z %b\n", &hash);
950 blob_reset(&hash);
951 rid = content_put(&manifest, 0, 0);
952 manifest_crosslink(rid, &manifest);
953 }
954 }
955
956 /*
957 ** COMMAND: new
958

Keyboard Shortcuts

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