From 7039a6fc2ed9cc82f1af1c1f0b3b918579fdafc2 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Sat, 12 Sep 2009 18:12:44 -0300 Subject: [PATCH] regtest: Ask if the changes are ok If they are, the 'after' file is moved to the 'before' directory. Signed-off-by: Arnaldo Carvalho de Melo --- regtest | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/regtest b/regtest index c278cca..cc572ac 100755 --- a/regtest +++ b/regtest @@ -1,7 +1,7 @@ #! /usr/bin/python # -*- python -*- # -*- coding: utf-8 -*- -# tuna - Application Tuning GUI +# dwarves - pahole and the debogey men # Copyright (C) 2009 Arnaldo Carvalho de Melo # Arnaldo Carvalho de Melo # @@ -32,6 +32,11 @@ def diff_file(from_filename, to_filename): try: os.system(command) os.system("vim %s" % diff_filename) + print "ok?" + answer = sys.stdin.readline() + if answer[0] == 'y': + os.unlink(from_filename) + os.link(to_filename, from_filename) finally: os.unlink(diff_filename)