mercurial/commands.py
changeset 32192 76f938ec68a5
parent 32170 b9d97bf96f61
child 32218 3f638e626f22
equal deleted inserted replaced
32191:31f42e683321 32192:76f938ec68a5
   704         ui.status(msg % short(node))
   704         ui.status(msg % short(node))
   705         return 0
   705         return 0
   706 
   706 
   707     def commitfunc(ui, repo, message, match, opts):
   707     def commitfunc(ui, repo, message, match, opts):
   708         editform = 'backout'
   708         editform = 'backout'
   709         e = cmdutil.getcommiteditor(editform=editform, **opts)
   709         e = cmdutil.getcommiteditor(editform=editform,
       
   710                                     **pycompat.strkwargs(opts))
   710         if not message:
   711         if not message:
   711             # we don't translate commit messages
   712             # we don't translate commit messages
   712             message = "Backed out changeset %s" % short(node)
   713             message = "Backed out changeset %s" % short(node)
   713             e = cmdutil.getcommiteditor(edit=True, editform=editform)
   714             e = cmdutil.getcommiteditor(edit=True, editform=editform)
   714         return repo.commit(message, opts.get('user'), opts.get('date'),
   715         return repo.commit(message, opts.get('user'), opts.get('date'),
  2238     if not opts.get('user') and opts.get('currentuser'):
  2239     if not opts.get('user') and opts.get('currentuser'):
  2239         opts['user'] = ui.username()
  2240         opts['user'] = ui.username()
  2240     if not opts.get('date') and opts.get('currentdate'):
  2241     if not opts.get('date') and opts.get('currentdate'):
  2241         opts['date'] = "%d %d" % util.makedate()
  2242         opts['date'] = "%d %d" % util.makedate()
  2242 
  2243 
  2243     editor = cmdutil.getcommiteditor(editform='graft', **opts)
  2244     editor = cmdutil.getcommiteditor(editform='graft',
       
  2245                                      **pycompat.strkwargs(opts))
  2244 
  2246 
  2245     cont = False
  2247     cont = False
  2246     if opts.get('continue'):
  2248     if opts.get('continue'):
  2247         cont = True
  2249         cont = True
  2248         if revs:
  2250         if revs:
  5214 
  5216 
  5215         if opts.get('remove'):
  5217         if opts.get('remove'):
  5216             editform = 'tag.remove'
  5218             editform = 'tag.remove'
  5217         else:
  5219         else:
  5218             editform = 'tag.add'
  5220             editform = 'tag.add'
  5219         editor = cmdutil.getcommiteditor(editform=editform, **opts)
  5221         editor = cmdutil.getcommiteditor(editform=editform,
       
  5222                                          **pycompat.strkwargs(opts))
  5220 
  5223 
  5221         # don't allow tagging the null rev
  5224         # don't allow tagging the null rev
  5222         if (not opts.get('remove') and
  5225         if (not opts.get('remove') and
  5223             scmutil.revsingle(repo, rev_).rev() == nullrev):
  5226             scmutil.revsingle(repo, rev_).rev() == nullrev):
  5224             raise error.Abort(_("cannot tag null revision"))
  5227             raise error.Abort(_("cannot tag null revision"))