tests/test-update-branches.out
author Ry4an Brase <ry4an-hg@ry4an.org>
Mon, 20 Sep 2010 14:56:08 -0500
branchstable
changeset 12570 a72c5ff1260c
parent 9717 68a1b9d0663e
permissions -rw-r--r--
Correct Content-Type header values for archive downloads. The content type for both .tar.gz and .tar.bz2 downloads was application/x-tar, which is correct for .tar files when no Content-Encoding is present, but is not correct for .tar.gz and .tar.bz2 files unless Content-Encoding is set to gzip or x-bzip2, respectively. However, setting Content-Encoding causes browsers to undo that encoding during download, when a .gz or .bz2 file is usually the desired artifact. Omitting the Content-Encoding header is preferred to avoid having browsers uncompress non-render-able files. Additionally, the Content-Disposition line indicates a final desired filename with .tar.gz or .tar.bz2 extension which makes providing a Content-Encoding header inappropriate. With the current configuration browsers (Chrome and Firefox thus far) are registering the application/x-tar Content-Type and not .tar extension and appending that extension, yielding filename.tar.gz.tar as a final on-disk artifact. This was originally reported here: http://stackoverflow.com/questions/3753659 I've changed the .tar.gz and .tar.bz2 Content-Type values to application/x-gzip and application/x-bzip2, respectively. Which yields correctly named download artifacts on Firefox, Chrome, and IE.

% initial repo state

@  5:e1bb631146ca  b1
|
o  4:a4fdb3b883c4 0:b608b9236435  b1
|
| o  3:4b57d2520816 1:44592833ba9f
| |
| | o  2:063f31070f65
| |/
| o  1:44592833ba9f
|/
o  0:b608b9236435

% norevtest none clean linear 4
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
parent=5
% norevtest none clean same 2
abort: crosses branches (use 'hg merge' or use 'hg update -c')
parent=2
% revtest none clean linear 1 2
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
parent=2
% revtest none clean same 2 3
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
parent=3
% revtest none clean cross 3 4
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
parent=4
% revtest none dirty linear 1 2
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
parent=2
M foo
% revtest none dirty same 2 3
abort: crosses branches (use 'hg merge' to merge or use 'hg update -C' to discard changes)
parent=2
M foo
% revtest none dirty cross 3 4
abort: crosses branches (use 'hg merge' to merge or use 'hg update -C' to discard changes)
parent=3
M foo
% revtest -C dirty linear 1 2
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
parent=2
% revtest -c dirty linear 1 2
abort: uncommitted local changes
parent=1
M foo
% norevtest -c clean same 2
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
parent=3
% revtest -cC dirty linear 1 2
abort: cannot specify both -c/--check and -C/--clean
parent=1
M foo