view tests/test-convert-svn-tags.t @ 37827:11ee9bf24791 stable

hgweb: discard Content-Type header for 304 responses (issue5844) A side-effect of 98baf8dea553 was that hgwebdir always sets a global default for the Content-Type header. HTTP 304 responses don't allow the Content-Type header. So a side-effect of this change was that HTTP 304 responses served via hgwebdir resulted in a ProgrammingError being raised. This commit teaches our 304 response issuing code to drop the Content-Type header. Differential Revision: https://phab.mercurial-scm.org/D3435
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 30 Apr 2018 17:22:20 -0700
parents 7a9cbb315d84
children
line wrap: on
line source

#require svn svn-bindings

  $ cat >> $HGRCPATH <<EOF
  > [extensions]
  > convert =
  > EOF

  $ svnadmin create svn-repo
  $ svnadmin load -q svn-repo < "$TESTDIR/svn/tags.svndump"

Convert
  $ hg convert --datesort svn-repo A-hg
  initializing destination A-hg repository
  scanning source...
  sorting...
  converting...
  5 init projA
  4 adda
  3 changea
  2 changea2
  1 changea3
  0 changea
  updating tags

  $ cd A-hg
  $ hg log -G --template '{rev} {desc|firstline} tags: {tags}\n'
  o  6 update tags tags: tip
  |
  o  5 changea tags: trunk.goodtag
  |
  o  4 changea3 tags:
  |
  o  3 changea2 tags: trunk.v1
  |
  o  2 changea tags:
  |
  o  1 adda tags:
  |
  o  0 init projA tags:
  

  $ hg tags -q
  tip
  trunk.goodtag
  trunk.v1

  $ cd ..

Convert without tags

  $ hg convert --datesort --config convert.svn.tags= svn-repo A-notags-hg
  initializing destination A-notags-hg repository
  scanning source...
  sorting...
  converting...
  5 init projA
  4 adda
  3 changea
  2 changea2
  1 changea3
  0 changea

  $ hg -R A-notags-hg tags -q
  tip