[bzr-fastimport:MERGE] Fix win32

SuperMMX supermmx at gmail.com
Thu Mar 13 01:58:46 GMT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, James Westby <jw+debian at jameswestby.net> :

On Wed, 12 Mar 2008 20:44:53 +0000
James Westby <jw+debian at jameswestby.net> wrote:

> Thanks for the information. The dump that you provided is pretty
> broken with regards to line endings. I didn't look at the file
> contents, but the commands are all terminated wrongly.
> 
> Did you use the python or C version to generate them?

Python version.

> Could you try the following patch to the python svn-fast-export.py
> please?
> 
> diff --git a/svn-fast-export.py b/svn-fast-export.py
> index 77496f1..f2719ae 100755
> --- a/svn-fast-export.py
> +++ b/svn-fast-export.py
> @@ -155,6 +155,12 @@ if __name__ == '__main__':
>      if repos_path == '.': 
>          repos_path = ''
>  
> +    try:
> +        import msvcrt
> +        msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
> +    except ImportError:
> +        pass
> +
>      # Call the app-wrapper, which takes care of APR
> initialization/shutdown
>      # and the creation and cleanup of our top-level memory pool.
>      run_app(crawl_revisions, repos_path)

It works great, thank you.

So the problem is TEXT vs BINARY mode of input and output. Solved.
- -- 
A. Because it makes the logic of the discussion difficult to follow.
Q. Why shoudn't I top post?
A. No.
Q Should I top post?

A: Because it destroys the flow of the conversation
Q: Why is it bad?
A: No, it's bad.
Q: Should I top post in replies to mailing lists? 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)

iEYEARECAAYFAkfYilcACgkQYjhzyV/TMxsF8gCfQmuL1YsLG4eHwjwhekB1Ijia
soYAni9R3p7SPxaA9DiEi+DjppIacuQ+
=rJI2
-----END PGP SIGNATURE-----



More information about the bazaar mailing list