# HG changeset patch # User Anton Shestakov # Date 2018-05-31 10:39:35 # Node ID 9ed3527019b5f214558aae2a37e507674ac08bfa # Parent d6aa1fc8292f81594cabc82eb3eff5877fabcb75 monoblue: don't show '[up]' in file view when in root directory already diff --git a/mercurial/templates/monoblue/manifest.tmpl b/mercurial/templates/monoblue/manifest.tmpl --- a/mercurial/templates/monoblue/manifest.tmpl +++ b/mercurial/templates/monoblue/manifest.tmpl @@ -33,13 +33,7 @@

{path|escape} {alltags}

- - - - - - - + {ifeq(path, up, '', updirentry)} {dentries%direntry} {fentries%fileentry}
drwxr-xr-x[up]
diff --git a/mercurial/templates/monoblue/map b/mercurial/templates/monoblue/map --- a/mercurial/templates/monoblue/map +++ b/mercurial/templates/monoblue/map @@ -59,6 +59,16 @@ fileellipses = '...' changelogentry = changelogentry.tmpl changeset = changeset.tmpl manifest = manifest.tmpl +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 @@ -312,13 +312,7 @@ manifest with descending (monoblue)

/ draft default tip

- - - - - - - + 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 @@ -754,7 +754,6 @@ Set up the repo
  • graph
  • changeset
  • zip
  • - dir @@ -817,7 +816,6 @@ Set up the repo
  • graph
  • changeset
  • zip
  • - dir diff --git a/tests/test-hgweb.t b/tests/test-hgweb.t --- a/tests/test-hgweb.t +++ b/tests/test-hgweb.t @@ -812,6 +812,10 @@ no '[up]' entry in file view when in roo [1] $ get-with-headers.py localhost:$HGPORT 'file/tip/da?style=gitweb' | grep -F '[up]' [up] + $ get-with-headers.py localhost:$HGPORT 'file/tip?style=monoblue' | grep -F '[up]' + [1] + $ get-with-headers.py localhost:$HGPORT 'file/tip/da?style=monoblue' | grep -F '[up]' + [up] no style can be loaded from directories other than the specified paths
    drwxr-xr-x[up]
    drwxr-xr-x [up] files [up] files