Mercurial > public > mercurial-scm > hg
comparison tests/get-with-headers.py @ 31791:39f6333e968c
tests: store ETag when using --headeronly
Previously, --headeronly would prevent --twice from working
because the ETag wasn't stored when --headeronly was used.
This feels like a bug. That feeling is reaffirmed by the fact
that this change doesn't regress any tests.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 01 Apr 2017 00:21:52 -0700 |
parents | e75463e3179f |
children | 32317f8bbe2a |
comparison
equal
deleted
inserted
replaced
31790:62f9679df1f2 | 31791:39f6333e968c |
---|---|
76 for line in lines: | 76 for line in lines: |
77 print(line.rstrip()) | 77 print(line.rstrip()) |
78 else: | 78 else: |
79 sys.stdout.write(data) | 79 sys.stdout.write(data) |
80 | 80 |
81 if twice and response.getheader('ETag', None): | 81 if twice and response.getheader('ETag', None): |
82 tag = response.getheader('ETag') | 82 tag = response.getheader('ETag') |
83 | 83 |
84 return response.status | 84 return response.status |
85 | 85 |
86 status = request(sys.argv[1], sys.argv[2], sys.argv[3:]) | 86 status = request(sys.argv[1], sys.argv[2], sys.argv[3:]) |
87 if twice: | 87 if twice: |