[PATCH 3 of 4] test-commandserver: generate files with a fixed EOL for test stability
Matt Harbison
mharbison72 at gmail.com
Thu Oct 1 22:05:02 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 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()
... 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