Mercurial > public > mercurial-scm > hg-stable
diff tests/test-import-bypass.t @ 22278:ffaaa80fa724
import: avoid editor invocation when importing with "--exact" for exact-ness
Before this patch, external editor is invoked when imported patch has
no commit message, even if "--exact" is specified. Then, exact-ness is
broken, because empty commit message causes failure of committing.
This patch avoids editor invocation at importing with "--exact" for
exact-ness, because commit message in the patch should be kept as it
is in such case, even if it is empty.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Sat, 23 Aug 2014 23:03:50 +0900 |
parents | e116abad3afa |
children | c63a09b6b337 |
line wrap: on
line diff
--- a/tests/test-import-bypass.t Sat Aug 23 23:03:50 2014 +0900 +++ b/tests/test-import-bypass.t Sat Aug 23 23:03:50 2014 +0900 @@ -226,6 +226,25 @@ $ cd .. +Test avoiding editor invocation at applying the patch with --exact +even if commit message is empty + + $ cd repo-options + + $ echo a >> a + $ hg commit -m ' ' + $ hg tip -T "{node}\n" + 1b77bc7d1db9f0e7f1716d515b630516ab386c89 + $ hg export -o ../empty-log.diff . + $ hg update -q -C ".^1" + $ hg --config extensions.strip= strip -q tip + $ HGEDITOR=cat hg import --exact --bypass ../empty-log.diff + applying ../empty-log.diff + $ hg tip -T "{node}\n" + 1b77bc7d1db9f0e7f1716d515b630516ab386c89 + + $ cd .. + #if symlink execbit Test complicated patch with --exact