bzr-fastimport on Windows
James Westby
jw+debian at jameswestby.net
Mon Mar 10 19:54:32 GMT 2008
On Sat, 2008-03-08 at 18:09 +0800, SuperMMX wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> Hi, all
>
> I am using fastimport to convert SVN to Bazaar with svn-fast-export,
> but have two problems:
>
> 1) If some files in SVN repo are with DOS eol (CRLF), bzr-fastimport will
> fail with invalid command XXX. I don't know much about python, but found out
> that it reads more bytes than expected ( I suppose some CRLFs are ignored).
> While with UNIX eol, it works well.
So, I did some digging and I found the code to dump a file is this:
def dump_file_blob(root, full_path, pool):
stream_length = svn_fs_file_length(root, full_path, pool)
stream = svn_fs_file_contents(root, full_path, pool)
sys.stdout.write("data %s\n" % stream_length)
sys.stdout.flush()
ostream = svn_stream_for_stdout(pool)
svn_stream_copy(stream, ostream, pool)
svn_stream_close(ostream)
sys.stdout.write("\n")
I'm not sure whether this is correct. The code needs to dump out
exactly the contents of the files, with the exact byte length.
I guess the line endings support in svn would interact with this,
though if svn_fs_file_length didn't equal the length of
svn_fs_file_contents I would call it broken.
Can you confirm if you have any line ending properties set on
any of the problematic files?
Thanks,
James
More information about the bazaar
mailing list