Unverified Commit 0e3a3038 authored by Andrej Shadura's avatar Andrej Shadura
Browse files

Retained files shouldn’t count towards newly added

Signed-off-by: Andrej Shadura's avatarAndrej Shadura <andrew.shadura@collabora.co.uk>
parent 003f0a20
......@@ -243,10 +243,10 @@ def do_dput(self, subcmd, opts, *args):
added = set(package.to_be_added)
# We don’t want to create commits with no actual changes.
# We only proceed with the commit in these cases:
# 1. If any new file is added (added are more files than superseded)
# 1. If any new file is added
# 2. Any of the files is of a different size than recorded
# 3. Any of the files has a different MD5 hash than recorded
files_changed = (any(added - superseded) or
files_changed = (any(added - superseded - retained) or
any(os.path.getsize(f) != remote_file_list[f].size for f in superseded & added) or
any(osc.core.dgst(f) != remote_file_list[f].md5 for f in superseded & added))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment