mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-05 04:55:50 +01:00
Fix sub repositories in mercurial
The sub repositories did not show up in the source view. This fixes python errors for the computation of sub repositories in hg. Pushed-by: Rene Pfeuffer<rene.pfeuffer@cloudogu.com> Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
This commit is contained in:
@@ -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()]
|
||||
|
||||
Reference in New Issue
Block a user