diff --git a/rhodecode/lib/vcs/backends/git/changeset.py b/rhodecode/lib/vcs/backends/git/changeset.py --- a/rhodecode/lib/vcs/backends/git/changeset.py +++ b/rhodecode/lib/vcs/backends/git/changeset.py @@ -2,22 +2,21 @@ import re from itertools import chain from dulwich import objects from subprocess import Popen, PIPE -import rhodecode + from rhodecode.lib.vcs.conf import settings -from rhodecode.lib.vcs.exceptions import RepositoryError -from rhodecode.lib.vcs.exceptions import ChangesetError -from rhodecode.lib.vcs.exceptions import NodeDoesNotExistError -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, EmptyChangeset -from rhodecode.lib.vcs.nodes import FileNode, DirNode, NodeKind, RootNode, \ - RemovedFileNode, SubModuleNode, ChangedFileNodesGenerator,\ - AddedFileNodesGenerator, RemovedFileNodesGenerator -from rhodecode.lib.vcs.utils import safe_unicode -from rhodecode.lib.vcs.utils import date_fromtimestamp +from rhodecode.lib.vcs.exceptions import ( + RepositoryError, ChangesetError, NodeDoesNotExistError, VCSError, + ChangesetDoesNotExistError, ImproperArchiveTypeError +) +from rhodecode.lib.vcs.nodes import ( + FileNode, DirNode, NodeKind, RootNode, RemovedFileNode, SubModuleNode, + ChangedFileNodesGenerator, AddedFileNodesGenerator, RemovedFileNodesGenerator +) +from rhodecode.lib.vcs.utils import ( + safe_unicode, safe_str, safe_int, date_fromtimestamp +) from rhodecode.lib.vcs.utils.lazy import LazyProperty -from rhodecode.lib.utils2 import safe_int, safe_str class GitChangeset(BaseChangeset): @@ -187,8 +186,7 @@ class GitChangeset(BaseChangeset): """ Returns list of children changesets. """ - rev_filter = _git_path = rhodecode.CONFIG.get('git_rev_filter', - '--all').strip() + rev_filter = _git_path = settings.GIT_REV_FILTER so, se = self.repository.run_git_command( "rev-list %s --children | grep '^%s'" % (rev_filter, self.raw_id) ) @@ -373,7 +371,7 @@ class GitChangeset(BaseChangeset): frmt = 'zip' else: frmt = 'tar' - _git_path = rhodecode.CONFIG.get('git_path', 'git') + _git_path = settings.GIT_EXECUTABLE_PATH cmd = '%s archive --format=%s --prefix=%s/ %s' % (_git_path, frmt, prefix, self.raw_id) if kind == 'tgz': @@ -472,8 +470,8 @@ class GitChangeset(BaseChangeset): """ Get's a fast accessible file changes for given changeset """ - a, m, d = self._changes_cache - return list(a.union(m).union(d)) + added, modified, deleted = self._changes_cache + return list(added.union(modified).union(deleted)) @LazyProperty def _diff_name_status(self): @@ -516,11 +514,11 @@ class GitChangeset(BaseChangeset): :param status: one of: *added*, *modified* or *deleted* """ - a, m, d = self._changes_cache + added, modified, deleted = self._changes_cache return sorted({ - 'added': list(a), - 'modified': list(m), - 'deleted': list(d)}[status] + 'added': list(added), + 'modified': list(modified), + 'deleted': list(deleted)}[status] ) @LazyProperty