# HG changeset patch # User Anton Shestakov # Date 1527760914 -28800 # Node ID c2e3bc99fba43d1c9decad9b54c31c502cc774f9 # Parent 45765264ae3a5a3990e9467109a1289b2948774e paper: don't show '[up]' in file view when in root directory already diff -r 45765264ae3a -r c2e3bc99fba4 mercurial/templates/paper/manifest.tmpl --- a/mercurial/templates/paper/manifest.tmpl Thu May 31 16:52:02 2018 +0800 +++ b/mercurial/templates/paper/manifest.tmpl Thu May 31 18:01:54 2018 +0800 @@ -46,11 +46,7 @@ - - [up] - - drwxr-xr-x - +{ifeq(path, up, '', updirentry)} {dentries%direntry} {fentries%fileentry} diff -r 45765264ae3a -r c2e3bc99fba4 mercurial/templates/paper/map --- a/mercurial/templates/paper/map Thu May 31 16:52:02 2018 +0800 +++ b/mercurial/templates/paper/map Thu May 31 18:01:54 2018 +0800 @@ -41,6 +41,15 @@ navgraph = '{before%navgraphentry}{after%navgraphentry}' filenav = '{before%filenaventry}{after%filenaventry}' +updirentry = ' + + + [up] + + + drwxr-xr-x + ' + direntry = ' diff -r 45765264ae3a -r c2e3bc99fba4 tests/test-hgweb-descend-empties.t --- a/tests/test-hgweb-descend-empties.t Thu May 31 16:52:02 2018 +0800 +++ b/tests/test-hgweb-descend-empties.t Thu May 31 18:01:54 2018 +0800 @@ -93,11 +93,7 @@ - - [up] - - drwxr-xr-x - + @@ -213,11 +209,7 @@ - - [up] - - drwxr-xr-x - + diff -r 45765264ae3a -r c2e3bc99fba4 tests/test-hgweb-empty.t --- a/tests/test-hgweb-empty.t Thu May 31 16:52:02 2018 +0800 +++ b/tests/test-hgweb-empty.t Thu May 31 18:01:54 2018 +0800 @@ -396,11 +396,7 @@ - - [up] - - drwxr-xr-x - + diff -r 45765264ae3a -r c2e3bc99fba4 tests/test-hgweb-symrev.t --- a/tests/test-hgweb-symrev.t Thu May 31 16:52:02 2018 +0800 +++ b/tests/test-hgweb-symrev.t Thu May 31 18:01:54 2018 +0800 @@ -72,7 +72,6 @@
  • changeset
  • zip directory / @ 2:9d8c40cba617 - [up] @@ -138,7 +137,6 @@
  • changeset
  • zip directory / @ 1:a7c1559b7bba - [up] @@ -272,7 +270,6 @@
  • changeset
  • zip directory / @ 2:9d8c40cba617 - [up] @@ -338,7 +335,6 @@
  • changeset
  • zip directory / @ 1:a7c1559b7bba - [up] diff -r 45765264ae3a -r c2e3bc99fba4 tests/test-hgweb.t --- a/tests/test-hgweb.t Thu May 31 16:52:02 2018 +0800 +++ b/tests/test-hgweb.t Thu May 31 18:01:54 2018 +0800 @@ -287,11 +287,7 @@ - - [up] - - drwxr-xr-x - + @@ -802,6 +798,17 @@ 200 Script output follows changeset 0:2ef0ac749a14 +no '[up]' entry in file view when in root directory + + $ get-with-headers.py localhost:$HGPORT 'file/tip?style=paper' | grep -F '[up]' + [1] + $ get-with-headers.py localhost:$HGPORT 'file/tip/da?style=paper' | grep -F '[up]' + [up] + $ get-with-headers.py localhost:$HGPORT 'file/tip?style=coal' | grep -F '[up]' + [1] + $ get-with-headers.py localhost:$HGPORT 'file/tip/da?style=coal' | grep -F '[up]' + [up] + no style can be loaded from directories other than the specified paths $ mkdir -p x/templates/fallback