--- a/hgext3rd/evolve/__init__.py Mon Jun 11 20:17:56 2018 +0530
+++ b/hgext3rd/evolve/__init__.py Tue Jun 12 10:40:57 2018 +0200
@@ -966,15 +966,21 @@
def _getcurrenttopic(repo):
return getattr(repo, 'currenttopic', '')
-def _prevupdate(repo, displayer, target, bookmark, dryrun):
+def _prevupdate(repo, displayer, target, bookmark, dryrun, mergeopt):
if dryrun:
repo.ui.write(_('hg update %s;\n') % target)
if bookmark is not None:
repo.ui.write(_('hg bookmark %s -r %s;\n')
% (bookmark, target))
else:
+ updatecheck = None
+ # --merge is passed, we don't need to care about commands.update.check
+ # config option
+ if mergeopt:
+ updatecheck = 'none'
try:
- ret = hg.updatetotally(repo.ui, repo, target.node(), None)
+ ret = hg.updatetotally(repo.ui, repo, target.node(), None,
+ updatecheck=updatecheck)
except error.Abort as exc:
# replace the hint to mention about --merge option
exc.hint = _('do you want --merge?')
@@ -1047,6 +1053,7 @@
Displays the summary line of the destination for clarity."""
wlock = None
dryrunopt = opts['dry_run']
+ mergeopt = opts['merge']
if not dryrunopt:
wlock = repo.wlock()
try:
@@ -1054,7 +1061,7 @@
wparents = wkctx.parents()
if len(wparents) != 1:
raise error.Abort(_('merge in progress'))
- if not opts['merge']:
+ if not mergeopt:
# we only skip the check if noconflict is set
if ui.config('commands', 'update.check') == 'noconflict':
pass
@@ -1077,7 +1084,8 @@
if topic and _getcurrenttopic(repo) != _gettopic(target):
repo.ui.setconfig('_internal', 'keep-topic', 'yes',
source='topic-extension')
- _prevupdate(repo, displayer, target, bookmark, dryrunopt)
+ _prevupdate(repo, displayer, target, bookmark, dryrunopt,
+ mergeopt)
finally:
repo.ui.restoreconfig(backup)
return 0
@@ -1213,8 +1221,14 @@
if shouldmove:
ui.write(_('hg bookmark %s -r %s;\n') % (bm, children))
else:
+ updatecheck = None
+ # --merge is passed, we don't need to care about commands.update.check
+ # config option
+ if opts['merge']:
+ updatecheck = 'none'
try:
- ret = hg.updatetotally(ui, repo, children.node(), None)
+ ret = hg.updatetotally(ui, repo, children.node(), None,
+ updatecheck=updatecheck)
except error.Abort as exc:
# replace the hint to mention about --merge option
exc.hint = _('do you want --merge?')