aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJani Välimaa <wally@mageia.org>2015-02-20 21:30:36 +0200
committerJani Välimaa <wally@mageia.org>2015-08-07 16:13:08 +0300
commited7e5c1f6e91811645689618de6903e837cd0e73 (patch)
tree1c3775b39fd50775851005528de857fa48faaba4
parent89a18d30b24c83bbd2ca26f956ef86940d231c87 (diff)
downloadmgarepo-ed7e5c1f6e91811645689618de6903e837cd0e73.tar
mgarepo-ed7e5c1f6e91811645689618de6903e837cd0e73.tar.gz
mgarepo-ed7e5c1f6e91811645689618de6903e837cd0e73.tar.bz2
mgarepo-ed7e5c1f6e91811645689618de6903e837cd0e73.tar.xz
mgarepo-ed7e5c1f6e91811645689618de6903e837cd0e73.zip
Ignore 'mgarepo sync -c' and tell it's deprecated
TODO: Completely remove -c switch from code.
-rw-r--r--CHANGES2
-rw-r--r--MgaRepo/commands/sync.py7
2 files changed, 8 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 4795b9a..fc7d0cc 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+- ignore 'mgarepo sync -c' and tell it's deprecated
+
* 1.10.6
- s/cooker/cauldron/
thus fixing some stupid upload errors related to backports
diff --git a/MgaRepo/commands/sync.py b/MgaRepo/commands/sync.py
index 71f5510..54f5635 100644
--- a/MgaRepo/commands/sync.py
+++ b/MgaRepo/commands/sync.py
@@ -11,7 +11,6 @@ in the spec file.
It will not commit the changes.
Options:
- -c Commit the changes, as in ci
--dry-run Print results without changing the working copy
--download -d
Try to download the source files not found
@@ -25,11 +24,17 @@ def parse_options():
parser = OptionParser(help=HELP)
parser.add_option("--dry-run", dest="dryrun", default=False,
action="store_true")
+ # TODO:
+ # Completely remove -c switch from code
parser.add_option("-c", dest="commit", default=False,
action="store_true")
parser.add_option("-d", "--download", dest="download", default=False,
action="store_true")
opts, args = parser.parse_args()
+ # TODO:
+ # Completely remove -c switch from code
+ if opts.commit:
+ parser.error("Option -c is deprecated and should not be used anymore!")
if len(args):
opts.target = args[0]
return opts