Loading bin/is +16 −5 Original line number Diff line number Diff line Loading @@ -216,11 +216,20 @@ def c_copy(args): ''' repoman = load_repositories(args) dstrepo = repoman[args.repository] for srcimg, srcrepo in get_images(args.pattern, repoman, local=False, min=1): arrow("Copying %s v%s from repository %s to %s" % (srcimg.name, srcimg.version, srcrepo.config.name, dstrepo.config.name)) todo = list(get_images(args.pattern, repoman, local=False, min=1)) # check user really want to this if not args.force: out("You will copy the following images:") for img, repo in todo: out(" %s/%s:%s" % (repo.config.name, img.name, img.version)) out("Inside repository: #l##b#%s#R#" % dstrepo.config.name) if not confirm(): raise Exception("Aborted!") # copy it for real for srcimg, srcrepo in todo: arrow("Copying %s v%s from repository %s to %s" % (srcimg.name, srcimg.version, srcrepo.config.name, dstrepo.config.name)) arrowlevel(1) dstrepo.add(srcimg) arrowlevel(-1) Loading Loading @@ -509,6 +518,8 @@ def arg_parser_init(): p.set_defaults(func=c_clean) # copy command parser p = subparser.add_parser("copy", help=c_copy.__doc__.lower()) p.add_argument("-f", "--force", action="store_true", help="copy image without confirmation") p.add_argument("pattern", nargs="+", help="[repository/]image[:version]") p.add_argument("repository", help="destination repository") Loading completion/bash/is +1 −1 Original line number Diff line number Diff line Loading @@ -94,7 +94,7 @@ _is() { _local_repo ;; copy) [[ "$cur" == -* ]] && _opt '-h --help' && return 0 [[ "$cur" == -* ]] && _opt '-h --help -f --force' && return 0 _count_args (( args == 2 )) && _remote_image (( args > 2 )) && _remote_image && _local_repo Loading Loading
bin/is +16 −5 Original line number Diff line number Diff line Loading @@ -216,11 +216,20 @@ def c_copy(args): ''' repoman = load_repositories(args) dstrepo = repoman[args.repository] for srcimg, srcrepo in get_images(args.pattern, repoman, local=False, min=1): arrow("Copying %s v%s from repository %s to %s" % (srcimg.name, srcimg.version, srcrepo.config.name, dstrepo.config.name)) todo = list(get_images(args.pattern, repoman, local=False, min=1)) # check user really want to this if not args.force: out("You will copy the following images:") for img, repo in todo: out(" %s/%s:%s" % (repo.config.name, img.name, img.version)) out("Inside repository: #l##b#%s#R#" % dstrepo.config.name) if not confirm(): raise Exception("Aborted!") # copy it for real for srcimg, srcrepo in todo: arrow("Copying %s v%s from repository %s to %s" % (srcimg.name, srcimg.version, srcrepo.config.name, dstrepo.config.name)) arrowlevel(1) dstrepo.add(srcimg) arrowlevel(-1) Loading Loading @@ -509,6 +518,8 @@ def arg_parser_init(): p.set_defaults(func=c_clean) # copy command parser p = subparser.add_parser("copy", help=c_copy.__doc__.lower()) p.add_argument("-f", "--force", action="store_true", help="copy image without confirmation") p.add_argument("pattern", nargs="+", help="[repository/]image[:version]") p.add_argument("repository", help="destination repository") Loading
completion/bash/is +1 −1 Original line number Diff line number Diff line Loading @@ -94,7 +94,7 @@ _is() { _local_repo ;; copy) [[ "$cur" == -* ]] && _opt '-h --help' && return 0 [[ "$cur" == -* ]] && _opt '-h --help -f --force' && return 0 _count_args (( args == 2 )) && _remote_image (( args > 2 )) && _remote_image && _local_repo Loading