Skip to content
quarry Artifact [51dd3d4ffa]
Login

Artifact [51dd3d4ffa]

Artifact 51dd3d4ffaa4ef567accfd36133ddf9a00a3cc1dfee7b25debb3d14937730878:

Ticket change [51dd3d4ffa] - New ticket [6f5995173d] export a repository as a single .fossil file, without serving it. by dmestas on 2026-08-18 17:58:38.
D 2026-08-18T17:58:38.261
J comment Moved\sfrom\szit#99,\sclosed\sthere.\sIt\slands\shere\sbecause\sthe\sdecision\sthe\sissue\sturns\son\sis\sthe\sSQLite\sdependency:\szit\sdeliberately\shas\snone\sand\swould\svendor\sone\sfor\sa\ssingle\sverb,\swhile\squarry\salready\sdepends\son\sncruces/go-sqlite3.\sAn\sexported\s.fossil\sis\salso\sderived\soutput\s—\sfully\sreconstructible\sfrom\sthe\sstore\s—\sso\sholding\sit\shere\sdoes\snot\srun\sinto\sRFC\s0001\s§11\sthe\sway\sunversioned\sfiles\sdid.\n\n##\sThe\sgap\n\nGetting\sa\szit\srepository\sout\sas\sa\s`.fossil`\sfile\srequires\sstanding\sup\sa\sserver\sand\srunning\sanother\stool\sagainst\sit:\n\n```\nzit\sserve\s--port\s8080\s&\nfossil\sclone\shttp://127.0.0.1:8080/\sout.fossil\n```\n\nThat\sis\swhat\s`scripts/roundtrip-fossil.sh`\sdoes,\sand\sit\sworks\s—\sthe\ssync\sprotocol\sis\sa\scomplete\sexport\spath,\swhich\sis\swhy\sthere\sis\sno\s`export-fossil`\sverb\stoday\sand\swhy\s`export-git`\sexists\s(git\sspeaks\sa\sdifferent\sprotocol\sand\sneeds\s`fast-import`).\n\nBut\sit\sis\sthe\swrong\sshape\sfor\sthe\sthing\speople\sactually\swant,\swhich\sis\sone\sfile:\n\n```\nzit\sexport-fossil\sout.fossil\n```\n\nThe\scurrent\sroute\sneeds\sa\sfree\sport,\sa\sbackground\sprocess,\sa\sreadiness\swait,\sa\ssecond\sbinary\son\sPATH,\sand\sa\scleanup\spath\sfor\sthe\sserver\swhen\sthe\sclone\sfails.\sThat\sis\sa\slot\sof\smoving\sparts\sfor\s"give\sme\sthe\sfile",\sand\severy\sone\sof\sthem\sis\sa\sway\sfor\sa\sscript\sto\shang\sor\sleak.\s#95\smade\sexactly\sthis\sargument\sfor\s`tarball`:\s`zit\sopen`\sinto\sa\sthrowaway\scheckout\scould\salready\sproduce\sa\stree,\sand\sthe\sverb\sstill\searned\sits\splace\sbecause\sa\srelease\spipeline\sshould\snot\shave\sto\sorchestrate\sone.\n\n##\sWhy\sit\sis\snot\sjust\s`tarball`\sfor\srepositories\n\nA\starball\sis\sa\ssnapshot\sof\sone\scheck-in's\sfiles.\sThis\sis\sthe\swhole\sartifact\scorpus\swith\sits\shistory\sintact\s—\sthe\soutput\sis\sa\srepository\sa\sstock\s`fossil`\sopens,\sclones,\sand\ssyncs\swith,\snot\san\sarchive\sof\sa\stree.\n\nThe\sobvious\suses\sare\sthe\sones\sthe\sserver\sroute\smakes\sawkward:\n\n-\s**Handing\ssomeone\sa\srepository**\swho\shas\sfossil\sbut\snot\szit,\swithout\shosting\sanything.\n-\s**Backups\sand\smirrors**\sin\sa\scron\sjob,\swhere\sa\sbackground\sserver\sis\sa\sliability.\n-\s**Air-gapped\stransfer.**\sNo\sport,\sno\slistener,\sno\snetwork\snamespace.\n-\s**CI\sartifacts.**\sThe\sround-trip\sharness\sitself\swould\sbecome\sa\stwo-line\sstep.\n\n##\sWhat\sit\swould\sdo\n\nWrite\sa\sSQLite\sfossil\srepository\scontaining\severy\sartifact\sthis\sstore\sholds,\splus\sthe\sderived\stables\sfossil\sexpects\s(`blob`,\s`delta`,\s`filename`,\s`mlink`,\s`plink`,\s`event`,\s`tagxref`).\n\nThe\shonest\squestion\sis\show\smuch\sof\sthat\shas\sto\sbe\sbuilt\sversus\sderived.\sFossil's\sown\sanswer\sis\s`fossil\srebuild`,\swhich\sreconstructs\severy\sderived\stable\sfrom\sthe\sartifact\scorpus\salone\s—\sso\sa\sminimal\sexport\scould\swrite\s`blob`/`delta`\sand\sleave\sthe\srest\sto\sa\s`rebuild`\son\sthe\sfar\sside,\sat\sthe\scost\sof\sthe\srecipient\srunning\sone\scommand.\sWriting\sthe\sderived\stables\sdirectly\sis\smore\swork\sand\sproduces\sa\sfile\sthat\sis\simmediately\susable.\n\nWorth\sdeciding\sexplicitly\srather\sthan\sdiscovering:\s**a\srepository\sthat\sneeds\s`fossil\srebuild`\sbefore\sit\sis\susable\sis\sa\sdifferent\sproduct\sfrom\sone\sthat\sdoes\snot.**\n\n##\sWhat\salready\sexists\n\nMost\sof\sthe\shard\sparts\sare\sdone:\n\n-\s**The\sartifact\scorpus\sis\sbyte-exact.**\s`import-fossil\s--compatible`\spreserves\shashes\sand\sproject\scode,\sand\s#73\sverified\sthe\sround\strip\sagainst\sstock\sfossil,\sso\sthe\sartifacts\sa\szit\sstore\sholds\sare\salready\sthe\sartifacts\sfossil\swants.\n-\s**The\senumeration\sexists.**\s`zit\sframes`\swalks\severy\sstored\sartifact;\s`Repository.blob`\sreconstructs\sand\shash-verifies\scontent.\n-\s**The\sdifferential\sharness\sexists.**\s`scripts/roundtrip-fossil.sh`\salready\scompares\san\sexported\srepository\sagainst\sits\sorigin\sby\sartifact\sset,\s`test-integrity`,\sevent\scounts,\sshun\stable,\sand\sphantoms\s—\sit\swould\sneed\sits\sthird\sstep\sswapped\sfrom\sserve-and-clone\sto\sone\scommand,\sand\swould\sthen\sbe\stesting\sthis\sverb.\n\n##\sOpen\squestions\n\n-\s**SQLite.**\szit\shas\sno\sSQLite\sdependency\sand\sdeliberately\sreads\snone\son\simport\s—\s`import-fossil`\suses\sthe\ssync\sprotocol\sprecisely\sto\savoid\sit.\sWriting\sa\s`.fossil`\smeans\swriting\sSQLite's\sfile\sformat.\sVendoring\sSQLite\sfor\sone\sverb\sis\sa\slarge\sdependency\sfor\sa\snarrow\sfeature;\semitting\sthe\sformat\sdirectly\sis\sa\sreal\samount\sof\scode\sand\sa\scompatibility\ssurface\sthat\swill\soutlive\sthe\sreason\sfor\sit.\s**This\sis\sthe\sdecision\sthe\sissue\sturns\son**,\sand\sit\sdeserves\san\sanswer\sbefore\sany\simplementation.\n-\s**Which\stables.**\sAs\sabove:\s`blob`/`delta`\splus\sa\s`rebuild`\son\sthe\sfar\sside,\sor\sthe\sfull\sderived\sset.\n-\s**The\sshun\stable.**\sA\sclone\sadopts\sit\s(#73).\sAn\sexport\smust\scarry\sit,\sor\sthe\sexported\srepository\swould\sserve\scontent\sits\sorigin\swas\sordered\sto\sremove.\n-\s**Compression\sparity.**\szit's\sframes\sand\sfossil's\sblobs\sboth\suse\sthe\s§4.1\scontainer.\sWhether\sbytes\scan\sbe\smoved\sacross\swithout\sre-compressing\sis\sworth\schecking\s—\sit\sdecides\swhether\sthis\sis\san\sO(store)\scopy\sor\san\sO(store)\srecompress.\n\n##\sNot\sasking\sfor\n\nA\sgeneral\sfossil\swriter,\sa\s`--rebuild`\smode,\sor\sincremental\sexport.\sOne\sfile,\swhole\srepository,\sone\scommand.
J status open
J title export\sa\srepository\sas\sa\ssingle\s.fossil\sfile,\swithout\sserving\sit
J type feature
K 6f5995173d9bae904977e9212d74721ded55da81
U dmestas
Z 888cb78f1351a519565b5b7063557f55