comparison tests/test-obsolete-distributed.t @ 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 34a46d48d24e
children ed84a4d48910
comparison
equal deleted inserted replaced
44544:13da36d77a3f 44545:bd7b2c8d06cc
136 client side: pull from the server 136 client side: pull from the server
137 (the new successors should take over) 137 (the new successors should take over)
138 138
139 $ hg up 'desc("ROOT")' 139 $ hg up 'desc("ROOT")'
140 0 files updated, 0 files merged, 1 files removed, 0 files unresolved 140 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
141 $ hg pull 141 $ hg pull --confirm --config ui.interactive=True << EOF
142 > n
143 > EOF
142 pulling from $TESTTMP/distributed-chain-building/server 144 pulling from $TESTTMP/distributed-chain-building/server
143 searching for changes 145 searching for changes
144 adding changesets 146 adding changesets
145 adding manifests 147 adding manifests
146 adding file changes 148 adding file changes
149 adding 1 changesets with 1 changes to 1 files (+1 heads)
150 1 new obsolescence markers
151 obsoleting 1 changesets
152 new changesets 391a2bf12b1b (1 drafts)
153 accept incoming changes (yn)? n
154 transaction abort!
155 rollback completed
156 abort: user aborted
157 [255]
158
159 $ hg pull --confirm --config ui.interactive=True << EOF
160 > y
161 > EOF
162 pulling from $TESTTMP/distributed-chain-building/server
163 searching for changes
164 adding changesets
165 adding manifests
166 adding file changes
167 adding 1 changesets with 1 changes to 1 files (+1 heads)
168 1 new obsolescence markers
169 obsoleting 1 changesets
170 new changesets 391a2bf12b1b (1 drafts)
171 accept incoming changes (yn)? y
147 added 1 changesets with 1 changes to 1 files (+1 heads) 172 added 1 changesets with 1 changes to 1 files (+1 heads)
148 1 new obsolescence markers 173 1 new obsolescence markers
149 obsoleted 1 changesets 174 obsoleted 1 changesets
150 new changesets 391a2bf12b1b (1 drafts) 175 new changesets 391a2bf12b1b (1 drafts)
151 (run 'hg heads' to see heads) 176 (run 'hg heads' to see heads)