Fossil SCM
Make an appropriate entry in the rcvfrom table when doing a git or svn import. See [forum:92db82a45e|forum post 92db82a45e] for details on the problem that this check-in attempts to fix.
Commit
59ba20f8450bb8583aa71cead5cf2abd2fbdf2a3b85ec9a6b9f9ad168504b488
Parent
a1838297f9450fc…
1 file changed
+4
-1
+4
-1
| --- src/import.c | ||
| +++ src/import.c | ||
| @@ -160,12 +160,14 @@ | ||
| 160 | 160 | |
| 161 | 161 | hname_hash(pContent, 0, &hash); |
| 162 | 162 | rid = db_int(0, "SELECT rid FROM blob WHERE uuid=%B", &hash); |
| 163 | 163 | if( rid==0 ){ |
| 164 | 164 | static Stmt ins; |
| 165 | + assert( g.rcvid>0 ); | |
| 165 | 166 | db_static_prepare(&ins, |
| 166 | - "INSERT INTO blob(uuid, size, content) VALUES(:uuid, :size, :content)" | |
| 167 | + "INSERT INTO blob(uuid, size, rcvid, content)" | |
| 168 | + "VALUES(:uuid, :size, %d, :content)", g.rcvid | |
| 167 | 169 | ); |
| 168 | 170 | db_bind_text(&ins, ":uuid", blob_str(&hash)); |
| 169 | 171 | db_bind_int(&ins, ":size", gg.nData); |
| 170 | 172 | blob_compress(pContent, &cmpr); |
| 171 | 173 | db_bind_blob(&ins, ":content", &cmpr); |
| @@ -1770,10 +1772,11 @@ | ||
| 1770 | 1772 | db_begin_transaction(); |
| 1771 | 1773 | if( !incrFlag ){ |
| 1772 | 1774 | db_initial_setup(0, 0, zDefaultUser); |
| 1773 | 1775 | db_set("main-branch", gimport.zTrunkName, 0); |
| 1774 | 1776 | } |
| 1777 | + content_rcvid_init(svnFlag ? "svn-import" : "git-import"); | |
| 1775 | 1778 | |
| 1776 | 1779 | if( svnFlag ){ |
| 1777 | 1780 | db_multi_exec( |
| 1778 | 1781 | "CREATE TEMP TABLE xrevisions(" |
| 1779 | 1782 | " trev INTEGER, tbranch INT, trid INT, tparent INT DEFAULT 0," |
| 1780 | 1783 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -160,12 +160,14 @@ | |
| 160 | |
| 161 | hname_hash(pContent, 0, &hash); |
| 162 | rid = db_int(0, "SELECT rid FROM blob WHERE uuid=%B", &hash); |
| 163 | if( rid==0 ){ |
| 164 | static Stmt ins; |
| 165 | db_static_prepare(&ins, |
| 166 | "INSERT INTO blob(uuid, size, content) VALUES(:uuid, :size, :content)" |
| 167 | ); |
| 168 | db_bind_text(&ins, ":uuid", blob_str(&hash)); |
| 169 | db_bind_int(&ins, ":size", gg.nData); |
| 170 | blob_compress(pContent, &cmpr); |
| 171 | db_bind_blob(&ins, ":content", &cmpr); |
| @@ -1770,10 +1772,11 @@ | |
| 1770 | db_begin_transaction(); |
| 1771 | if( !incrFlag ){ |
| 1772 | db_initial_setup(0, 0, zDefaultUser); |
| 1773 | db_set("main-branch", gimport.zTrunkName, 0); |
| 1774 | } |
| 1775 | |
| 1776 | if( svnFlag ){ |
| 1777 | db_multi_exec( |
| 1778 | "CREATE TEMP TABLE xrevisions(" |
| 1779 | " trev INTEGER, tbranch INT, trid INT, tparent INT DEFAULT 0," |
| 1780 |
| --- src/import.c | |
| +++ src/import.c | |
| @@ -160,12 +160,14 @@ | |
| 160 | |
| 161 | hname_hash(pContent, 0, &hash); |
| 162 | rid = db_int(0, "SELECT rid FROM blob WHERE uuid=%B", &hash); |
| 163 | if( rid==0 ){ |
| 164 | static Stmt ins; |
| 165 | assert( g.rcvid>0 ); |
| 166 | db_static_prepare(&ins, |
| 167 | "INSERT INTO blob(uuid, size, rcvid, content)" |
| 168 | "VALUES(:uuid, :size, %d, :content)", g.rcvid |
| 169 | ); |
| 170 | db_bind_text(&ins, ":uuid", blob_str(&hash)); |
| 171 | db_bind_int(&ins, ":size", gg.nData); |
| 172 | blob_compress(pContent, &cmpr); |
| 173 | db_bind_blob(&ins, ":content", &cmpr); |
| @@ -1770,10 +1772,11 @@ | |
| 1772 | db_begin_transaction(); |
| 1773 | if( !incrFlag ){ |
| 1774 | db_initial_setup(0, 0, zDefaultUser); |
| 1775 | db_set("main-branch", gimport.zTrunkName, 0); |
| 1776 | } |
| 1777 | content_rcvid_init(svnFlag ? "svn-import" : "git-import"); |
| 1778 | |
| 1779 | if( svnFlag ){ |
| 1780 | db_multi_exec( |
| 1781 | "CREATE TEMP TABLE xrevisions(" |
| 1782 | " trev INTEGER, tbranch INT, trid INT, tparent INT DEFAULT 0," |
| 1783 |