comparison tests/test-import-bypass.t @ 45740:d1cabce5ef05

import: leverage cmdutil.check_incompatible_arguments() Differential Revision: https://phab.mercurial-scm.org/D9217
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 15 Oct 2020 21:48:43 -0700
parents 5abc47d4ca6b
children 8d72e29ad1e0
comparison
equal deleted inserted replaced
45739:693da1b928af 45740:d1cabce5ef05
24 Test importing an existing revision 24 Test importing an existing revision
25 (this also tests that "hg import" disallows combination of '--exact' 25 (this also tests that "hg import" disallows combination of '--exact'
26 and '--edit') 26 and '--edit')
27 27
28 $ hg import --bypass --exact --edit ../test.diff 28 $ hg import --bypass --exact --edit ../test.diff
29 abort: cannot use --exact with --edit 29 abort: cannot specify both --exact and --edit
30 [255] 30 [255]
31 $ hg import --bypass --exact ../test.diff 31 $ hg import --bypass --exact ../test.diff
32 applying ../test.diff 32 applying ../test.diff
33 $ shortlog 33 $ shortlog
34 o 1:4e322f7ce8e3 test 0 0 - foo - changea 34 o 1:4e322f7ce8e3 test 0 0 - foo - changea
186 $ hg -q --config extensions.strip= strip . 186 $ hg -q --config extensions.strip= strip .
187 187
188 Test unsupported combinations 188 Test unsupported combinations
189 189
190 $ hg import --bypass --no-commit ../test.diff 190 $ hg import --bypass --no-commit ../test.diff
191 abort: cannot use --no-commit with --bypass 191 abort: cannot specify both --no-commit and --bypass
192 [255] 192 [255]
193 $ hg import --bypass --similarity 50 ../test.diff 193 $ hg import --bypass --similarity 50 ../test.diff
194 abort: cannot use --similarity with --bypass 194 abort: cannot use --similarity with --bypass
195 [255] 195 [255]
196 $ hg import --exact --prefix dir/ ../test.diff 196 $ hg import --exact --prefix dir/ ../test.diff
197 abort: cannot use --exact with --prefix 197 abort: cannot specify both --exact and --prefix
198 [255] 198 [255]
199 199
200 Test commit editor 200 Test commit editor
201 (this also tests that editor is invoked, if the patch doesn't contain 201 (this also tests that editor is invoked, if the patch doesn't contain
202 the commit message, regardless of '--edit') 202 the commit message, regardless of '--edit')