diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py +++ b/mercurial/hgweb/hgwebdir_mod.py @@ -32,7 +32,7 @@ def findrepos(paths): except KeyError: repos.append((prefix, root)) continue - roothead = os.path.normpath(roothead) + roothead = os.path.normpath(os.path.abspath(roothead)) for path in util.walkrepos(roothead, followsym=True, recurse=recurse): path = os.path.normpath(path) name = util.pconvert(path[len(roothead):]).strip('/') diff --git a/tests/test-hgwebdir b/tests/test-hgwebdir --- a/tests/test-hgwebdir +++ b/tests/test-hgwebdir @@ -65,6 +65,8 @@ t/a/=$root/a b=$root/b coll=$root/* rcoll=$root/** +star=* +starstar=** EOF hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ diff --git a/tests/test-hgwebdir.out b/tests/test-hgwebdir.out --- a/tests/test-hgwebdir.out +++ b/tests/test-hgwebdir.out @@ -46,6 +46,15 @@ 200 Script output follows /rcoll/b/ /rcoll/b/d/ /rcoll/c/ +/star/webdir/a/ +/star/webdir/a/.hg/patches/ +/star/webdir/b/ +/star/webdir/c/ +/starstar/webdir/a/ +/starstar/webdir/a/.hg/patches/ +/starstar/webdir/b/ +/starstar/webdir/b/d/ +/starstar/webdir/c/ 200 Script output follows @@ -165,6 +174,78 @@ 200 Script output follows + +star/webdir/a +unknown +Foo Bar <foo.bar@example.com> +seconds ago + + + + +star/webdir/a/.hg/patches +unknown +Foo Bar <foo.bar@example.com> +seconds ago + + + + +star/webdir/b +unknown +Foo Bar <foo.bar@example.com> +seconds ago + + + + +star/webdir/c +unknown +Foo Bar <foo.bar@example.com> +seconds ago + + + + +starstar/webdir/a +unknown +Foo Bar <foo.bar@example.com> +seconds ago + + + + +starstar/webdir/a/.hg/patches +unknown +Foo Bar <foo.bar@example.com> +seconds ago + + + + +starstar/webdir/b +unknown +Foo Bar <foo.bar@example.com> +seconds ago + + + + +starstar/webdir/b/d +unknown +Foo Bar <foo.bar@example.com> +seconds ago + + + + +starstar/webdir/c +unknown +Foo Bar <foo.bar@example.com> +seconds ago + + +