comparison tests/test-transplant.t @ 21411:afff78be4361

transplant: use "getcommiteditor()" instead of explicit editor choice This patch also enhances "test-transplant.t", because "hg transplant" hasn't been explicitly tested around editor invocation and "--edit" option.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Sun, 11 May 2014 00:49:35 +0900
parents 7731a2281cf0
children 7a9cbb315d84
comparison
equal deleted inserted replaced
21410:5b70ece79ea7 21411:afff78be4361
41 41
42 $ hg up -C 1 42 $ hg up -C 1
43 1 files updated, 0 files merged, 3 files removed, 0 files unresolved 43 1 files updated, 0 files merged, 3 files removed, 0 files unresolved
44 44
45 rebase b onto r1 45 rebase b onto r1
46 46 (this also tests that editor is not invoked if '--edit' is not specified)
47 $ hg transplant -a -b tip 47
48 $ HGEDITOR=cat hg transplant -a -b tip
48 applying 37a1297eb21b 49 applying 37a1297eb21b
49 37a1297eb21b transplanted to e234d668f844 50 37a1297eb21b transplanted to e234d668f844
50 applying 722f4667af76 51 applying 722f4667af76
51 722f4667af76 transplanted to 539f377d78df 52 722f4667af76 transplanted to 539f377d78df
52 applying a53251cdf717 53 applying a53251cdf717
83 1 84 1
84 0 85 0
85 86
86 test destination() revset predicate with a transplant of a transplant; new 87 test destination() revset predicate with a transplant of a transplant; new
87 clone so subsequent rollback isn't affected 88 clone so subsequent rollback isn't affected
89 (this also tests that editor is invoked if '--edit' is specified)
90
88 $ hg clone -q . ../destination 91 $ hg clone -q . ../destination
89 $ cd ../destination 92 $ cd ../destination
90 $ hg up -Cq 0 93 $ hg up -Cq 0
91 $ hg branch -q b4 94 $ hg branch -q b4
92 $ hg ci -qm "b4" 95 $ hg ci -qm "b4"
93 $ hg transplant 7 96 $ hg status --rev "7^1" --rev 7
97 A b3
98 $ HGEDITOR=cat hg transplant --edit 7
94 applying ffd6818a3975 99 applying ffd6818a3975
100 b3
101
102
103 HG: Enter commit message. Lines beginning with 'HG:' are removed.
104 HG: Leave message empty to abort commit.
105 HG: --
106 HG: user: test
107 HG: branch 'b4'
108 HG: added b3
95 ffd6818a3975 transplanted to 502236fa76bb 109 ffd6818a3975 transplanted to 502236fa76bb
96 110
97 111
98 $ hg log -r 'destination()' 112 $ hg log -r 'destination()'
99 changeset: 5:e234d668f844 113 changeset: 5:e234d668f844