diff options
author | Dan Fandrich <danf@mageia.org> | 2023-04-07 00:13:03 -0700 |
---|---|---|
committer | Dan Fandrich <danf@mageia.org> | 2023-04-07 00:13:03 -0700 |
commit | f6f05822b727d42b85ea03b23d4e2d4240b24215 (patch) | |
tree | cefed4483998edbd2d8db0deb8bd181e82c75eb0 /MgaRepo | |
parent | 948a398f44b74b562cff0468a2233e0c7fa2acdd (diff) | |
download | mgarepo-f6f05822b727d42b85ea03b23d4e2d4240b24215.tar mgarepo-f6f05822b727d42b85ea03b23d4e2d4240b24215.tar.gz mgarepo-f6f05822b727d42b85ea03b23d4e2d4240b24215.tar.bz2 mgarepo-f6f05822b727d42b85ea03b23d4e2d4240b24215.tar.xz mgarepo-f6f05822b727d42b85ea03b23d4e2d4240b24215.zip |
Support -r in the up command (mga#3913)
Diffstat (limited to 'MgaRepo')
-rw-r--r-- | MgaRepo/commands/up.py | 2 | ||||
-rw-r--r-- | MgaRepo/rpmutil.py | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/MgaRepo/commands/up.py b/MgaRepo/commands/up.py index 646a79f..18635f9 100644 --- a/MgaRepo/commands/up.py +++ b/MgaRepo/commands/up.py @@ -8,11 +8,13 @@ Usage: mgarepo up [PATH] Update the package working copy and synchronize all binaries. Options: + -r REV Revision to update to -h help """ def parse_options(): parser = OptionParser(help=HELP) + parser.add_option("-r", dest="revision") opts, args = parser.parse_args() if args: opts.target = args[0] diff --git a/MgaRepo/rpmutil.py b/MgaRepo/rpmutil.py index 769167c..9673111 100644 --- a/MgaRepo/rpmutil.py +++ b/MgaRepo/rpmutil.py @@ -632,7 +632,7 @@ def spec_sources(topdir): sources = [name for name, x, y in spec.sources()] return sources -def update(target=None): +def update(target=None, revision=None): svn = SVN() info = None svn_target = None @@ -644,7 +644,7 @@ def update(target=None): svn_target = top br_target = top if svn_target: - svn.update(svn_target, show=True) + svn.update(svn_target, rev=revision, show=True) if br_target: info = svn.info2(svn_target) if not br_target and not svn_target: |