# HG changeset patch # User Anton Shestakov # Date 2018-05-31 10:53:28 # Node ID 273ce823ba5c657623441bcde526e54811c90fb1 # Parent 9ed3527019b5f214558aae2a37e507674ac08bfa spartan: don't show '[up]' in file view when in root directory already diff --git a/mercurial/templates/spartan/manifest.tmpl b/mercurial/templates/spartan/manifest.tmpl --- a/mercurial/templates/spartan/manifest.tmpl +++ b/mercurial/templates/spartan/manifest.tmpl @@ -17,12 +17,7 @@

Mercurial {pathdef%breadcrumb} / files for changeset {node|short}: {path|escape}

- - +{ifeq(path, up, '', updirentry)} {dentries%direntry} {fentries%fileentry}
drwxr-xr-x  -   -   - [up] -
diff --git a/mercurial/templates/spartan/map b/mercurial/templates/spartan/map --- a/mercurial/templates/spartan/map +++ b/mercurial/templates/spartan/map @@ -25,6 +25,16 @@ navshort = '{before%navshortentry}{after navgraph = '{before%navgraphentry}{after%navgraphentry}' filenav = '{before%filenaventry}{after%filenaventry}' +updirentry = ' + + drwxr-xr-x  +   +   + + [up] + + ' + direntry = ' drwxr-xr-x  diff --git a/tests/test-hgweb-descend-empties.t b/tests/test-hgweb-descend-empties.t --- a/tests/test-hgweb-descend-empties.t +++ b/tests/test-hgweb-descend-empties.t @@ -504,12 +504,7 @@ manifest with descending (spartan)

Mercurial / files for changeset c9f45f7a1659: /

- - + diff --git a/tests/test-hgweb-symrev.t b/tests/test-hgweb-symrev.t --- a/tests/test-hgweb-symrev.t +++ b/tests/test-hgweb-symrev.t @@ -956,7 +956,6 @@ Set up the repo changesetzip

Mercurial / files for changeset 9d8c40cba617: /

- @@ -1029,7 +1028,6 @@ Set up the repo changesetzip

Mercurial / files for changeset a7c1559b7bba: /

- diff --git a/tests/test-hgweb.t b/tests/test-hgweb.t --- a/tests/test-hgweb.t +++ b/tests/test-hgweb.t @@ -816,6 +816,10 @@ no '[up]' entry in file view when in roo [1] $ get-with-headers.py localhost:$HGPORT 'file/tip/da?style=monoblue' | grep -F '[up]' [up] + $ get-with-headers.py localhost:$HGPORT 'file/tip?style=spartan' | grep -F '[up]' + [1] + $ get-with-headers.py localhost:$HGPORT 'file/tip/da?style=spartan' | grep -F '[up]' + [up] no style can be loaded from directories other than the specified paths
drwxr-xr-x  -   -   - [up] -
drwxr-xr-x  [up] dir/ foo [up] dir/ foo