diff hgext/evolve.py @ 318:da7509e7b50c

evolve: warn when uncommit leave an empty changeset This is intended to replace the proposed --delete flag.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Wed, 27 Jun 2012 03:51:54 +0200
parents 4bbc17716f5a
children e7431cf7fca9
line wrap: on
line diff
--- a/hgext/evolve.py	Wed Jun 27 03:37:49 2012 +0200
+++ b/hgext/evolve.py	Wed Jun 27 03:51:54 2012 +0200
@@ -610,6 +610,9 @@
             repo.dirstate.setparents(newid, node.nullid)
             _uncommitdirstate(repo, old, match)
             updatebookmarks(newid)
+            if not repo[newid].files():
+                ui.warn(_("new changeset is empty\n"))
+                ui.status(_('(use "hg kill ." to remove it)\n'))
         finally:
             wlock.release()
     finally: