Kaydet (Commit) 4bfdda56 authored tarafından Ali Rıza KESKİN's avatar Ali Rıza KESKİN

config file update for yes all

üst db9d70bd
...@@ -269,23 +269,26 @@ def show_changed_configs(package_dict, opt): ...@@ -269,23 +269,26 @@ def show_changed_configs(package_dict, opt):
color='yellow') color='yellow')
os.system( os.system(
"diff -u {0} {1} | less".format(new_file, file)) "diff -u {0} {1} | less".format(new_file, file))
prompt = ctx.ui.choose(_("[?] Select the process which will be happened:"), ctx.ui.info(_("[?] Select the process which will be happened:"))
[_("1. Store new config file, not apply [*]"), ctx.ui.info(_("1. Store new config file, not apply [*]"))
_("2. Apply new config file (keep old config)"), ctx.ui.info(_("2. Apply new config file (keep old config)"))
_("3. Apply new config file (don't keep old config)"), ctx.ui.info(_("3. Apply new config file (don't keep old config)")
_("4. Delete new config file")]) ctx.ui.info(_("4. Delete new config file"))
if ctx.config.options and ctx.config.options.yes_all:
if prompt == _( prompt = "1"
"1. Store new config file, not apply [*]"): else:
prompt = subprocess.getoutput("read -n 1 c ; echo $c")
if prompt == "1"
pass pass
elif prompt == _("2. Apply new config file (keep old config)"): elif pprompt == "2"
apply_changed_config( apply_changed_config(
util.join_path( util.join_path(
ctx.config.dest_dir(), ctx.config.dest_dir(),
file), file),
new_file, new_file,
keep=True) keep=True)
elif prompt == _("3. Apply new config file (don't keep old config)"): elif pprompt == "3"
apply_changed_config( apply_changed_config(
util.join_path( util.join_path(
ctx.config.dest_dir(), ctx.config.dest_dir(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment