comparison hgext/rebase.py @ 22382:d5b04ee8ecf7

rebase: add a deprecated -i/--interactive flag A common mistake can be to type 'hg rebase -i' to discover interactive history editing. We add a -i/--interactive flag as discussed in the sprint and deprecate it right away, but hint people using it to use histedit instead.
author David Soria Parra <davidsp@fb.com>
date Mon, 01 Sep 2014 11:48:55 +0200
parents d0d3e5c6eb3c
children 0f0b204b399c
comparison
equal deleted inserted replaced
22381:392ae5cb8d62 22382:d5b04ee8ecf7
67 ('l', 'logfile', '', 67 ('l', 'logfile', '',
68 _('read collapse commit message from file'), _('FILE')), 68 _('read collapse commit message from file'), _('FILE')),
69 ('', 'keep', False, _('keep original changesets')), 69 ('', 'keep', False, _('keep original changesets')),
70 ('', 'keepbranches', False, _('keep original branch names')), 70 ('', 'keepbranches', False, _('keep original branch names')),
71 ('D', 'detach', False, _('(DEPRECATED)')), 71 ('D', 'detach', False, _('(DEPRECATED)')),
72 ('i', 'interactive', False, _('(DEPRECATED)')),
72 ('t', 'tool', '', _('specify merge tool')), 73 ('t', 'tool', '', _('specify merge tool')),
73 ('c', 'continue', False, _('continue an interrupted rebase')), 74 ('c', 'continue', False, _('continue an interrupted rebase')),
74 ('a', 'abort', False, _('abort an interrupted rebase'))] + 75 ('a', 'abort', False, _('abort an interrupted rebase'))] +
75 templateopts, 76 templateopts,
76 _('[-s REV | -b REV] [-d REV] [OPTION]')) 77 _('[-s REV | -b REV] [-d REV] [OPTION]'))
160 keepf = opts.get('keep', False) 161 keepf = opts.get('keep', False)
161 keepbranchesf = opts.get('keepbranches', False) 162 keepbranchesf = opts.get('keepbranches', False)
162 # keepopen is not meant for use on the command line, but by 163 # keepopen is not meant for use on the command line, but by
163 # other extensions 164 # other extensions
164 keepopen = opts.get('keepopen', False) 165 keepopen = opts.get('keepopen', False)
166
167 if opts.get('interactive'):
168 msg = _("interactive history editing is supported by the "
169 "'histedit' extension (see 'hg help histedit')")
170 raise util.Abort(msg)
165 171
166 if collapsemsg and not collapsef: 172 if collapsemsg and not collapsef:
167 raise util.Abort( 173 raise util.Abort(
168 _('message can only be specified with collapse')) 174 _('message can only be specified with collapse'))
169 175