diff 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
line wrap: on
line diff
--- a/mercurial/commands.py	Fri Mar 21 00:55:53 2008 +0100
+++ b/mercurial/commands.py	Fri Mar 21 11:06:02 2008 +0100
@@ -547,7 +547,11 @@
     def commitfunc(ui, repo, files, message, match, opts):
         return repo.commit(files, message, opts['user'], opts['date'], match,
                            force_editor=opts.get('force_editor'))
+
+    heads = repo.changelog.heads()
     cmdutil.commit(ui, repo, commitfunc, pats, opts)
+    if len(repo.changelog.heads()) > len(heads):
+        ui.status(_('created new head\n'))
 
 def copy(ui, repo, *pats, **opts):
     """mark files as copied for the next commit