From patchwork Thu Mar 19 08:45:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D8299: remotefilelog: add fake heads() method that allows viewing a file in hgweb From: phabricator X-Patchwork-Id: 45826 Message-Id: <86ca7cc6a9d182e7d7c1247b52761924@localhost.localdomain> To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Thu, 19 Mar 2020 08:45:45 +0000 Closed by commit rHG9e63108123a4: remotefilelog: add fake heads() method that allows viewing a file in hgweb (authored by durin42). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D8299?vs=20817&id=20830 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8299/new/ REVISION DETAIL https://phab.mercurial-scm.org/D8299 AFFECTED FILES hgext/remotefilelog/remotefilelog.py tests/test-remotefilelog-hgweb.t CHANGE DETAILS To: durin42, #hg-reviewers, pulkit Cc: mercurial-devel diff --git a/tests/test-remotefilelog-hgweb.t b/tests/test-remotefilelog-hgweb.t --- a/tests/test-remotefilelog-hgweb.t +++ b/tests/test-remotefilelog-hgweb.t @@ -24,9 +24,15 @@ $ 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 + $ get-with-headers.py localhost:$HGPORT 'file/tip/x' | head -n 10 + 200 Script output follows - Internal Server Error (no-eol) - [1] + + + + + + + + diff --git a/hgext/remotefilelog/remotefilelog.py b/hgext/remotefilelog/remotefilelog.py --- a/hgext/remotefilelog/remotefilelog.py +++ b/hgext/remotefilelog/remotefilelog.py @@ -259,6 +259,10 @@ raise RuntimeError(b"len not supported") + def heads(self): + # Fake heads of the filelog to satisfy hgweb. + return [] + def empty(self): return False