mercurial/commands.py
changeset 7655 cce37dab7ad6
parent 7643 9a1ea6587557
child 7656 6a24fb994701
equal deleted inserted replaced
7654:816b708f23af 7655:cce37dab7ad6
   611     If no commit message is specified, the configured editor is started to
   611     If no commit message is specified, the configured editor is started to
   612     enter a message.
   612     enter a message.
   613 
   613 
   614     See 'hg help dates' for a list of formats valid for -d/--date.
   614     See 'hg help dates' for a list of formats valid for -d/--date.
   615     """
   615     """
       
   616     extra = {}
       
   617     if opts.get('close_branch'):
       
   618         extra['close'] = 1
   616     def commitfunc(ui, repo, message, match, opts):
   619     def commitfunc(ui, repo, message, match, opts):
   617         return repo.commit(match.files(), message, opts.get('user'), opts.get('date'),
   620         return repo.commit(match.files(), message, opts.get('user'),
   618                            match, force_editor=opts.get('force_editor'))
   621             opts.get('date'), match, force_editor=opts.get('force_editor'),
       
   622             extra=extra)
   619 
   623 
   620     node = cmdutil.commit(ui, repo, commitfunc, pats, opts)
   624     node = cmdutil.commit(ui, repo, commitfunc, pats, opts)
   621     if not node:
   625     if not node:
   622         return
   626         return
   623     cl = repo.changelog
   627     cl = repo.changelog
  3132          _('[OPTION]... SOURCE [DEST]')),
  3136          _('[OPTION]... SOURCE [DEST]')),
  3133     "^commit|ci":
  3137     "^commit|ci":
  3134         (commit,
  3138         (commit,
  3135          [('A', 'addremove', None,
  3139          [('A', 'addremove', None,
  3136            _('mark new/missing files as added/removed before committing')),
  3140            _('mark new/missing files as added/removed before committing')),
       
  3141           ('', 'close-branch', None,
       
  3142            _('mark a branch as closed, hiding it from the branch list')),
  3137          ] + walkopts + commitopts + commitopts2,
  3143          ] + walkopts + commitopts + commitopts2,
  3138          _('[OPTION]... [FILE]...')),
  3144          _('[OPTION]... [FILE]...')),
  3139     "copy|cp":
  3145     "copy|cp":
  3140         (copy,
  3146         (copy,
  3141          [('A', 'after', None, _('record a copy that has already occurred')),
  3147          [('A', 'after', None, _('record a copy that has already occurred')),