# HG changeset patch # User Marcin Kuzminski # Date 2019-06-06 11:36:14 # Node ID 48e3ba7a8a44031f0edb961d5b6124440be8db00 # Parent 206336e24b673b671f3723ad4f385a99c823ab09 files: ensure we generate archives with consistent hashing (except for .tar.gz which uses temp files names in header) diff --git a/rhodecode/apps/repository/views/repo_files.py b/rhodecode/apps/repository/views/repo_files.py --- a/rhodecode/apps/repository/views/repo_files.py +++ b/rhodecode/apps/repository/views/repo_files.py @@ -312,7 +312,7 @@ class RepoFilesView(RepoAppView): return Response(_('Empty repository')) try: - at_path = commit.get_node(at_path).path + at_path = commit.get_node(at_path).path or default_at_path except Exception: return Response(_('No node at path {} for this repository').format(at_path)) diff --git a/rhodecode/lib/vcs/backends/base.py b/rhodecode/lib/vcs/backends/base.py --- a/rhodecode/lib/vcs/backends/base.py +++ b/rhodecode/lib/vcs/backends/base.py @@ -1119,7 +1119,7 @@ class BaseCommit(object): prefix = self._validate_archive_prefix(prefix) - mtime = mtime or time.mktime(self.date.timetuple()) + mtime = mtime is not None or time.mktime(self.date.timetuple()) file_info = [] cur_rev = self.repository.get_commit(commit_id=self.raw_id) @@ -1132,8 +1132,8 @@ class BaseCommit(object): if write_metadata: metadata = [ ('repo_name', self.repository.name), - ('rev', self.raw_id), - ('create_time', mtime), + ('commit_id', self.raw_id), + ('mtime', mtime), ('branch', self.branch), ('tags', ','.join(self.tags)), ]