diff mercurial/hg.py @ 31178: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
line wrap: on
line diff
--- a/mercurial/hg.py	Mon Feb 13 16:03:05 2017 -0800
+++ b/mercurial/hg.py	Mon Feb 13 00:05:55 2017 -0800
@@ -743,12 +743,13 @@
      * none: don't check (merge working directory changes into destination)
      * linear: check that update is linear before merging working directory
                changes into destination
+     * noconflict: check that the update does not result in file merges
 
     This returns whether conflict is detected at updating or not.
     """
     if updatecheck is None:
         updatecheck = ui.config('experimental', 'updatecheck')
-        if updatecheck not in ('abort', 'none', 'linear'):
+        if updatecheck not in ('abort', 'none', 'linear', 'noconflict'):
             # If not configured, or invalid value configured
             updatecheck = 'linear'
     with repo.wlock():