Mercurial > public > mercurial-scm > hg
diff tests/test-import-merge.t @ 22250:f3200bf460a8
import: change "editform" to distinguish merge commits from others
"editform" argument for "getcommiteditor" is decided according to the
format below:
COMMAND[.ROUTE]
- COMMAND: name of command
- ROUTE: name of route, if there are two or more routes in COMMAND
This patch uses "normal.normal" and "normal.merge" as ROUTE of
"editform" instead of "normal", to distinguish merge commits from
other in "hg import" without "--bypass" case.
This patch assumes "editform" variations for "hg import" below:
import.normal.normal
import.normal.merge
import.bypass.normal
import.bypass.merge
Unlike other patches in this series, this patch uses "editor.sh"
instead of "checkeditform.sh" for the name of the script to check
"HGEDITFORM", because it has to do more than checking "HGEDITFORM".
To invoke editor forcibly in "test-import-merge.t", this patch creates
the patch not having patch description as "merge.nomsg.diff".
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Sat, 16 Aug 2014 10:43:59 +0900 |
parents | 3a3731a60354 |
children | bdc0e04df243 |
line wrap: on
line diff
--- a/tests/test-import-merge.t Sat Aug 16 10:43:59 2014 +0900 +++ b/tests/test-import-merge.t Sat Aug 16 10:43:59 2014 +0900 @@ -30,6 +30,7 @@ (branch merge, don't forget to commit) $ hg ci -m merge $ hg export . > ../merge.diff + $ grep -v '^merge$' ../merge.diff > ../merge.nomsg.diff $ cd .. $ hg clone -r2 repo repo2 adding changesets @@ -52,8 +53,13 @@ $ hg up 1 0 files updated, 0 files merged, 1 files removed, 0 files unresolved - $ hg import ../merge.diff - applying ../merge.diff + $ cat > $TESTTMP/editor.sh <<EOF + > env | grep HGEDITFORM + > echo merge > \$1 + > EOF + $ HGEDITOR="sh $TESTTMP/editor.sh" hg import --edit ../merge.nomsg.diff + applying ../merge.nomsg.diff + HGEDITFORM=import.normal.merge $ tipparents 1:540395c44225 changea 3:102a90ea7b4a addb