Rev 2659: Fix mismatch between KnitGraphIndex and KnitIndex in get_options. in http://people.ubuntu.com/~robertc/baz2.0/knits

Robert Collins robertc at robertcollins.net
Mon Jul 30 06:02:14 BST 2007


At http://people.ubuntu.com/~robertc/baz2.0/knits

------------------------------------------------------------
revno: 2659
revision-id: robertc at robertcollins.net-20070730050210-2acxfrs1glrjexix
parent: pqm at pqm.ubuntu.com-20070728030946-tfjmxwe9y2eq1gzo
committer: Robert Collins <robertc at robertcollins.net>
branch nick: knits
timestamp: Mon 2007-07-30 15:02:10 +1000
message:
  Fix mismatch between KnitGraphIndex and KnitIndex in get_options.
modified:
  bzrlib/knit.py                 knit.py-20051212171256-f056ac8f0fbe1bd9
  bzrlib/tests/test_knit.py      test_knit.py-20051212171302-95d4c00dd5f11f2b
=== modified file 'bzrlib/knit.py'
--- a/bzrlib/knit.py	2007-07-27 06:17:00 +0000
+++ b/bzrlib/knit.py	2007-07-30 05:02:10 +0000
@@ -1570,7 +1570,7 @@
             options = [self._parent_compression(node[2][1])]
         if node[1][0] == 'N':
             options.append('no-eol')
-        return ','.join(options)
+        return options
 
     def get_parents(self, version_id):
         """Return parents of specified version ignoring ghosts."""

=== modified file 'bzrlib/tests/test_knit.py'
--- a/bzrlib/tests/test_knit.py	2007-07-27 05:46:46 +0000
+++ b/bzrlib/tests/test_knit.py	2007-07-30 05:02:10 +0000
@@ -1735,14 +1735,14 @@
 
     def test_get_options_deltas(self):
         index = self.two_graph_index(deltas=True)
-        self.assertEqual('fulltext,no-eol', index.get_options('tip'))
-        self.assertEqual('line-delta', index.get_options('parent'))
+        self.assertEqual(['fulltext', 'no-eol'], index.get_options('tip'))
+        self.assertEqual(['line-delta'], index.get_options('parent'))
 
     def test_get_options_no_deltas(self):
         # check that the parent-history lookup is ignored with deltas=False.
         index = self.two_graph_index(deltas=False)
-        self.assertEqual('fulltext,no-eol', index.get_options('tip'))
-        self.assertEqual('fulltext', index.get_options('parent'))
+        self.assertEqual(['fulltext', 'no-eol'], index.get_options('tip'))
+        self.assertEqual(['fulltext'], index.get_options('parent'))
 
     def test_get_parents(self):
         # get_parents ignores ghosts
@@ -2008,12 +2008,12 @@
     def test_get_method(self):
         index = self.two_graph_index()
         self.assertEqual('fulltext', index.get_method('tip'))
-        self.assertEqual('fulltext', index.get_options('parent'))
+        self.assertEqual(['fulltext'], index.get_options('parent'))
 
     def test_get_options(self):
         index = self.two_graph_index()
-        self.assertEqual('fulltext,no-eol', index.get_options('tip'))
-        self.assertEqual('fulltext', index.get_options('parent'))
+        self.assertEqual(['fulltext', 'no-eol'], index.get_options('tip'))
+        self.assertEqual(['fulltext'], index.get_options('parent'))
 
     def test_get_parents(self):
         index = self.two_graph_index()



More information about the bazaar-commits mailing list