##// END OF EJS Templates
hg: have `updatetotally` more thoroughly check updatecheck argument (API)...
Augie Fackler -
r43241:ee1ef76d default
parent child Browse files
Show More
@@ -883,6 +883,12 b' def clean(repo, node, show_stats=True, q'
883 883 # naming conflict in updatetotally()
884 884 _clean = clean
885 885
886 _VALID_UPDATECHECKS = {mergemod.UPDATECHECK_ABORT,
887 mergemod.UPDATECHECK_NONE,
888 mergemod.UPDATECHECK_LINEAR,
889 mergemod.UPDATECHECK_NO_CONFLICT,
890 }
891
886 892 def updatetotally(ui, repo, checkout, brev, clean=False, updatecheck=None):
887 893 """Update the working directory with extra care for non-file components
888 894
@@ -911,12 +917,12 b' def updatetotally(ui, repo, checkout, br'
911 917 """
912 918 if updatecheck is None:
913 919 updatecheck = ui.config('commands', 'update.check')
914 if updatecheck not in (mergemod.UPDATECHECK_ABORT,
915 mergemod.UPDATECHECK_NONE,
916 mergemod.UPDATECHECK_LINEAR,
917 mergemod.UPDATECHECK_NO_CONFLICT):
920 if updatecheck not in _VALID_UPDATECHECKS:
918 921 # If not configured, or invalid value configured
919 922 updatecheck = mergemod.UPDATECHECK_LINEAR
923 if updatecheck not in _VALID_UPDATECHECKS:
924 raise ValueError(r'Invalid updatecheck value %r (can accept %r)' % (
925 updatecheck, _VALID_UPDATECHECKS))
920 926 with repo.wlock():
921 927 movemarkfrom = None
922 928 warndest = False
General Comments 0
You need to be logged in to leave comments. Login now