[PATCH 3 of 4] test-commandserver: generate files with a fixed EOL for test stability

Yuya Nishihara yuya at tcha.org
Fri Oct 2 10:12:09 CDT 2015


On Thu, 01 Oct 2015 23:05:02 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1443750590 14400
> #      Thu Oct 01 21:49:50 2015 -0400
> # Node ID a7393d1757e9b0a91a29525c00cbe7cad9e6cb42
> # Parent  cd207b634473a3453e1c883356b0fe0f082bc74d
> test-commandserver: generate files with a fixed EOL for test stability
> 
> The hashes were different on Windows.
> 
> diff --git a/tests/test-commandserver.t b/tests/test-commandserver.t
> --- a/tests/test-commandserver.t
> +++ b/tests/test-commandserver.t
> @@ -378,7 +378,10 @@
>    ...     runcommand(server, ['log', '-qr', 'draft()'])
>    ...     # create draft commits by another process
>    ...     for i in xrange(5, 7):
> -  ...         os.system('echo a >> a')
> +  ...         f = open('a', 'ab')
> +  ...         f.seek(0, os.SEEK_END)
> +  ...         f.write('a\n')
> +  ...         f.close()

Oops, my bad. It was cmd.exe.
Pushed the series to clowncopter, thanks.


More information about the Mercurial-devel mailing list