hgk: add support for phases
authorAndrew Shadura <bugzilla@tut.by>
Fri, 22 Mar 2013 09:19:41 -0700
changeset 18807 cf72fd8b3072
parent 18806 932f5d3587c9
child 18808 962844e8dd8e
hgk: add support for phases Add support for phases. Update tests.
hgext/hgk.py
tests/test-hgk.t
--- a/hgext/hgk.py	Sun Mar 10 16:42:23 2013 +0100
+++ b/hgext/hgk.py	Fri Mar 22 09:19:41 2013 -0700
@@ -35,7 +35,7 @@
 '''
 
 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 @@
     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,
--- a/tests/test-hgk.t	Sun Mar 10 16:42:23 2013 +0100
+++ b/tests/test-hgk.t	Fri Mar 22 09:19:41 2013 -0700
@@ -13,6 +13,7 @@
   author test 0 0
   revision 0
   branch default
+  phase draft
   
   adda