Show More
@@ -727,7 +727,11 b' def tryimportone(ui, repo, hunk, parents' | |||
|
727 | 727 | n = memctx.commit() |
|
728 | 728 | finally: |
|
729 | 729 | store.close() |
|
730 |
if opts.get('exact') and |
|
|
730 | if opts.get('exact') and opts.get('no_commit'): | |
|
731 | # --exact with --no-commit is still useful in that it does merge | |
|
732 | # and branch bits | |
|
733 | ui.warn(_("warning: can't check exact import with --no-commit\n")) | |
|
734 | elif opts.get('exact') and hex(n) != nodeid: | |
|
731 | 735 | raise util.Abort(_('patch is damaged or loses information')) |
|
732 | 736 | if n: |
|
733 | 737 | # i18n: refers to a short changeset id |
@@ -54,6 +54,14 b' Make sure import still works with branch' | |||
|
54 | 54 | |
|
55 | 55 | $ hg init c |
|
56 | 56 | $ cd c |
|
57 | $ hg import --exact --no-commit ../r0.patch | |
|
58 | applying ../r0.patch | |
|
59 | warning: can't check exact import with --no-commit | |
|
60 | $ hg st | |
|
61 | A rev | |
|
62 | $ hg revert -a | |
|
63 | forgetting rev | |
|
64 | $ rm rev | |
|
57 | 65 | $ hg import --exact ../r0.patch |
|
58 | 66 | applying ../r0.patch |
|
59 | 67 | $ hg import --exact ../r1.patch |
General Comments 0
You need to be logged in to leave comments.
Login now