hgk: add support for phases
Add support for phases. Update tests.
--- 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