From f9132687e35ce1d2f57ca04403a95c787b7cabfc Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Tue, 14 Jun 2022 15:17:30 +0200 Subject: [PATCH 1/3] fix selftest count --- src/borg/selftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/borg/selftest.py b/src/borg/selftest.py index 00356cd0e..1bef011c2 100644 --- a/src/borg/selftest.py +++ b/src/borg/selftest.py @@ -33,7 +33,7 @@ SELFTEST_CASES = [ ChunkerTestCase, ] -SELFTEST_COUNT = 37 +SELFTEST_COUNT = 38 class SelfTestResult(TestResult): From 72994a4432567e0b3f087066c87ac309f9d52540 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Tue, 14 Jun 2022 15:40:09 +0200 Subject: [PATCH 2/3] also test pull requests against borg2 branch --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf14f2397..9f91adb7f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ on: - 'requirements.d/*' - '!docs/**' pull_request: - branches: [ master ] + branches: [ master, borg2 ] paths: - '**.py' - '**.pyx' From c01f3527e5b7fffbe3e7634c7486a126c99e67e7 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Tue, 14 Jun 2022 15:42:30 +0200 Subject: [PATCH 3/3] fix linter errors --- src/borg/archiver.py | 2 +- src/borg/cache.py | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/borg/archiver.py b/src/borg/archiver.py index 1a46e4350..c92ba7e05 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -1356,7 +1356,7 @@ class Archiver: tarinfo.uid = item.uid tarinfo.gid = item.gid tarinfo.uname = item.get('user', '') - tarinfo.gname = item.get('group', '') + tarinfo.gname = item.get('group', '') # The linkname in tar has 2 uses: # for symlinks it means the destination, while for hardlinks it refers to the file. # Since hardlinks in tar have a different type code (LNKTYPE) the format might diff --git a/src/borg/cache.py b/src/borg/cache.py index 784910673..d5d87f74d 100644 --- a/src/borg/cache.py +++ b/src/borg/cache.py @@ -1,5 +1,4 @@ import configparser -import json import os import shutil import stat @@ -655,8 +654,6 @@ class LocalCache(CacheStatsMixin): archive indexes. """ archive_path = os.path.join(self.path, 'chunks.archive.d') - # An index of chunks whose size had to be fetched - chunks_fetched_size_index = ChunkIndex() # Instrumentation processed_item_metadata_bytes = 0 processed_item_metadata_chunks = 0