Show More
@@ -3880,6 +3880,8 b' def import_(ui, repo, patch1=None, *patc' | |||
|
3880 | 3880 | raise util.Abort(_('similarity must be between 0 and 100')) |
|
3881 | 3881 | if sim and not update: |
|
3882 | 3882 | raise util.Abort(_('cannot use --similarity with --bypass')) |
|
3883 | if opts.get('exact') and opts.get('edit'): | |
|
3884 | raise util.Abort(_('cannot use --exact with --edit')) | |
|
3883 | 3885 | |
|
3884 | 3886 | if update: |
|
3885 | 3887 | cmdutil.checkunfinished(repo) |
@@ -22,10 +22,13 b' Test --bypass with other options' | |||
|
22 | 22 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
23 | 23 | |
|
24 | 24 | Test importing an existing revision |
|
25 | (this also tests that editor is not invoked for '--bypass', if the | |
|
26 | patch contains the commit message, regardless of '--edit') | |
|
25 | (this also tests that "hg import" disallows combination of '--exact' | |
|
26 | and '--edit') | |
|
27 | 27 | |
|
28 |
$ |
|
|
28 | $ hg import --bypass --exact --edit ../test.diff | |
|
29 | abort: cannot use --exact with --edit | |
|
30 | [255] | |
|
31 | $ hg import --bypass --exact ../test.diff | |
|
29 | 32 | applying ../test.diff |
|
30 | 33 | $ shortlog |
|
31 | 34 | o 1:4e322f7ce8e3 test 0 0 - foo - changea |
@@ -66,8 +69,10 b' Test --user, --date and --message' | |||
|
66 | 69 | repository tip rolled back to revision 1 (undo import) |
|
67 | 70 | |
|
68 | 71 | Test --import-branch |
|
72 | (this also tests that editor is not invoked for '--bypass', if the | |
|
73 | patch contains the commit message, regardless of '--edit') | |
|
69 | 74 | |
|
70 | $ hg import --bypass --import-branch ../test.diff | |
|
75 | $ HGEDITOR=cat hg import --bypass --import-branch --edit ../test.diff | |
|
71 | 76 | applying ../test.diff |
|
72 | 77 | $ shortlog |
|
73 | 78 | o 1:4e322f7ce8e3 test 0 0 - foo - changea |
General Comments 0
You need to be logged in to leave comments.
Login now