diff options
author | Dan Fandrich <danf@mageia.org> | 2023-04-17 10:19:28 -0700 |
---|---|---|
committer | Dan Fandrich <danf@mageia.org> | 2023-04-17 10:54:04 -0700 |
commit | 4af747cb2a25eb5cb9bce1c560676e75d8153121 (patch) | |
tree | 2d85a2b9f5c4d152061dd02805a120dceefd5861 /MgaRepo/rpmutil.py | |
parent | 05950a5b822e2ae1088c4f7cee5280a645afa3eb (diff) | |
download | mgarepo-4af747cb2a25eb5cb9bce1c560676e75d8153121.tar mgarepo-4af747cb2a25eb5cb9bce1c560676e75d8153121.tar.gz mgarepo-4af747cb2a25eb5cb9bce1c560676e75d8153121.tar.bz2 mgarepo-4af747cb2a25eb5cb9bce1c560676e75d8153121.tar.xz mgarepo-4af747cb2a25eb5cb9bce1c560676e75d8153121.zip |
Add sync --no-vcs
If --no-vcs is given along with --download and/or --upload, the SVN
operations are skipped but the download and/or upload will go ahead.
This replaces the same functionality that was lost when the bug with
--dry-run was fixed in commit da90dea3.
Diffstat (limited to 'MgaRepo/rpmutil.py')
-rw-r--r-- | MgaRepo/rpmutil.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/MgaRepo/rpmutil.py b/MgaRepo/rpmutil.py index b71afb0..a99c08a 100644 --- a/MgaRepo/rpmutil.py +++ b/MgaRepo/rpmutil.py @@ -514,7 +514,7 @@ def ispkgtopdir(path=None): names = os.listdir(path) return (".svn" in names and "SPECS" in names and "SOURCES" in names) -def sync(dryrun=False, commit=False, download=False, up=False): +def sync(dryrun=False, vcs=True, commit=False, download=False, up=False): svn = SVN() topdir = getpkgtopdir() spath = binrepo.sources_path(topdir) @@ -590,11 +590,11 @@ def sync(dryrun=False, commit=False, download=False, up=False): toremove.append(path) for path in toremove: print("D\t%s" % path) - if not dryrun: + if not dryrun and vcs: delete([path], commit=commit) for path in toadd: print("A\t%s" % path) - if not dryrun: + if not dryrun and vcs: upload([path], commit=commit) # check binrepo files changed = binrepo.check_sources(topdir) |