From a3c6eaa2a4bb3873f7e137b48603f9c2c552b39d Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Fri, 7 Apr 2023 02:47:32 -0700 Subject: Add sync --upload (mga#2868) This will automatically upload any changed binrepo files and update sha1.lst to match. Using --dryrun will show any changed files but not upload or change anything. --- MgaRepo/commands/sync.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'MgaRepo/commands') diff --git a/MgaRepo/commands/sync.py b/MgaRepo/commands/sync.py index 54f5635..9f318e1 100644 --- a/MgaRepo/commands/sync.py +++ b/MgaRepo/commands/sync.py @@ -8,12 +8,14 @@ Usage: mgarepo sync Will add or remove from the working copy those files added or removed in the spec file. -It will not commit the changes. +It will not commit the changes, but it will upload or download binrepo files +when -u or -d are given. Options: --dry-run Print results without changing the working copy --download -d Try to download the source files not found + --upload -u Upload changed source files and update sha1.lst -h Show this message Examples: @@ -30,6 +32,8 @@ def parse_options(): action="store_true") parser.add_option("-d", "--download", dest="download", default=False, action="store_true") + parser.add_option("-u", "--upload", dest="up", default=False, + action="store_true") opts, args = parser.parse_args() # TODO: # Completely remove -c switch from code -- cgit v1.2.1