Show More
@@ -3071,9 +3071,7 b' def graft(ui, repo, *revs, **opts):' | |||
|
3071 | 3071 | if not opts.get('date') and opts.get('currentdate'): |
|
3072 | 3072 | opts['date'] = "%d %d" % util.makedate() |
|
3073 | 3073 | |
|
3074 | editor = None | |
|
3075 | if opts.get('edit'): | |
|
3076 | editor = cmdutil.commitforceeditor | |
|
3074 | editor = cmdutil.getcommiteditor(**opts) | |
|
3077 | 3075 | |
|
3078 | 3076 | cont = False |
|
3079 | 3077 | if opts['continue']: |
@@ -76,10 +76,24 b" Can't graft with dirty wd:" | |||
|
76 | 76 | $ hg revert a |
|
77 | 77 | |
|
78 | 78 | Graft a rename: |
|
79 | (this also tests that editor is invoked if '--edit' is specified) | |
|
79 | 80 | |
|
80 | $ hg graft 2 -u foo | |
|
81 | $ hg status --rev "2^1" --rev 2 | |
|
82 | A b | |
|
83 | R a | |
|
84 | $ HGEDITOR=cat hg graft 2 -u foo --edit | |
|
81 | 85 | grafting revision 2 |
|
82 | 86 | merging a and b to b |
|
87 | 2 | |
|
88 | ||
|
89 | ||
|
90 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
|
91 | HG: Leave message empty to abort commit. | |
|
92 | HG: -- | |
|
93 | HG: user: foo | |
|
94 | HG: branch 'default' | |
|
95 | HG: changed b | |
|
96 | HG: removed a | |
|
83 | 97 | $ hg export tip --git |
|
84 | 98 | # HG changeset patch |
|
85 | 99 | # User foo |
@@ -114,6 +128,7 b' Look for extra:source' | |||
|
114 | 128 | |
|
115 | 129 | |
|
116 | 130 | Graft out of order, skipping a merge and a duplicate |
|
131 | (this also tests that editor is not invoked if '--edit' is not specified) | |
|
117 | 132 | |
|
118 | 133 | $ hg graft 1 5 4 3 'merge()' 2 -n |
|
119 | 134 | skipping ungraftable merge revision 6 |
@@ -123,7 +138,7 b' Graft out of order, skipping a merge and' | |||
|
123 | 138 | grafting revision 4 |
|
124 | 139 | grafting revision 3 |
|
125 | 140 | |
|
126 | $ hg graft 1 5 4 3 'merge()' 2 --debug | |
|
141 | $ HGEDITOR=cat hg graft 1 5 4 3 'merge()' 2 --debug | |
|
127 | 142 | skipping ungraftable merge revision 6 |
|
128 | 143 | scanning for duplicate grafts |
|
129 | 144 | skipping revision 2 (already grafted to 7) |
General Comments 0
You need to be logged in to leave comments.
Login now