Patchwork [7,of,9] hgk: add support for phases

login
register
mail settings
Submitter Andrew Shadura
Date March 10, 2013, 4:24 p.m.
Message ID <a057824795b78546bd36.1362932688@localhost.localdomain>
Download mbox | patch
Permalink /patch/1105/
State Accepted
Commit cf72fd8b3072158e1eb00a9131f57f803a763f72
Headers show

Comments

Andrew Shadura - March 10, 2013, 4:24 p.m.
# HG changeset patch
# User Andrew Shadura <bugzilla@tut.by>
# Date 1350418722 -7200
# Node ID a057824795b78546bd3647e368f03ed7926a34fa
# Parent  865a90404df1aa552546189d316494b806cf5709
hgk: add support for phases.

Add support for phases. Update tests.

Patch

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