diff mercurial/commands.py @ 44545:bd7b2c8d06cc

pull: add `--confirm` flag to confirm before writing changes This introduces a new flag to pull command `--confirm` and also a config option named `pull.confirm` which if used will prompt user describing changes which are pulled and asking whether to accept them or not. Differential Revision: https://phab.mercurial-scm.org/D8200
author Pulkit Goyal <7895pulkit@gmail.com>
date Sat, 29 Feb 2020 12:58:38 +0530
parents 9d2b2df2c2ba
children 47c1226463a1
line wrap: on
line diff
--- a/mercurial/commands.py	Sat Feb 29 12:58:13 2020 +0530
+++ b/mercurial/commands.py	Sat Feb 29 12:58:38 2020 +0530
@@ -5344,6 +5344,7 @@
             None,
             _(b'run even when remote repository is unrelated'),
         ),
+        (b'', b'confirm', None, _(b'confirm pull before applying changes'),),
         (
             b'r',
             b'rev',
@@ -5460,6 +5461,7 @@
                 force=opts.get(b'force'),
                 bookmarks=opts.get(b'bookmark', ()),
                 opargs=pullopargs,
+                confirm=opts.get(b'confirm'),
             ).cgresult
 
             # brev is a name, which might be a bookmark to be activated at