From 453e6f6500352ef29f901aaee8dc7f2b906b4766 Mon Sep 17 00:00:00 2001 From: Patrick McCarty Date: Mon, 28 Sep 2009 13:22:47 -0700 Subject: [PATCH] lilypond-book: Change md5 hashing strategy Previously, the md5 hash for folder/file names was based on the entire .ly file contents. This worked okay until the preamble changed, which then broke `make check'. This commit changes the strategy so that only the LY code (without the preamble) is used when computing the md5 hash. This will fix the regtest comparison output between releases from now on. --- scripts/lilypond-book.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index 276c2aae50..6abbe5393b 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -1227,7 +1227,9 @@ class LilypondSnippet (Snippet): except ImportError: from md5 import md5 - hash = md5 (self.relevant_contents (self.full_ly ())) + # We only want to calculate the hash based + # on the snippet code, not the snippet + preamble + hash = md5 (self.relevant_contents (self.ly ())) ## let's not create too long names. self.checksum = hash.hexdigest ()[:10] -- 2.39.2