~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Andrew Bennetts
  • Date: 2010-01-13 23:16:20 UTC
  • mfrom: (4957 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4960.
  • Revision ID: andrew.bennetts@canonical.com-20100113231620-n6in2yjib2v6z03g
MergeĀ lp:bzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2010 Canonical Ltd
 
1
# Copyright (C) 2006, 2007, 2008 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,
29
28
    upgrade,
30
29
    urlutils,
31
30
    )
32
 
from bzrlib.transport import memory
33
 
 
34
 
 
35
 
class TestInfo(tests.TestCaseWithTransport):
 
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):
36
37
 
37
38
    def setUp(self):
38
 
        super(TestInfo, self).setUp()
39
 
        self._repo_strings = "2a"
 
39
        ExternalBase.setUp(self)
 
40
        self._repo_strings = "2a or development-subtree"
40
41
 
41
42
    def test_info_non_existing(self):
42
 
        self.vfs_transport_factory = memory.MemoryServer
 
43
        self.vfs_transport_factory = MemoryServer
43
44
        location = self.get_url()
44
45
        out, err = self.run_bzr('info '+location, retcode=3)
45
46
        self.assertEqual(out, '')
126
127
        self.assertEqual('', err)
127
128
        tree1.commit('commit one')
128
129
        rev = branch1.repository.get_revision(branch1.revision_history()[0])
129
 
        datestring_first = osutils.format_date(rev.timestamp, rev.timezone)
 
130
        datestring_first = format_date(rev.timestamp, rev.timezone)
130
131
 
131
132
        # Branch standalone with push location
132
133
        branch2 = branch1.bzrdir.sprout('branch').open_branch()
212
213
         0 added
213
214
         0 removed
214
215
         0 renamed
215
 
         0 unknown
216
 
         1 ignored
 
216
         1 unknown
 
217
         0 ignored
217
218
         0 versioned subdirectories
218
219
 
219
220
Branch history:
314
315
        tree1.add('b')
315
316
        tree1.commit('commit two')
316
317
        rev = branch1.repository.get_revision(branch1.revision_history()[-1])
317
 
        datestring_last = osutils.format_date(rev.timestamp, rev.timezone)
 
318
        datestring_last = format_date(rev.timestamp, rev.timezone)
318
319
 
319
320
        # Out of date branched standalone branch will not be detected
320
321
        out, err = self.run_bzr('info -v branch')
380
381
         0 added
381
382
         0 removed
382
383
         0 renamed
383
 
         0 unknown
384
 
         1 ignored
 
384
         1 unknown
 
385
         0 ignored
385
386
         0 versioned subdirectories
386
387
 
387
388
Branch history:
568
569
        tree2.add('a')
569
570
        tree2.commit('commit one')
570
571
        rev = repo.get_revision(branch2.revision_history()[0])
571
 
        datestring_first = osutils.format_date(rev.timestamp, rev.timezone)
 
572
        datestring_first = format_date(rev.timestamp, rev.timezone)
572
573
        out, err = self.run_bzr('info tree/lightcheckout --verbose')
573
574
        self.assertEqualDiff(
574
575
"""Lightweight checkout (format: %s)
687
688
 
688
689
        # Out of date lightweight checkout
689
690
        rev = repo.get_revision(branch1.revision_history()[-1])
690
 
        datestring_last = osutils.format_date(rev.timestamp, rev.timezone)
 
691
        datestring_last = format_date(rev.timestamp, rev.timezone)
691
692
        out, err = self.run_bzr('info tree/lightcheckout --verbose')
692
693
        self.assertEqualDiff(
693
694
"""Lightweight checkout (format: %s)
843
844
        tree1.add('a')
844
845
        tree1.commit('commit one')
845
846
        rev = repo.get_revision(branch1.revision_history()[0])
846
 
        datestring_first = osutils.format_date(rev.timestamp, rev.timezone)
 
847
        datestring_first = format_date(rev.timestamp, rev.timezone)
847
848
        out, err = self.run_bzr('info -v repo/branch1')
848
849
        self.assertEqualDiff(
849
850
"""Repository tree (format: knit)