- if global_options.force_current_version and last == to_version:
- last = str_to_tuple (program_version)
+ if global_options.diff_version_update:
+ # Note that last_change can be set even if the result is
+ # the same if two conversion rules cancelled out
+ if result == input:
+ # check the y in x.y.z (minor version number)
+ 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 = previous_stable
+ else:
+ # make no (actual) change to the version number
+ last = from_version
+ else:
+ last = last_change