diff options
-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: |