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

Ryan McElroy rmcelroy at fb.com
Fri Oct 2 16:33:45 CDT 2015


# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1443750590 14400
#      Thu Oct 01 21:49:50 2015 -0400
# Node ID 46984a5308a0525d3d5718ebeeec782e96319fe5
# Parent  1f8208a7277e9c9772d719f10e0df0daa2a83d9f
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()
   ...         os.system('hg commit -Aqm%d' % i)
   ...     # new commits should be listed as draft revisions
   ...     runcommand(server, ['log', '-qr', 'draft()'])


More information about the Mercurial-devel mailing list