Fossil SCM
Make sure the initial empty check-in shows up in the timeline and branch lists of newly created repositories.
Commit
54e7410c2ad6a2e2f7a74cc4e7eb7542d48d9859
Parent
9c256a46b7b5533…
1 file changed
+3
-1
M
src/db.c
+3
-1
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -931,10 +931,11 @@ | ||
| 931 | 931 | if( !db_is_global("localauth") ) db_set_int("localauth", 0, 0); |
| 932 | 932 | db_create_default_users(0); |
| 933 | 933 | user_select(); |
| 934 | 934 | |
| 935 | 935 | if (makeInitialVersion){ |
| 936 | + int rid; | |
| 936 | 937 | blob_zero(&manifest); |
| 937 | 938 | blob_appendf(&manifest, "C initial\\sempty\\scheck-in\n"); |
| 938 | 939 | zDate = db_text(0, "SELECT datetime('now')"); |
| 939 | 940 | zDate[10]='T'; |
| 940 | 941 | blob_appendf(&manifest, "D %s\n", zDate); |
| @@ -945,11 +946,12 @@ | ||
| 945 | 946 | blob_appendf(&manifest, "T +newbranch *\n"); |
| 946 | 947 | blob_appendf(&manifest, "U %F\n", g.zLogin); |
| 947 | 948 | md5sum_blob(&manifest, &hash); |
| 948 | 949 | blob_appendf(&manifest, "Z %b\n", &hash); |
| 949 | 950 | blob_reset(&hash); |
| 950 | - content_put(&manifest, 0, 0); | |
| 951 | + rid = content_put(&manifest, 0, 0); | |
| 952 | + manifest_crosslink(rid, &manifest); | |
| 951 | 953 | } |
| 952 | 954 | } |
| 953 | 955 | |
| 954 | 956 | /* |
| 955 | 957 | ** COMMAND: new |
| 956 | 958 |
| --- 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 |