/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/test_dirstate.py

  • Committer: Martin
  • Date: 2017-11-12 13:53:51 UTC
  • mto: This revision was merged to the branch mainline in revision 6810.
  • Revision ID: gzlist@googlemail.com-20171112135351-uyr1ncw7visg62c2
Apply 2to3 ws_comma fixer

Show diffs side-by-side

added added

removed removed

Lines of Context:
255
255
        f_len = len(f_text)
256
256
        null_stat = dirstate.DirState.NULLSTAT
257
257
        expected = {
258
 
            '':(('', '', 'TREE_ROOT'), [
 
258
            '': (('', '', 'TREE_ROOT'), [
259
259
                  ('d', '', 0, False, null_stat),
260
260
                  ('d', '', 0, False, revision_id),
261
261
                ]),
262
 
            'a':(('', 'a', 'a-id'), [
 
262
            'a': (('', 'a', 'a-id'), [
263
263
                   ('f', '', 0, False, null_stat),
264
264
                   ('f', a_sha, a_len, False, revision_id),
265
265
                 ]),
266
 
            'b':(('', 'b', 'b-id'), [
 
266
            'b': (('', 'b', 'b-id'), [
267
267
                  ('d', '', 0, False, null_stat),
268
268
                  ('d', '', 0, False, revision_id),
269
269
                 ]),
270
 
            'b/c':(('b', 'c', 'c-id'), [
 
270
            'b/c': (('b', 'c', 'c-id'), [
271
271
                    ('f', '', 0, False, null_stat),
272
272
                    ('f', c_sha, c_len, False, revision_id),
273
273
                   ]),
274
 
            'b/d':(('b', 'd', 'd-id'), [
 
274
            'b/d': (('b', 'd', 'd-id'), [
275
275
                    ('d', '', 0, False, null_stat),
276
276
                    ('d', '', 0, False, revision_id),
277
277
                   ]),
278
 
            'b/d/e':(('b/d', 'e', 'e-id'), [
 
278
            'b/d/e': (('b/d', 'e', 'e-id'), [
279
279
                      ('f', '', 0, False, null_stat),
280
280
                      ('f', e_sha, e_len, False, revision_id),
281
281
                     ]),
282
 
            'b-c':(('', 'b-c', 'b-c-id'), [
 
282
            'b-c': (('', 'b-c', 'b-c-id'), [
283
283
                      ('f', '', 0, False, null_stat),
284
284
                      ('f', b_c_sha, b_c_len, False, revision_id),
285
285
                     ]),
286
 
            'f':(('', 'f', 'f-id'), [
 
286
            'f': (('', 'f', 'f-id'), [
287
287
                  ('f', '', 0, False, null_stat),
288
288
                  ('f', f_sha, f_len, False, revision_id),
289
289
                 ]),
2027
2027
        """Test bisect when there is only 1 page to read"""
2028
2028
        tree, state, expected = self.create_basic_dirstate()
2029
2029
        state._bisect_page_size = 5000
2030
 
        self.assertBisect(expected,[['']], state, [''])
2031
 
        self.assertBisect(expected,[['a']], state, ['a'])
2032
 
        self.assertBisect(expected,[['b']], state, ['b'])
2033
 
        self.assertBisect(expected,[['b/c']], state, ['b/c'])
2034
 
        self.assertBisect(expected,[['b/d']], state, ['b/d'])
2035
 
        self.assertBisect(expected,[['b/d/e']], state, ['b/d/e'])
2036
 
        self.assertBisect(expected,[['b-c']], state, ['b-c'])
2037
 
        self.assertBisect(expected,[['f']], state, ['f'])
2038
 
        self.assertBisect(expected,[['a'], ['b'], ['f']],
 
2030
        self.assertBisect(expected, [['']], state, [''])
 
2031
        self.assertBisect(expected, [['a']], state, ['a'])
 
2032
        self.assertBisect(expected, [['b']], state, ['b'])
 
2033
        self.assertBisect(expected, [['b/c']], state, ['b/c'])
 
2034
        self.assertBisect(expected, [['b/d']], state, ['b/d'])
 
2035
        self.assertBisect(expected, [['b/d/e']], state, ['b/d/e'])
 
2036
        self.assertBisect(expected, [['b-c']], state, ['b-c'])
 
2037
        self.assertBisect(expected, [['f']], state, ['f'])
 
2038
        self.assertBisect(expected, [['a'], ['b'], ['f']],
2039
2039
                          state, ['a', 'b', 'f'])
2040
2040
        self.assertBisect(expected, [['b/d'], ['b/d/e'], ['f']],
2041
2041
                          state, ['b/d', 'b/d/e', 'f'])