diff --git a/gradle/changelog/sub_repos.yaml b/gradle/changelog/sub_repos.yaml new file mode 100644 index 0000000000..b11a16aab3 --- /dev/null +++ b/gradle/changelog/sub_repos.yaml @@ -0,0 +1,2 @@ +- type: fixed + description: Sub repositories in the source view for mercurial repositories diff --git a/scm-plugins/scm-hg-plugin/src/main/resources/sonia/scm/python/fileview.py b/scm-plugins/scm-hg-plugin/src/main/resources/sonia/scm/python/fileview.py index 8eca8bdb68..0bcc1cfe4f 100644 --- a/scm-plugins/scm-hg-plugin/src/main/resources/sonia/scm/python/fileview.py +++ b/scm-plugins/scm-hg-plugin/src/main/resources/sonia/scm/python/fileview.py @@ -29,6 +29,7 @@ Prints date, size and last message of files. from collections import defaultdict from mercurial import scmutil +from builtins import open, bytes cmdtable = {} @@ -177,7 +178,7 @@ class SubRepository: def collect_sub_repositories(revCtx): subrepos = {} try: - hgsub = revCtx.filectx(b'.hgsub').data().split('\n') + hgsub = revCtx.filectx(b'.hgsub').data().split(b'\n') for line in hgsub: parts = line.split(b'=') if len(parts) > 1: @@ -188,9 +189,9 @@ def collect_sub_repositories(revCtx): pass try: - hgsubstate = revCtx.filectx(b'.hgsubstate').data().split('\n') + hgsubstate = revCtx.filectx(b'.hgsubstate').data().split(b'\n') for line in hgsubstate: - parts = line.split(' ') + parts = line.split(b' ') if len(parts) > 1: subrev = parts[0].strip() subrepo = subrepos[parts[1].strip()]