# HG changeset patch # User Anton Shestakov # Date 1527762829 -28800 # Node ID d6aa1fc8292f81594cabc82eb3eff5877fabcb75 # Parent c2e3bc99fba43d1c9decad9b54c31c502cc774f9 gitweb: don't show '[up]' in file view when in root directory already diff -r c2e3bc99fba4 -r d6aa1fc8292f mercurial/templates/gitweb/manifest.tmpl --- a/mercurial/templates/gitweb/manifest.tmpl Thu May 31 18:01:54 2018 +0800 +++ b/mercurial/templates/gitweb/manifest.tmpl Thu May 31 18:33:49 2018 +0800 @@ -30,13 +30,7 @@
{path|escape} {alltags}
- - - - - - - +{ifeq(path, up, '', updirentry)} {dentries%direntry} {fentries%fileentry}
drwxr-xr-x[up]
diff -r c2e3bc99fba4 -r d6aa1fc8292f mercurial/templates/gitweb/map --- a/mercurial/templates/gitweb/map Thu May 31 18:01:54 2018 +0800 +++ b/mercurial/templates/gitweb/map Thu May 31 18:33:49 2018 +0800 @@ -59,6 +59,16 @@ changelogentry = changelogentry.tmpl changeset = changeset.tmpl manifest = manifest.tmpl +updirentry = ' + + drwxr-xr-x + + + + [up] + +   + ' direntry = ' drwxr-xr-x diff -r c2e3bc99fba4 -r d6aa1fc8292f tests/test-hgweb-descend-empties.t --- a/tests/test-hgweb-descend-empties.t Thu May 31 18:01:54 2018 +0800 +++ b/tests/test-hgweb-descend-empties.t Thu May 31 18:33:49 2018 +0800 @@ -425,13 +425,7 @@
/ draft default tip
- - - - - - - + diff -r c2e3bc99fba4 -r d6aa1fc8292f tests/test-hgweb-symrev.t --- a/tests/test-hgweb-symrev.t Thu May 31 18:01:54 2018 +0800 +++ b/tests/test-hgweb-symrev.t Thu May 31 18:33:49 2018 +0800 @@ -516,7 +516,6 @@ $ "$TESTDIR/get-with-headers.py" $LOCALIP:$HGPORT 'file?style=gitweb' | egrep $REVLINKS changeset | zip | - dirfiles @@ -590,7 +589,6 @@ $ "$TESTDIR/get-with-headers.py" $LOCALIP:$HGPORT 'file/xyzzy?style=gitweb' | egrep $REVLINKS changeset | zip | - dirfiles diff -r c2e3bc99fba4 -r d6aa1fc8292f tests/test-hgweb.t --- a/tests/test-hgweb.t Thu May 31 18:01:54 2018 +0800 +++ b/tests/test-hgweb.t Thu May 31 18:33:49 2018 +0800 @@ -808,6 +808,10 @@ [1] $ get-with-headers.py localhost:$HGPORT 'file/tip/da?style=coal' | grep -F '[up]' [up] + $ get-with-headers.py localhost:$HGPORT 'file/tip?style=gitweb' | grep -F '[up]' + [1] + $ get-with-headers.py localhost:$HGPORT 'file/tip/da?style=gitweb' | grep -F '[up]' + [up] no style can be loaded from directories other than the specified paths
drwxr-xr-x[up]
drwxr-xr-x[up] [up]