Hi, Recently I recognized that plain (aka dumb) that is rather far from working with mtn 0.26. On 0.27 it's better because it works on windows (automate stdio newlines fixed). There is a problem with revision reordering which I almost fixed in my sandbox.
This fix is to recognize all the certs received by Feeder and queue them accordingly to the type: - fdata - write them immediately - fdelta - write them immediately - pubkey - queue - rdata - queue - rcert - queue Then when everything is fed to the Feeder: - write all 'pubkey' - this probably can go unordered - write all 'rdata' (*) - write all 'rcert' (*) The hack is with writing rdata in correct order. Currently after writing each rdata packet mtn 'stderr' is checked if contains: missing prerequisite revision 'REVID' and if text is found then this revision is queued as a child of REVID. Then when REVID is written then all its children are queued again. This is almost correct but certainly that 'stderr' matching is awfully evil. Yes i know. Question: How to obtain parent REV(s) from rdata packet without using 'mtn read' ? Second problem. After finishing packet reordering I found that 'mtnplain' 'pull' to a clean database fails. This error was after following steps: 1. 'mtnplain' -d DB.mtn push SOMEPLACE 2. mtn -d DB2.mtn db init 3. 'mtnplain' -d DB2.mtn pull SOMEPLACE 4. mtn -D DB2.mtn pull file:DB.mtn 4th step was to check if all data were transfered by mtnplain if yes - netsync should transfer nothing; but apparently mtn failed with following error ------------ |06:07:16#23|[EMAIL PROTECTED]|..umb/plain-zbigg|$ mtn -d DB2.mtn pull file:DB.mtn 'net.*' mtn: connecting to file:DB.mtn mtn: finding items to synchronize: mtn: certificates | keys | revisions mtn: 162 | 3 | 54 mtn: warning: error: Mismatched epoch on branch net.venge.monotone.dumb. Server has 'e748431d4147df17a39df80f0c2d72c9d2fa9fb2', client has '0000000000000000000000000000000000000000'. mtn: peer file:DB.mtn disconnected after we informed them of error mtn: warning: protocol error while processing peer stdio: 'received network error: Mismatched epoch on branch net.venge. monotone.dumb. Server has 'e748431d4147df17a39df80f0c2d72c9d2fa9fb2', client has '0000000000000000000000000000000000000000'.' mtn: bytes in | bytes out | certs in | revs in mtn: 129 | 235 | 0 | 0 ------------ Hmm, what is epoch and what should I do while exporting/importing to preserve epoch of a branch? PS. I think that 'plain' is better name for 'dumb'. And my proposition is to name the tool is 'mtnplain'. PS2. Here is latest version of 'mtnplain' http://zzagorski.strony.wi.ps.pl/mtnplain/mtnplain-0.0.3.zip -- Best regards, Zbyszek _______________________________________________ Monotone-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/monotone-devel
