mercurial/phases.py
changeset 17671 fdd0fc046cf1
parent 17537 31f32a96e1e3
child 17979 b3ec0b5fd777
--- a/mercurial/phases.py	Mon Sep 03 14:03:38 2012 +0200
+++ b/mercurial/phases.py	Mon Sep 03 14:05:19 2012 +0200
@@ -388,3 +388,6 @@
             msg = _("phases.new-commit: not a valid phase name ('%s')")
             raise error.ConfigError(msg % v)
 
+def hassecret(repo):
+    """utility function that check if a repo have any secret changeset."""
+    return bool(repo._phasecache.phaseroots[2])