diff --git a/mpcdf_common.py b/mpcdf_common.py index 6ab446d5ed0c23e16a40c4827387a7faa2c55489..fc058a5a220b88c2bd9e8fa06ebed906f282d21a 100644 --- a/mpcdf_common.py +++ b/mpcdf_common.py @@ -904,7 +904,7 @@ Macros: new.write(s2) new.close() - call(["diff", "-s", "-u", old.name, "--label", "old-prjconf", new.name, "--label", "new-prjconf"]) + call(["diff", "--color=auto", "-s", "-u", old.name, "--label", label1, new.name, "--label", label2]) os.unlink(old.name) os.unlink(new.name) diff --git a/mpcdf_setup_home_project.py b/mpcdf_setup_home_project.py index bda9462d04b835f72d69c83c9900fd820317de64..c85b88e9b54092e2803197a24877a352779f244e 100644 --- a/mpcdf_setup_home_project.py +++ b/mpcdf_setup_home_project.py @@ -11,10 +11,14 @@ import osc.cmdln @osc.cmdln.option('-n', '--dry-run', action="store_true", help="Do not actually run anything but output the resulting XML configuration") +@osc.cmdln.option('--diff', action="store_true", + help="Show (only) differences of prjconf and project meta") @osc.cmdln.option('--remove-old', action="store_true", default=False, help="Remove all obsolete repositories instead of only disabling builds for packages there") @osc.cmdln.option('--remove-old-matching', default=None, help="Remove all obsolete repositories matching this regular expression") +@osc.cmdln.option('--only-project', action="store_true", + help="Only change project metadata, do not iterate over packages and change their enabled repositories") @osc.cmdln.option('--distribution', metavar="DIST", nargs=1, help="Base distribution, necessary argument unless set previously for this project. " "Valid arguments are the names of any repository in the 'software' project.")