Ver código fonte

Merge pull request #5570 from Gu1nness/5491-stats-repo-location

create: add repository location to --stats output, fixes #5491
TW 4 anos atrás
pai
commit
908ea73949
1 arquivos alterados com 4 adições e 1 exclusões
  1. 4 1
      src/borg/archive.py

+ 4 - 1
src/borg/archive.py

@@ -497,6 +497,7 @@ class Archive:
 
     def __str__(self):
         return '''\
+Repository: {location}
 Archive name: {0.name}
 Archive fingerprint: {0.fpr}
 Time (start): {start}
@@ -508,7 +509,9 @@ Utilization of max. archive size: {csize_max:.0%}
             self,
             start=OutputTimestamp(self.start.replace(tzinfo=timezone.utc)),
             end=OutputTimestamp(self.end.replace(tzinfo=timezone.utc)),
-            csize_max=self.cache.chunks[self.id].csize / MAX_DATA_SIZE)
+            csize_max=self.cache.chunks[self.id].csize / MAX_DATA_SIZE,
+            location=self.repository._location.canonical_path()
+)
 
     def __repr__(self):
         return 'Archive(%r)' % self.name