'Calculates a revision from phrases by using the SHA1 hash function.
Arguments:
phrases -- a list of phrases
Returns:
A revision string for given phrases.'

@classmethod
def phrases_to_revision(cls, phrases):

    sorted_phrases = sorted(phrases)
    joined_phrases = '\n'.join(sorted_phrases)
    sha1 = hashlib.sha1()
    sha1.update(joined_phrases)
    return sha1.hexdigest()
