Mercurial > kallithea
changeset 8053:39ba3ee88c7c
vcs: use more correct git revision identifiers
It will have the right types and make a difference for py3.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Tue, 31 Dec 2019 15:39:17 +0100 |
parents | 838bdb265025 |
children | 79ca7a9fdb6e |
files | kallithea/lib/vcs/backends/git/changeset.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/vcs/backends/git/changeset.py Sun Dec 22 13:32:44 2019 +0100 +++ b/kallithea/lib/vcs/backends/git/changeset.py Tue Dec 31 15:39:17 2019 +0100 @@ -40,7 +40,7 @@ self._author_property = 'author' self._date_property = 'commit_time' self._date_tz_property = 'commit_timezone' - self.revision = repository.revisions.index(revision) + self.revision = repository.revisions.index(self.raw_id) self.nodes = {} self._paths = {} @@ -91,7 +91,7 @@ # that might not make sense in Git where branches() is a better match # for the basic model heads = self.repository._heads(reverse=False) - ref = heads.get(self.raw_id) + ref = heads.get(self._commit.id) if ref: return safe_unicode(ref) @@ -505,8 +505,8 @@ if isinstance(parent, EmptyChangeset): oid = None else: - oid = _r[parent.raw_id].tree - changes = _r.object_store.tree_changes(oid, _r[self.raw_id].tree) + oid = _r[parent._commit.id].tree + changes = _r.object_store.tree_changes(oid, _r[self._commit.id].tree) for (oldpath, newpath), (_, _), (_, _) in changes: if newpath and oldpath: modified.add(newpath)