]> git.donarmstrong.com Git - lilypond.git/commitdiff
convert-ly: only update stable version if newer.
authorGraham Percival <graham@percival-music.ca>
Mon, 25 Oct 2010 07:39:49 +0000 (08:39 +0100)
committerGraham Percival <graham@percival-music.ca>
Mon, 25 Oct 2010 07:41:21 +0000 (08:41 +0100)
Oops.  The previous code changed \version "2.12.3" into
\version "2.12.0" if there was no change.

scripts/convert-ly.py

index 3c447b915751be42c4b40977365b1d5419237093..e613eb39c0f8802e713cb84c5d0b8e6a30a9d831 100644 (file)
@@ -259,9 +259,11 @@ def do_one_file (infile_name):
         if global_options.diff_version_update:
             if result == input:
                 # check the y in x.y.z  (minor version number)
-                if last[0:2] != from_version[0:2]:
+                previous_stable = (last[0], 2*(last[1]/2), 0)
+                if ((last[0:2] != from_version[0:2]) and
+                    (previous_stable > from_version)):
                     # previous stable version
-                    last = (last[0], 2*(last[1]/2), 0)
+                    last = previous_stable
                 else:
                     # make no (actual) change to the version number
                     last = from_version