/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 bzrlib/tests/blackbox/test_log.py

  • Committer: Vincent Ladeuil
  • Date: 2011-12-15 14:47:22 UTC
  • mto: This revision was merged to the branch mainline in revision 6377.
  • Revision ID: v.ladeuil+lp@free.fr-20111215144722-fie3up92mth126r5
Relax constraints on bzr log -rX..Y by falling back to the slower implementation when needed

Show diffs side-by-side

added added

removed removed

Lines of Context:
205
205
        # 4  1.1.4
206
206
        # | /
207
207
        # 5
 
208
        # | \
 
209
        # | 5.1.1
 
210
        # | /
 
211
        # 6
208
212
 
209
213
        # mainline
210
214
        builder.build_snapshot('1', None, [
223
227
        builder.build_snapshot('1.1.4', ['1.1.3', '4'], [])
224
228
        # merge branch into mainline
225
229
        builder.build_snapshot('5', ['4', '1.1.4'], [])
 
230
        builder.build_snapshot('5.1.1', ['5'], [])
 
231
        builder.build_snapshot('6', ['5', '5.1.1'], [])
226
232
        builder.finish_series()
227
233
 
228
234
    def test_n0(self):
241
247
        self.assertLogRevnos(['-n1', '-r1.1.1..1.1.4', '--forward'],
242
248
                             ['1.1.1', '1.1.2', '1.1.3', '1.1.4'])
243
249
 
 
250
    def test_fallback_when_end_rev_is_not_on_mainline(self):
 
251
        self.assertLogRevnos(['-n1', '-r1.1.1..5.1.1'],
 
252
                             # We don't get 1.1.1 because we say -n1
 
253
                             ['5.1.1', '5', '4', '3'])
 
254
 
244
255
 
245
256
class Test_GenerateAllRevisions(TestLogWithLogCatcher):
246
257
 
258
269
        # The graph below may look a bit complicated (and it may be but I've
259
270
        # banged my head enough on it) but the bug requires at least dotted
260
271
        # revnos *and* merged revisions below that.
 
272
        # 1
 
273
        # | \
 
274
        # 2  1.1.1
 
275
        # | X
 
276
        # 3  2.1.1
 
277
        # |   |    \
 
278
        # |  2.1.2  2.2.1
 
279
        # |   |    X
 
280
        # |  2.1.3  \
 
281
        # | /       /
 
282
        # 4        /
 
283
        # |       /
 
284
        # 5 -----/
261
285
        builder.build_snapshot('1', None, [
262
286
            ('add', ('', 'root-id', 'directory', ''))])
263
287
        builder.build_snapshot('2', ['1'], [])
382
406
    def test_log_reversed_dotted_revspecs(self):
383
407
        self.make_merged_branch()
384
408
        self.run_bzr_error(('bzr: ERROR: Start revision not found in '
385
 
                            'left-hand history of end revision.\n',),
 
409
                            'history of end revision.\n',),
386
410
                           "log -r 1.1.1..1")
387
411
 
388
412
    def test_log_bad_message_re(self):