Directory collapsing not working properly under native Mercurial repositories
Summary
The feature which collapses directories that only contain another directory into a single link in the repository viewer only works if the directories are at the end of the tree under native Mercurial repositories.
Steps to reproduce
-
Create a repository
-
Set up the contents like so:
mkdir -p a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p echo hello > a/b/c/d/test echo hello > a/b/c/d/e/f/g/h/test echo hello > a/b/c/d/e/f/g/h/i/j/k/l/test echo hello > a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/test
-
Push the repo
-
View the repository in the Heptapod web interface.
Example Project
- https://dev.firestick.games/test/directories-hg (native hg)
- https://dev.firestick.games/test/directories-git (git)
- https://dev.firestick.games/test/directories-hg-legacy (legacy hg)
What is the current bug behavior?
In the native hg repository viewer, directories that solely contain another directory do not collapse into a single link unless they're at the end of the directory tree.
So in the example, a/b/c/d
then e/f/g/h
then i/j/k/l
do not collapse, but then m/n/o/p
does.
This is particularly annoying for Java projects, where you have a structure with a long chain of directories like:
- src/main/java/com/example/project
- alfa
- File.java
- bravo
- File.java
- File.java
- alfa
but under a Heptapod hg repo, src/main/java/com/example/project
do not collapse, so you have to click through each one.
What is the expected correct behavior?
The directories which only contain another directory should collapse into one link in the native hg repo regardless of where they are, like they do in the git and legacy hg repos.
Relevant logs and/or screenshots
The logs are very busy but I don't see any errors or anything related to this.
Bug:
Expected:
Details about the Heptapod instance where the bug occurs
Heptapod 1.3.1 Docker image.
Heptapod 1.3.1
Mercurial 6.6.3
hg-evolve 11.1.2
hg-git 1.0.5 (dulwich 0.20.50)
GitLab 16.9.3
Heptapod Shell 14.33.0
Heptapod Workhorse 1.3.1
GitLab API v4
GitLab Pages 16.9.3
GitLab KAS v16.9.2
Python 3.9.17
Ruby 3.1.4p223
Rails 7.0.8
PostgreSQL (main) 13.14
PostgreSQL (ci) 13.14
Redis 7.0.15