Patchwork D516: pull: do not prompt "hg update" if update.requiredest is set

login
register
mail settings
Submitter phabricator
Date Aug. 28, 2017, 7:06 p.m.
Message ID <f5e625ee93c7137c89df1a232a1a14fb@localhost.localdomain>
Download mbox | patch
Permalink /patch/23440/
State Not Applicable
Headers show

Comments

phabricator - Aug. 28, 2017, 7:06 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG8abbae93045a: pull: do not prompt "hg update" if update.requiredest is set (authored by quark).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D516?vs=1273&id=1365

REVISION DETAIL
  https://phab.mercurial-scm.org/D516

AFFECTED FILES
  mercurial/commands.py
  tests/test-update-dest.t

CHANGE DETAILS




To: quark, #hg-reviewers, durin42
Cc: mercurial-devel

Patch

diff --git a/tests/test-update-dest.t b/tests/test-update-dest.t
--- a/tests/test-update-dest.t
+++ b/tests/test-update-dest.t
@@ -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
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -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',