Patchwork D8298: tests: add test for remotefilelog interactions with hgweb

login
register
mail settings
Submitter phabricator
Date March 17, 2020, 9:44 p.m.
Message ID <differential-rev-PHID-DREV-37lvgwp3kbixtqexvh7z-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/45812/
State Superseded
Headers show

Comments

phabricator - March 17, 2020, 9:44 p.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  It's not uncommon for hg users to rely on hgweb as a simple GUI and
  history browser (I do this all the time on Mercurial), but we lack any
  tests to ensure things keep working.
  
  At present, this merely demonstrates the "view contents of a single
  file" endpoint is broken. I'll fix that in a subsequent change.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8298

AFFECTED FILES
  tests/test-remotefilelog-hgweb.t

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-remotefilelog-hgweb.t b/tests/test-remotefilelog-hgweb.t
new file mode 100644
--- /dev/null
+++ b/tests/test-remotefilelog-hgweb.t
@@ -0,0 +1,32 @@ 
+#require no-windows serve
+
+  $ . "$TESTDIR/remotefilelog-library.sh"
+
+  $ cat >> $HGRCPATH <<EOF
+  > [extensions]
+  > remotefilelog=
+  > share=
+  > EOF
+
+  $ hg init master
+  $ cd master
+  $ cat >> .hg/hgrc <<EOF
+  > [remotefilelog]
+  > server=True
+  > EOF
+  $ echo x > x
+  $ hg commit -qAm x
+
+  $ cd ..
+
+
+  $ hgcloneshallow ssh://user@dummy/master wdir --noupdate -q
+  $ cd wdir
+  $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
+  $ cat hg.pid >> $DAEMON_PIDS
+  $ (get-with-headers.py localhost:$HGPORT 'file/tip/x')
+  500 Internal Server Error
+  
+  Internal Server Error (no-eol)
+  [1]
+