~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_log.py

  • Committer: John Arbash Meinel
  • Date: 2011-05-11 11:35:28 UTC
  • mto: This revision was merged to the branch mainline in revision 5851.
  • Revision ID: john@arbash-meinel.com-20110511113528-qepibuwxicjrbb2h
Break compatibility with python <2.6.

This includes auditing the code for places where we were doing
explicit 'sys.version' checks and removing them as appropriate.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
from itertools import izip
21
21
import os
22
 
import re
23
22
 
24
23
from bzrlib import (
25
24
    branchbuilder,
29
28
    tests,
30
29
    )
31
30
from bzrlib.tests import (
32
 
    script,
33
31
    test_log,
34
32
    )
35
33
 
924
922
        self.prepare_tree()
925
923
        os.chdir("dir1")
926
924
        self.assertLogRevnos(['dir2', 'file5'], ['5', '3'])
 
925
 
 
926
 
 
927
class MainlineGhostTests(TestLogWithLogCatcher):
 
928
 
 
929
    def setUp(self):
 
930
        super(MainlineGhostTests, self).setUp()
 
931
        tree = self.make_branch_and_tree('')
 
932
        tree.set_parent_ids(["spooky"], allow_leftmost_as_ghost=True)
 
933
        tree.add('')
 
934
        tree.commit('msg1', rev_id='rev1')
 
935
        tree.commit('msg2', rev_id='rev2')
 
936
 
 
937
    def test_log_range(self):
 
938
        self.assertLogRevnos(["-r1..2"], ["2", "1"])
 
939
 
 
940
    def test_log_norange(self):
 
941
        self.assertLogRevnos([], ["2", "1"])
 
942
 
 
943
    def test_log_range_open_begin(self):
 
944
        raise tests.KnownFailure("log with ghosts fails. bug #726466")
 
945
        (stdout, stderr) = self.run_bzr(['log', '-r..2'], retcode=3)
 
946
        self.assertEqual(["2", "1"],
 
947
                         [r.revno for r in self.get_captured_revisions()])
 
948
        self.assertEquals("bzr: ERROR: Further revision history missing.", stderr)
 
949
 
 
950
    def test_log_range_open_end(self):
 
951
        self.assertLogRevnos(["-r1.."], ["2", "1"])