~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-02-17 08:59:19 UTC
  • mfrom: (5037.2.1 doc)
  • Revision ID: pqm@pqm.ubuntu.com-20100217085919-23vc62bvq8848q65
(mbp) rest markup fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006, 2007, 2008 Canonical Ltd
 
1
# Copyright (C) 2006-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
25
25
    errors,
26
26
    info,
27
27
    osutils,
 
28
    tests,
28
29
    upgrade,
29
30
    urlutils,
30
31
    )
31
 
from bzrlib.osutils import format_date
32
 
from bzrlib.tests import TestSkipped, MemoryServer
33
 
from bzrlib.tests.blackbox import ExternalBase
34
 
 
35
 
 
36
 
class TestInfo(ExternalBase):
 
32
from bzrlib.transport import memory
 
33
 
 
34
 
 
35
class TestInfo(tests.TestCaseWithTransport):
37
36
 
38
37
    def setUp(self):
39
 
        ExternalBase.setUp(self)
 
38
        super(TestInfo, self).setUp()
40
39
        self._repo_strings = "2a"
41
40
 
42
41
    def test_info_non_existing(self):
43
 
        self.vfs_transport_factory = MemoryServer
 
42
        self.vfs_transport_factory = memory.MemoryServer
44
43
        location = self.get_url()
45
44
        out, err = self.run_bzr('info '+location, retcode=3)
46
45
        self.assertEqual(out, '')
127
126
        self.assertEqual('', err)
128
127
        tree1.commit('commit one')
129
128
        rev = branch1.repository.get_revision(branch1.revision_history()[0])
130
 
        datestring_first = format_date(rev.timestamp, rev.timezone)
 
129
        datestring_first = osutils.format_date(rev.timestamp, rev.timezone)
131
130
 
132
131
        # Branch standalone with push location
133
132
        branch2 = branch1.bzrdir.sprout('branch').open_branch()
315
314
        tree1.add('b')
316
315
        tree1.commit('commit two')
317
316
        rev = branch1.repository.get_revision(branch1.revision_history()[-1])
318
 
        datestring_last = format_date(rev.timestamp, rev.timezone)
 
317
        datestring_last = osutils.format_date(rev.timestamp, rev.timezone)
319
318
 
320
319
        # Out of date branched standalone branch will not be detected
321
320
        out, err = self.run_bzr('info -v branch')
569
568
        tree2.add('a')
570
569
        tree2.commit('commit one')
571
570
        rev = repo.get_revision(branch2.revision_history()[0])
572
 
        datestring_first = format_date(rev.timestamp, rev.timezone)
 
571
        datestring_first = osutils.format_date(rev.timestamp, rev.timezone)
573
572
        out, err = self.run_bzr('info tree/lightcheckout --verbose')
574
573
        self.assertEqualDiff(
575
574
"""Lightweight checkout (format: %s)
688
687
 
689
688
        # Out of date lightweight checkout
690
689
        rev = repo.get_revision(branch1.revision_history()[-1])
691
 
        datestring_last = format_date(rev.timestamp, rev.timezone)
 
690
        datestring_last = osutils.format_date(rev.timestamp, rev.timezone)
692
691
        out, err = self.run_bzr('info tree/lightcheckout --verbose')
693
692
        self.assertEqualDiff(
694
693
"""Lightweight checkout (format: %s)
844
843
        tree1.add('a')
845
844
        tree1.commit('commit one')
846
845
        rev = repo.get_revision(branch1.revision_history()[0])
847
 
        datestring_first = format_date(rev.timestamp, rev.timezone)
 
846
        datestring_first = osutils.format_date(rev.timestamp, rev.timezone)
848
847
        out, err = self.run_bzr('info -v repo/branch1')
849
848
        self.assertEqualDiff(
850
849
"""Repository tree (format: knit)