545 See 'hg help dates' for a list of formats valid for -d/--date. |
545 See 'hg help dates' for a list of formats valid for -d/--date. |
546 """ |
546 """ |
547 def commitfunc(ui, repo, files, message, match, opts): |
547 def commitfunc(ui, repo, files, message, match, opts): |
548 return repo.commit(files, message, opts['user'], opts['date'], match, |
548 return repo.commit(files, message, opts['user'], opts['date'], match, |
549 force_editor=opts.get('force_editor')) |
549 force_editor=opts.get('force_editor')) |
|
550 |
|
551 heads = repo.changelog.heads() |
550 cmdutil.commit(ui, repo, commitfunc, pats, opts) |
552 cmdutil.commit(ui, repo, commitfunc, pats, opts) |
|
553 if len(repo.changelog.heads()) > len(heads): |
|
554 ui.status(_('created new head\n')) |
551 |
555 |
552 def copy(ui, repo, *pats, **opts): |
556 def copy(ui, repo, *pats, **opts): |
553 """mark files as copied for the next commit |
557 """mark files as copied for the next commit |
554 |
558 |
555 Mark dest as having copies of source files. If dest is a |
559 Mark dest as having copies of source files. If dest is a |