# HG changeset patch # User Jun Wu # Date 1503631516 25200 # Node ID 8abbae93045a222becd3f87c6e828a41729f2953 # Parent 3939b30d0cb78e43e00f50b9b5bfe882a3b9191f pull: do not prompt "hg update" if update.requiredest is set Previously, after pull, we show: (run 'hg update' to get a working copy) unconditionally. People might run `hg update` and get an exception if `update.requiredest` is set, and get a bit frustrated. This patch changes the code to not prompt `hg update` in that case. Differential Revision: https://phab.mercurial-scm.org/D516 diff -r 3939b30d0cb7 -r 8abbae93045a mercurial/commands.py --- a/mercurial/commands.py Fri Aug 25 22:05:10 2017 -0700 +++ b/mercurial/commands.py Thu Aug 24 20:25:16 2017 -0700 @@ -3849,7 +3849,7 @@ "merge)\n")) else: ui.status(_("(run 'hg heads' to see heads)\n")) - else: + elif not ui.configbool('commands', 'update.requiredest'): ui.status(_("(run 'hg update' to get a working copy)\n")) @command('^pull', diff -r 3939b30d0cb7 -r 8abbae93045a tests/test-update-dest.t --- a/tests/test-update-dest.t Fri Aug 25 22:05:10 2017 -0700 +++ b/tests/test-update-dest.t Thu Aug 24 20:25:16 2017 -0700 @@ -33,3 +33,16 @@ abort: update destination required by configuration (use hg pull followed by hg update DEST) [255] + + $ cd .. + +update.requiredest should silent the "hg update" text after pull + $ hg init repo1 + $ cd repo1 + $ hg pull ../repo + pulling from ../repo + requesting all changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 1 files