- diff_against_existing = self.filter_pipe (self.full_ly (), 'diff -u %s -' % filename)
- if diff_against_existing:
+ existing = open (filename, 'r').read ()
+
+ if self.relevant_contents (existing) != self.relevant_contents (self.full_ly ()):
warning ("%s: duplicate filename but different contents of orginal file,\n\
printing diff against existing file." % filename)
warning ("%s: duplicate filename but different contents of orginal file,\n\
printing diff against existing file." % filename)
else:
out = file (filename, 'w')
out.write (self.full_ly ())
else:
out = file (filename, 'w')
out.write (self.full_ly ())
- error (_ ("`%s' failed (%d)") % (cmd, exit_status))
- error (_ ("The error log is as follows:"))
+ ly.error (_ ("`%s' failed (%d)") % (cmd, exit_status))
+ ly.error (_ ("The error log is as follows:"))