[PATCH 2 of 2] graft: add test to check the phase of new changesets

alain.leufroy at logilab.fr alain.leufroy at logilab.fr
Wed Jan 18 09:31:23 CST 2012


# HG changeset patch
# User Alain Leufroy <alain.leufroy at logilab.fr>
# Date 1326794903 -3600
# Node ID 2642ac9d28d1375eb8ca92baafa05c02d59a84c6
# Parent  bc15e2ee7a98041c65051a21880be29e303b5f8c
graft: add test to check the phase of new changesets

Graft actually do not keep the phase of the source
changesets: no need to change the graft code and add
test to check this behaviour.

diff -r bc15e2ee7a98 -r 2642ac9d28d1 tests/test-graft.t
--- a/tests/test-graft.t	Tue Jan 17 09:12:14 2012 +0100
+++ b/tests/test-graft.t	Tue Jan 17 11:08:23 2012 +0100
@@ -22,6 +22,24 @@
   $ hg merge -q default --tool internal:local
   $ hg branch -q default
   $ hg ci -m6
+  $ hg phase --public 3
+  $ hg phase --force --secret 6
+
+  $ hg --config extensions.graphlog= log -G --template '{author}@{rev}.{phase}: {desc}\n'
+  @    test at 6.secret: 6
+  |\
+  | o  test at 5.draft: 5
+  | |
+  o |  test at 4.draft: 4
+  |/
+  o  baz at 3.public: 3
+  |
+  o  test at 2.public: 2
+  |
+  o  bar at 1.public: 1
+  |
+  o  test at 0.public: 0
+  
 
 Need to specify a rev:
 
@@ -180,30 +198,30 @@
 
 View graph:
 
-  $ hg --config extensions.graphlog= log -G --template '{author}@{rev}: {desc}\n'
-  @  test at 11: 3
+  $ hg --config extensions.graphlog= log -G --template '{author}@{rev}.{phase}: {desc}\n'
+  @  test at 11.draft: 3
   |
-  o  test at 10: 4
+  o  test at 10.draft: 4
   |
-  o  test at 9: 5
+  o  test at 9.draft: 5
   |
-  o  bar at 8: 1
+  o  bar at 8.draft: 1
   |
-  o  foo at 7: 2
+  o  foo at 7.draft: 2
   |
-  | o    test at 6: 6
+  | o    test at 6.secret: 6
   | |\
-  | | o  test at 5: 5
+  | | o  test at 5.draft: 5
   | | |
-  | o |  test at 4: 4
+  | o |  test at 4.draft: 4
   | |/
-  | o  baz at 3: 3
+  | o  baz at 3.public: 3
   | |
-  | o  test at 2: 2
+  | o  test at 2.public: 2
   | |
-  | o  bar at 1: 1
+  | o  bar at 1.public: 1
   |/
-  o  test at 0: 0
+  o  test at 0.public: 0
   
 Graft again onto another branch should preserve the original source
   $ hg up -q 0


More information about the Mercurial-devel mailing list