Source

hgsubversion-queue / test-hex.diff

Full commit
# HG changeset patch
# User Dan Villiom Podlaski Christiansen <danchr@gmail.com>
# Date 1323817677 -3600
# Node ID ab9afeb2e13be389c49cfaf1c7ebbd2a2fcf5ee9
# Parent  331d81952b556297cf3aec5c0a6b1cd3e6301c29
tests: hexadecimal hashes are more readable than their binary brethren

diff --git a/tests/comprehensive/test_stupid_pull.py b/tests/comprehensive/test_stupid_pull.py
--- a/tests/comprehensive/test_stupid_pull.py
+++ b/tests/comprehensive/test_stupid_pull.py
@@ -4,6 +4,7 @@ import sys
 import unittest
 
 from mercurial import hg
+from mercurial import node
 from mercurial import ui
 
 # wrapped in a try/except because of weirdness in how
@@ -33,7 +34,9 @@ def _do_case(self, name, layout):
     if layout == 'single':
         self.assertEqual(len(self.repo.heads()), 1)
     self.repo2 = hg.repository(ui.ui(), wc2_path)
-    self.assertEqual(self.repo.heads(), self.repo2.heads())
+    normalheads = [node.hex(n) for n in self.repo.heads()]
+    stupidheads = [node.hex(n) for n in self.repo2.heads()]
+    self.assertEqual(normalheads, stupidheads)
 
 
 def buildmethod(case, name, layout):