Loading bin/is +3 −1 Original line number Diff line number Diff line Loading @@ -235,7 +235,7 @@ def c_clean(args): ''' repoman = load_repositories(args) for reponame in args.repository: repoman[reponame].clean() repoman[reponame].clean(args.force) def c_copy(args): ''' Loading Loading @@ -542,6 +542,8 @@ def arg_parser_init(): p.set_defaults(func=c_chroot) # clean command parser p = subparser.add_parser("clean", help=c_clean.__doc__.lower()) p.add_argument("-f", "--force", action="store_true", help="clean repository without confirmation") p.add_argument("repository", nargs="+", help="repositories to clean") p.set_defaults(func=c_clean) # copy command parser Loading completion/bash/is +1 −1 Original line number Diff line number Diff line Loading @@ -91,7 +91,7 @@ _is() { _filedir -d ;; clean) [[ "$cur" == -* ]] && _opt '-h --help' && return 0 [[ "$cur" == -* ]] && _opt '-h --help -f --force' && return 0 _local_repo ;; copy) Loading installsystems/repository.py +2 −2 Original line number Diff line number Diff line Loading @@ -275,7 +275,7 @@ class Repository(object): if fo.md5 != f: out(f) def clean(self): def clean(self, force=False): ''' Clean the repository's content ''' Loading @@ -291,7 +291,7 @@ class Repository(object): for f in dirtyfiles: arrow(f, 1) # ask confirmation if not confirm("Remove dirty files? (yes) "): if not force and not confirm("Remove dirty files? (yes) "): raise Exception("Aborted!") # start cleaning arrow("Cleaning") Loading Loading
bin/is +3 −1 Original line number Diff line number Diff line Loading @@ -235,7 +235,7 @@ def c_clean(args): ''' repoman = load_repositories(args) for reponame in args.repository: repoman[reponame].clean() repoman[reponame].clean(args.force) def c_copy(args): ''' Loading Loading @@ -542,6 +542,8 @@ def arg_parser_init(): p.set_defaults(func=c_chroot) # clean command parser p = subparser.add_parser("clean", help=c_clean.__doc__.lower()) p.add_argument("-f", "--force", action="store_true", help="clean repository without confirmation") p.add_argument("repository", nargs="+", help="repositories to clean") p.set_defaults(func=c_clean) # copy command parser Loading
completion/bash/is +1 −1 Original line number Diff line number Diff line Loading @@ -91,7 +91,7 @@ _is() { _filedir -d ;; clean) [[ "$cur" == -* ]] && _opt '-h --help' && return 0 [[ "$cur" == -* ]] && _opt '-h --help -f --force' && return 0 _local_repo ;; copy) Loading
installsystems/repository.py +2 −2 Original line number Diff line number Diff line Loading @@ -275,7 +275,7 @@ class Repository(object): if fo.md5 != f: out(f) def clean(self): def clean(self, force=False): ''' Clean the repository's content ''' Loading @@ -291,7 +291,7 @@ class Repository(object): for f in dirtyfiles: arrow(f, 1) # ask confirmation if not confirm("Remove dirty files? (yes) "): if not force and not confirm("Remove dirty files? (yes) "): raise Exception("Aborted!") # start cleaning arrow("Cleaning") Loading