Mercurial > public > mercurial-scm > hg
diff mercurial/commands.py @ 31845:86246530b8d2
pull: abort pull --update if config requires destination (issue5528)
author | Ryan McElroy <rmcelroy@fb.com> |
---|---|
date | Fri, 07 Apr 2017 06:31:50 -0700 |
parents | 1da9b2a4cbb8 |
children | 2406dbba49bd |
line wrap: on
line diff
--- 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)