diff options
author | Marcin Kuzminski <marcin@python-works.com> | 2012-05-03 23:15:47 +0200 |
---|---|---|
committer | Marcin Kuzminski <marcin@python-works.com> | 2012-05-03 23:15:47 +0200 |
commit | a5aef18f79d3ebf9cfd2a78274e9e9fcf5c846b1 (patch) | |
tree | fb53b5feeef6cbf16549a2750d320aa0e5feb7ea /rhodecode/lib/vcs/backends/git/changeset.py | |
parent | a624268a17c081eaa2e0c0eac259cc67e88935e0 (diff) |
Implements subrepos view inside filebrowser
- fixes issue #434: Error when accessing files or changesets of a git repository with submodules
--HG--
branch : beta
Diffstat (limited to 'rhodecode/lib/vcs/backends/git/changeset.py')
-rw-r--r-- | rhodecode/lib/vcs/backends/git/changeset.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/rhodecode/lib/vcs/backends/git/changeset.py b/rhodecode/lib/vcs/backends/git/changeset.py index 886ba3b6..f7ea3e42 100644 --- a/rhodecode/lib/vcs/backends/git/changeset.py +++ b/rhodecode/lib/vcs/backends/git/changeset.py @@ -10,7 +10,8 @@ from rhodecode.lib.vcs.exceptions import VCSError from rhodecode.lib.vcs.exceptions import ChangesetDoesNotExistError from rhodecode.lib.vcs.exceptions import ImproperArchiveTypeError from rhodecode.lib.vcs.backends.base import BaseChangeset -from rhodecode.lib.vcs.nodes import FileNode, DirNode, NodeKind, RootNode, RemovedFileNode +from rhodecode.lib.vcs.nodes import FileNode, DirNode, NodeKind, RootNode, \ + RemovedFileNode, SubModuleNode from rhodecode.lib.vcs.utils import safe_unicode from rhodecode.lib.vcs.utils import date_fromtimestamp from rhodecode.lib.vcs.utils.lazy import LazyProperty @@ -329,7 +330,13 @@ class GitChangeset(BaseChangeset): tree = self.repository._repo[id] dirnodes = [] filenodes = [] + als = self.repository.alias for name, stat, id in tree.iteritems(): + if objects.S_ISGITLINK(stat): + dirnodes.append(SubModuleNode(name, url=None, changeset=id, + alias=als)) + continue + obj = self.repository._repo.get_object(id) if path != '': obj_path = '/'.join((path, name)) |