+ return v[len(get_non_digit_prefix(v)):] # remove the non-digit prefix from v (so that it starts with a number)
+
+ def checkVersions(self):
+ self.update(mode = MODE_FETCH)
+ repo = git.Repo(self.folder)
+ currentVersion = repo.git.describe()
+ # get sorted list of tag names with the same non-digit prefix and higher version number
+ tags = map(str, repo.tags)
+ tags = filter(lambda t: get_non_digit_prefix(t) == get_non_digit_prefix(currentVersion) and natural_sort_key(t) > natural_sort_key(currentVersion), tags)
+ if not tags: return
+ tags.sort(key = natural_sort_key)
+ print "Versions newer than "+currentVersion+" available:"
+ print tags