Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 6336:4b0c9c674707
warn about new heads on commit (issue842)
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Fri, 21 Mar 2008 11:06:02 +0100 |
parents | 55ba3bc5b8fd |
children | 8e3b651382f5 |
comparison
equal
deleted
inserted
replaced
6335:e29557d687c9 | 6336:4b0c9c674707 |
---|---|
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 |