Mercurial > public > mercurial-scm > hg
diff tests/test-import-bypass.t @ 22277:e116abad3afa
import: disallow meaningless combination of "--exact" and "--edit"
Before this patch, "hg import" allows combination of "--exact" and
"--edit", even though editing commit message breaks exact-ness.
This patch disallows meaningless combination of "--exact" and "--edit".
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Sat, 23 Aug 2014 23:03:50 +0900 |
parents | 308aaeb956e2 |
children | ffaaa80fa724 |
line wrap: on
line diff
--- a/tests/test-import-bypass.t Sun Mar 16 17:31:31 2014 +0200 +++ b/tests/test-import-bypass.t Sat Aug 23 23:03:50 2014 +0900 @@ -22,10 +22,13 @@ 0 files updated, 0 files merged, 1 files removed, 0 files unresolved Test importing an existing revision -(this also tests that editor is not invoked for '--bypass', if the -patch contains the commit message, regardless of '--edit') +(this also tests that "hg import" disallows combination of '--exact' +and '--edit') - $ HGEDITOR=cat hg import --bypass --exact --edit ../test.diff + $ hg import --bypass --exact --edit ../test.diff + abort: cannot use --exact with --edit + [255] + $ hg import --bypass --exact ../test.diff applying ../test.diff $ shortlog o 1:4e322f7ce8e3 test 0 0 - foo - changea @@ -66,8 +69,10 @@ repository tip rolled back to revision 1 (undo import) Test --import-branch +(this also tests that editor is not invoked for '--bypass', if the +patch contains the commit message, regardless of '--edit') - $ hg import --bypass --import-branch ../test.diff + $ HGEDITOR=cat hg import --bypass --import-branch --edit ../test.diff applying ../test.diff $ shortlog o 1:4e322f7ce8e3 test 0 0 - foo - changea