# HG changeset patch
# User Andrew Shadura <bugzilla@tut.by>
# Date 2013-03-22 16:19:41
# Node ID cf72fd8b3072158e1eb00a9131f57f803a763f72
# Parent  932f5d3587c986c7378b2f13521d67424f30b395

hgk: add support for phases

Add support for phases. Update tests.

diff --git a/hgext/hgk.py b/hgext/hgk.py
--- a/hgext/hgk.py
+++ b/hgext/hgk.py
@@ -35,7 +35,7 @@ vdiff on hovered and selected revisions.
 '''
 
 import os
-from mercurial import commands, util, patch, revlog, scmutil
+from mercurial import commands, util, patch, revlog, scmutil, phases
 from mercurial.node import nullid, nullrev, short
 from mercurial.i18n import _
 
@@ -114,7 +114,8 @@ def catcommit(ui, repo, n, prefix, ctx=N
     if committer != '':
         ui.write(("committer %s %s %s\n" % (committer, int(date[0]), date[1])))
     ui.write(("revision %d\n" % ctx.rev()))
-    ui.write(("branch %s\n\n" % ctx.branch()))
+    ui.write(("branch %s\n" % ctx.branch()))
+    ui.write(("phase %s\n\n" % ctx.phasestr()))
 
     if prefix != "":
         ui.write("%s%s\n" % (prefix,
diff --git a/tests/test-hgk.t b/tests/test-hgk.t
--- a/tests/test-hgk.t
+++ b/tests/test-hgk.t
@@ -13,6 +13,7 @@ Minimal hgk check
   author test 0 0
   revision 0
   branch default
+  phase draft
   
   adda