equal
deleted
inserted
replaced
94 """interactivly replace the old file with the new file according to |
94 """interactivly replace the old file with the new file according to |
95 user decision |
95 user decision |
96 """ |
96 """ |
97 import shutil |
97 import shutil |
98 pipe = subprocess.Popen(['diff', '-u', appl_file, ref_file], stdout=subprocess.PIPE) |
98 pipe = subprocess.Popen(['diff', '-u', appl_file, ref_file], stdout=subprocess.PIPE) |
99 diffs = pipe.stdout.read() |
99 diffs = pipe.stdout.read().decode('utf-8') |
100 if diffs: |
100 if diffs: |
101 if askconfirm: |
101 if askconfirm: |
102 print() |
102 print() |
103 print(diffs) |
103 print(diffs) |
104 action = ASK.ask('Replace ?', ('Y', 'n', 'q'), 'Y').lower() |
104 action = ASK.ask('Replace ?', ('Y', 'n', 'q'), 'Y').lower() |