Alpha 2, diff muss umgeschrieben werden, damit er Kommentare ignoriert

This commit is contained in:
2013-01-13 00:04:40 +00:00
parent 4f082dfce9
commit 31fd2d2c06
2 changed files with 33 additions and 16 deletions

View File

@@ -76,7 +76,7 @@ def getConfig(filename):
def diff(destfile, tempfile, commentstring, debug):
"""diff destfile and tempfile, returns True if files differ, False if they are the same"""
# FIXME: filter out comments?
# FIXME: filter out comments, SVN-Header and STAMP are causing diff errors
debug.debug("Diffing %s and %s" % (destfile, tempfile))
if not os.path.isfile(destfile):
debug.debug("Destfile %s does not exist, returning True." % destfile)
@@ -137,7 +137,7 @@ def copyFile(sourcefile, destfile, debug):
if os.path.isfile(sourcefile):
# sourcefile exists
if os.access(destfile, os.W_OK):
if not os.path.isfile(destfile) or os.access(destfile, os.W_OK):
debug.debug("Copying %s to %s" % (sourcefile, destfile))
shutil.copy(sourcefile, destfile)
return True