/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_annotate.py

  • Committer: Jelmer Vernooij
  • Date: 2018-03-24 17:48:04 UTC
  • mfrom: (6921 work)
  • mto: This revision was merged to the branch mainline in revision 6923.
  • Revision ID: jelmer@jelmer.uk-20180324174804-xf22o05byoj12x1q
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
185
185
            ], timestamp=1166046000.00, timezone=0, committer="joe@foo.com",
186
186
            revision_id='rev-1')
187
187
        builder.build_snapshot(['rev-1'], [
188
 
            ('modify', ('a', 'first\nsecond\n')),
 
188
            ('modify', ('a-id', 'first\nsecond\n')),
189
189
            ], timestamp=1166046001.00, timezone=0, committer="joe@foo.com",
190
190
            revision_id='rev-2')
191
191
        builder.build_snapshot(['rev-1'], [
192
 
            ('modify', ('a', 'first\nthird\n')),
 
192
            ('modify', ('a-id', 'first\nthird\n')),
193
193
            ], timestamp=1166046002.00, timezone=0, committer="barry@foo.com",
194
194
            revision_id='rev-1_1_1')
195
195
        builder.build_snapshot(['rev-2', 'rev-1_1_1'], [
196
 
            ('modify', ('a', 'first\nsecond\nthird\n')),
 
196
            ('modify', ('a-id', 'first\nsecond\nthird\n')),
197
197
            ], timestamp=1166046003.00, timezone=0, committer="sal@foo.com",
198
198
            revision_id='rev-3')
199
199
        return builder
225
225
        builder.build_snapshot(['rev-1_1_1'], [], revision_id='rev-1_1_2')
226
226
        builder.build_snapshot(['rev-3', 'rev-1_1_2'], [], revision_id='rev-4')
227
227
        builder.build_snapshot(['rev-1_1_1'], [
228
 
            ('modify', ('a', 'first\nthird\nfourth\n')),
 
228
            ('modify', ('a-id', 'first\nthird\nfourth\n')),
229
229
            ], timestamp=1166046003.00, timezone=0, committer="jerry@foo.com",
230
230
            revision_id='rev-1_2_1')
231
231
        builder.build_snapshot(['rev-1_2_1'], [],
232
232
            timestamp=1166046004.00, timezone=0, committer="jerry@foo.com",
233
233
            revision_id='rev-1_2_2')
234
234
        builder.build_snapshot(['rev-4', 'rev-1_2_2'], [
235
 
            ('modify', ('a', 'first\nsecond\nthird\nfourth\n')),
 
235
            ('modify', ('a-id', 'first\nsecond\nthird\nfourth\n')),
236
236
            ], timestamp=1166046004.00, timezone=0, committer="jerry@foo.com",
237
237
            revision_id='rev-5')
238
238
        builder.build_snapshot(['rev-1_2_1'], [
239
 
            ('modify', ('a', 'first\nthird\nfourth\nfifth\nsixth\n')),
 
239
            ('modify', ('a-id', 'first\nthird\nfourth\nfifth\nsixth\n')),
240
240
            ], timestamp=1166046005.00, timezone=0, committer="george@foo.com",
241
241
            revision_id='rev-1_3_1')
242
242
        builder.build_snapshot(['rev-5', 'rev-1_3_1'], [
243
 
            ('modify', ('a',
 
243
            ('modify', ('a-id',
244
244
                        'first\nsecond\nthird\nfourth\nfifth\nsixth\n')),
245
245
            ], revision_id='rev-6')
246
246
        return builder
260
260
            ('add', ('file', 'file-id', 'file', base_text)),
261
261
            ], revision_id='rev-base')
262
262
        builder.build_snapshot(['rev-base'], [
263
 
            ('modify', ('file', a_text))],
 
263
            ('modify', ('file-id', a_text))],
264
264
            revision_id='rev-A')
265
265
        builder.build_snapshot(['rev-base'], [
266
 
            ('modify', ('file', b_text))],
 
266
            ('modify', ('file-id', b_text))],
267
267
            revision_id='rev-B')
268
268
        builder.build_snapshot(['rev-A'], [
269
 
            ('modify', ('file', c_text))],
 
269
            ('modify', ('file-id', c_text))],
270
270
            revision_id='rev-C')
271
271
        builder.build_snapshot(['rev-B', 'rev-A'], [
272
 
            ('modify', ('file', d_text))],
 
272
            ('modify', ('file-id', d_text))],
273
273
            revision_id='rev-D')
274
274
        builder.build_snapshot(['rev-C', 'rev-D'], [
275
 
            ('modify', ('file', e_text))],
 
275
            ('modify', ('file-id', e_text))],
276
276
            revision_id='rev-E')
277
277
        return builder
278
278
 
399
399
    def test_annotate_unicode_author(self):
400
400
        tree1 = self.make_branch_and_tree('tree1')
401
401
 
402
 
        self.build_tree_contents([('tree1/a', b'adi\xc3\xb3s')])
403
 
        tree1.add(['a'], [b'a-id'])
404
 
        tree1.commit('a', rev_id=b'rev-1',
 
402
        self.build_tree_contents([('tree1/a', 'adi\xc3\xb3s')])
 
403
        tree1.add(['a'], ['a-id'])
 
404
        tree1.commit('a', rev_id='rev-1',
405
405
                     committer=u'Pepe P\xe9rez <pperez@ejemplo.com>',
406
406
                     timestamp=1166046000.00, timezone=0)
407
407
 
408
 
        self.build_tree_contents([('tree1/b', b'bye')])
409
 
        tree1.add(['b'], [b'b-id'])
410
 
        tree1.commit('b', rev_id=b'rev-2',
 
408
        self.build_tree_contents([('tree1/b', 'bye')])
 
409
        tree1.add(['b'], ['b-id'])
 
410
        tree1.commit('b', rev_id='rev-2',
411
411
                     committer=u'p\xe9rez',
412
412
                     timestamp=1166046000.00, timezone=0)
413
413
 
437
437
    def test_annotate_author_or_committer(self):
438
438
        tree1 = self.make_branch_and_tree('tree1')
439
439
 
440
 
        self.build_tree_contents([('tree1/a', b'hello')])
441
 
        tree1.add(['a'], [b'a-id'])
442
 
        tree1.commit('a', rev_id=b'rev-1',
 
440
        self.build_tree_contents([('tree1/a', 'hello')])
 
441
        tree1.add(['a'], ['a-id'])
 
442
        tree1.commit('a', rev_id='rev-1',
443
443
                     committer='Committer <committer@example.com>',
444
444
                     timestamp=1166046000.00, timezone=0)
445
445
 
446
 
        self.build_tree_contents([('tree1/b', b'bye')])
447
 
        tree1.add(['b'], [b'b-id'])
448
 
        tree1.commit('b', rev_id=b'rev-2',
 
446
        self.build_tree_contents([('tree1/b', 'bye')])
 
447
        tree1.add(['b'], ['b-id'])
 
448
        tree1.commit('b', rev_id='rev-2',
449
449
                     committer='Committer <committer@example.com>',
450
450
                     authors=['Author <author@example.com>'],
451
451
                     timestamp=1166046000.00, timezone=0)