mercurial/commands.py
changeset 31845 86246530b8d2
parent 31831 1da9b2a4cbb8
child 32005 2406dbba49bd
--- a/mercurial/commands.py	Fri Apr 07 05:41:03 2017 -0700
+++ b/mercurial/commands.py	Fri Apr 07 06:31:50 2017 -0700
@@ -3938,6 +3938,12 @@
 
     Returns 0 on success, 1 if an update had unresolved files.
     """
+
+    if ui.configbool('commands', 'update.requiredest') and opts.get('update'):
+        msg = _('update destination required by configuration')
+        hint = _('use hg pull followed by hg update DEST')
+        raise error.Abort(msg, hint=hint)
+
     source, branches = hg.parseurl(ui.expandpath(source), opts.get('branch'))
     ui.status(_('pulling from %s\n') % util.hidepassword(source))
     other = hg.peer(repo, opts, source)