def _extractTildeSeparatedPair(string):
    """Extract both parts from a string of the form revision~timestamp, where the ~timestamp component is optional.
    
    If no timestamp is present, returns (revision, None).
    """
    i = string.find('~')
    if i == -1:
        return string, None
    else:
        return string[:i], string[i+1:]