comparison mercurial/hg.py @ 31168:41a9edc5d00f

update: allow setting default update check to "noconflict" The new value allows update (linear or not) as long as they don't result in file merges. I'm hoping that this value can some day become the default.
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 13 Feb 2017 00:05:55 -0800
parents 696e321b304d
children 4cc3797aa59c
comparison
equal deleted inserted replaced
31167:696e321b304d 31168:41a9edc5d00f
741 741
742 * abort: abort if the working directory is dirty 742 * abort: abort if the working directory is dirty
743 * none: don't check (merge working directory changes into destination) 743 * none: don't check (merge working directory changes into destination)
744 * linear: check that update is linear before merging working directory 744 * linear: check that update is linear before merging working directory
745 changes into destination 745 changes into destination
746 * noconflict: check that the update does not result in file merges
746 747
747 This returns whether conflict is detected at updating or not. 748 This returns whether conflict is detected at updating or not.
748 """ 749 """
749 if updatecheck is None: 750 if updatecheck is None:
750 updatecheck = ui.config('experimental', 'updatecheck') 751 updatecheck = ui.config('experimental', 'updatecheck')
751 if updatecheck not in ('abort', 'none', 'linear'): 752 if updatecheck not in ('abort', 'none', 'linear', 'noconflict'):
752 # If not configured, or invalid value configured 753 # If not configured, or invalid value configured
753 updatecheck = 'linear' 754 updatecheck = 'linear'
754 with repo.wlock(): 755 with repo.wlock():
755 movemarkfrom = None 756 movemarkfrom = None
756 warndest = False 757 warndest = False