mercurial/commands.py
changeset 20773 efbf15979538
parent 20741 f1dfef0a9352
parent 20772 03774a2b6991
child 20782 13fcb9ca9ccc
equal deleted inserted replaced
20764:d9378bfa0af0 20773:efbf15979538
  1435 
  1435 
  1436         def commitfunc(ui, repo, message, match, opts):
  1436         def commitfunc(ui, repo, message, match, opts):
  1437             try:
  1437             try:
  1438                 if opts.get('secret'):
  1438                 if opts.get('secret'):
  1439                     ui.setconfig('phases', 'new-commit', 'secret')
  1439                     ui.setconfig('phases', 'new-commit', 'secret')
       
  1440                     # Propagate to subrepos
       
  1441                     repo.baseui.setconfig('phases', 'new-commit', 'secret')
  1440 
  1442 
  1441                 return repo.commit(message, opts.get('user'), opts.get('date'),
  1443                 return repo.commit(message, opts.get('user'), opts.get('date'),
  1442                                    match, editor=e, extra=extra)
  1444                                    match, editor=e, extra=extra)
  1443             finally:
  1445             finally:
  1444                 ui.setconfig('phases', 'new-commit', oldcommitphase)
  1446                 ui.setconfig('phases', 'new-commit', oldcommitphase)
       
  1447                 repo.baseui.setconfig('phases', 'new-commit', oldcommitphase)
  1445 
  1448 
  1446 
  1449 
  1447         node = cmdutil.commit(ui, repo, commitfunc, pats, opts)
  1450         node = cmdutil.commit(ui, repo, commitfunc, pats, opts)
  1448 
  1451 
  1449         if not node:
  1452         if not node:
  5643         if date:
  5646         if date:
  5644             date = util.parsedate(date)
  5647             date = util.parsedate(date)
  5645 
  5648 
  5646         if opts.get('edit'):
  5649         if opts.get('edit'):
  5647             message = ui.edit(message, ui.username())
  5650             message = ui.edit(message, ui.username())
       
  5651             repo.savecommitmessage(message)
  5648 
  5652 
  5649         # don't allow tagging the null rev
  5653         # don't allow tagging the null rev
  5650         if (not opts.get('remove') and
  5654         if (not opts.get('remove') and
  5651             scmutil.revsingle(repo, rev_).rev() == nullrev):
  5655             scmutil.revsingle(repo, rev_).rev() == nullrev):
  5652             raise util.Abort(_("cannot tag null revision"))
  5656             raise util.Abort(_("cannot tag null revision"))