monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Crash on git_export


From: Derek Scherger
Subject: Re: [Monotone-devel] Crash on git_export
Date: Wed, 16 Dec 2009 23:24:20 -0700


On Wed, Dec 16, 2009 at 9:35 AM, Phil Hannent <address@hidden> wrote:
Does the git crash log contain anything helpful?
Not that I can tell, attached.

Yeah, it looks almost completely empty. I suspect it's crashing on the first blob.
 
I assume you must be running through a pipe and it doesn't look like your database is all that big, so can you export to a file and import from that?
To be honest I am not sure how I would go about that?  I have just tried:

$ mtn git_export --db ../lynx.mtn --refs=revs --authors-file=authors_map.txt --use-one-changelog > text.txt

When I do:
less text.txt

The line ending are ^M oddly.

I assume you're running in cygwin or something. Does 'od -c text.txt' show \r\n at the end of the blob command? If it does that looks even more like it is the problem. The export writes its data to std::cout which probably needs to be re-opened in binary mode to avoid translating line endings from \n to \r\n. I'm not sure there's a platform independent way of doing this and I don't have a windows development environment set up to test on so I'm not going to be much help with getting it fixed. Maybe someone else who does have a windows environment set up could have a quick look?

Is there any chance that the pipe or something else is turning blob\n" into "blob\r\n" and the unsupported command is "blob\r" ?
Could well be.  I guess I might be the first person to try this on Windows.

Entirely possible.
 
Once you have exported to a file can you import the first half of the file, the first quarter, or the first few revs?
I am not sure how to pipe the file into git.

Something like:

$ git fast-import < text.txt
 
You could also possibly try removing the \r's from the file with sed or tr but this is likely to fail if any of the blobs have embedded binary data that contain \r's that should be preserved.

Cheers,
Derek


reply via email to

[Prev in Thread] Current Thread [Next in Thread]