[PATCH hglib] test-summary: fix test due to bookmarks being separated from tags in hg >= 2.0

Idan Kamara idankk86 at gmail.com
Thu Nov 17 16:51:34 CST 2011


# HG changeset patch
# User Idan Kamara <idankk86 at gmail.com>
# Date 1321570187 -7200
# Node ID 6b016fe867f9eb990b7b88e7798fc5cf4ce5e110
# Parent  bfd1c264f6cba2c07a81d21bb2e7e8f2feaf8987
test-summary: fix test due to bookmarks being separated from tags in hg >= 2.0

diff --git a/tests/test-summary.py b/tests/test-summary.py
--- a/tests/test-summary.py
+++ b/tests/test-summary.py
@@ -74,14 +74,21 @@
 
         other.bookmark('bmother')
         d['remote'] = (1, 1, 0, 1)
-        d['parent'] = [(0, node[:12], 'tip bmother', 'first')]
+        if self.client.version < (2, 0, 0):
+            d['parent'] = [(0, node[:12], 'tip bmother', 'first')]
+        else:
+            d['bookmarks'] = '*bmother'
         self.assertEquals(other.summary(remote=True), d)
 
         self.append('other/a', 'a')
         rev, node = other.commit('second in other')
 
         d['remote'] = (1, 1, 1, 1)
-        d['parent'] = [(1, node[:12], 'tip bmother', 'second in other')]
+        if self.client.version < (2, 0, 0):
+            tags = 'tip bmother'
+        else:
+            tags = 'tip'
+        d['parent'] = [(1, node[:12], tags, 'second in other')]
 
         self.assertEquals(other.summary(remote=True), d)
 


More information about the Mercurial-devel mailing list