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 <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2009-09-12 18:12:44 -03:00
parent 406944b404
commit 7039a6fc2e
1 changed files with 6 additions and 1 deletions

View File

@ -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 <acme@redhat.com>
#
@ -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)