##// END OF EJS Templates
import: let --exact 'work' with --no-commit (issue4376)
Matt Mackall -
r22485:efedda4a default
parent child Browse files
Show More
@@ -727,7 +727,11 b' def tryimportone(ui, repo, hunk, parents'
727 n = memctx.commit()
727 n = memctx.commit()
728 finally:
728 finally:
729 store.close()
729 store.close()
730 if opts.get('exact') and hex(n) != nodeid:
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 raise util.Abort(_('patch is damaged or loses information'))
735 raise util.Abort(_('patch is damaged or loses information'))
732 if n:
736 if n:
733 # i18n: refers to a short changeset id
737 # i18n: refers to a short changeset id
@@ -54,6 +54,14 b' Make sure import still works with branch'
54
54
55 $ hg init c
55 $ hg init c
56 $ cd c
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 $ hg import --exact ../r0.patch
65 $ hg import --exact ../r0.patch
58 applying ../r0.patch
66 applying ../r0.patch
59 $ hg import --exact ../r1.patch
67 $ hg import --exact ../r1.patch
General Comments 0
You need to be logged in to leave comments. Login now