Skip to content

Commit

Permalink
chore: Merge branch 'main' of https://github.com/CCBR/spacesavers2
Browse files Browse the repository at this point in the history
  • Loading branch information
kopardev committed Jul 16, 2024
2 parents ab322f0 + 7e23327 commit 22f0143
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 9 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/techdev-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Add issues/PRs to the TechDev project

on:
issues:
types:
- opened
pull_request:
types:
- opened

jobs:
add-to-project:
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v1.0.2
with:
project-url: https://github.com/orgs/CCBR/projects/17
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
File renamed without changes.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

### Bug fixes

## spacesavers2 v0.14.0

- resolved #102

### New features

## spacesavers2 v0.13.0

### New features
Expand Down
15 changes: 7 additions & 8 deletions spacesavers2_mimeo
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ def process_hh(
if foldest.uid == uid or 0 == uid : user_owns_original = True
uid_file_index = list(filter(lambda x:x!=oldest_index,uid_file_index)) # remove oldest if present in list
inodes_already_summerized = [foldest.inode]
if user_owns_original:
fpaths = foldest.get_paths(mindepth, maxdepth)
for p in fpaths:
perfolder_summaries[p].nnondup_files += 1
perfolder_summaries[p].non_dup_Bytes.append(foldest.calculated_size)
perfolder_summaries[p].non_dup_ages.append(foldest.mtime)
# if hashhash[h].ndup_files > 0: # we have duplicates
if len(uid_file_index) > 0: # uid has copies
for i in uid_file_index:
Expand All @@ -66,7 +72,7 @@ def process_hh(
fpaths = f.get_paths(mindepth, maxdepth)
if f.inode in inodes_already_summerized: # it is a hardlink
for p in fpaths:
perfolder_summaries[p].ndup_files += 1
perfolder_summaries[p].nnondup_files += 1
else:
inodes_already_summerized.append(f.inode)
if not parent in perfolder_dups:
Expand All @@ -76,13 +82,6 @@ def process_hh(
perfolder_summaries[p].ndup_files+=1
perfolder_summaries[p].dup_Bytes.append(f.calculated_size)
perfolder_summaries[p].dup_ages.append(f.mtime)
else: # we only have 1 original file
if user_owns_original:
fpaths = foldest.get_paths(mindepth, maxdepth)
for p in fpaths:
perfolder_summaries[p].nnondup_files += 1
perfolder_summaries[p].non_dup_Bytes.append(foldest.calculated_size)
perfolder_summaries[p].non_dup_ages.append(foldest.mtime)
out_index = []
out_index.append(oldest_index)
out_index.extend(uid_file_index)
Expand Down
2 changes: 1 addition & 1 deletion src/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.13.0
0.14.0

0 comments on commit 22f0143

Please sign in to comment.