def SetProperty(initial, caption, name, is_url):
    prompt = caption
    if initial:
        prompt += (' ("x" to clear) [%s]' % initial)
    new_val = ask_for_data((prompt + ':'))
    if (new_val == 'x'):
        RunGit(['config', '--unset-all', ('rietveld.' + name)], error_ok=True)
    elif new_val:
        if is_url:
            new_val = gclient_utils.UpgradeToHttps(new_val)
        if (new_val != initial):
            RunGit(['config', ('rietveld.' + name), new_val])
def SetProperty(initial, caption, name, is_url):
    prompt = caption
    if initial:
        prompt += (' ("x" to clear) [%s]' % initial)
    new_val = ask_for_data((prompt + ':'))
    if (new_val == 'x'):
        RunGit(['config', '--unset-all', ('rietveld.' + name)], error_ok=True)
    elif new_val:
        if is_url:
            new_val = gclient_utils.UpgradeToHttps(new_val)
        if (new_val != initial):
            RunGit(['config', ('rietveld.' + name), new_val])