~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Robert Collins
  • Date: 2006-03-05 11:48:54 UTC
  • mto: This revision was merged to the branch mainline in revision 1590.
  • Revision ID: robertc@robertcollins.net-20060305114854-d95dbe4adfee32e9
Make bound branch creation happen via 'checkout'

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
        self.runbzr('checkout branch checkout')
59
59
        out, err = self.runbzr('info checkout')
60
60
        self.assertEqualDiff(
 
61
"""branch format: Bazaar-NG Metadir branch format 5
 
62
bound to branch: %s
 
63
 
 
64
in the working tree:
 
65
         0 unchanged
 
66
         0 modified
 
67
         0 added
 
68
         0 removed
 
69
         0 renamed
 
70
         0 unknown
 
71
         0 ignored
 
72
         0 versioned subdirectories
 
73
 
 
74
branch history:
 
75
         0 revisions
 
76
         0 committers
 
77
 
 
78
revision store:
 
79
         0 revisions
 
80
         0 kB
 
81
""" % a_branch.bzrdir.root_transport.base,
 
82
        out)
 
83
        self.assertEqual('', err)
 
84
 
 
85
    def test_info_up_to_date_light_checkout(self):
 
86
        a_branch = self.make_branch_and_tree('branch')
 
87
        self.runbzr('checkout --lightweight branch checkout')
 
88
        out, err = self.runbzr('info checkout')
 
89
        self.assertEqualDiff(
61
90
"""working tree format: Bazaar-NG Working Tree format 3
62
91
branch location: %s
63
92
branch format: Bazaar-NG branch, format 6
136
165
        rev = a_branch.repository.get_revision(a_branch.revision_history()[0])
137
166
        datestring = format_date(rev.timestamp, rev.timezone)
138
167
        self.assertEqualDiff(
 
168
"""branch format: Bazaar-NG Metadir branch format 5
 
169
bound to branch: %s
 
170
 
 
171
Branch is out of date: missing 1 revision.
 
172
in the working tree:
 
173
         0 unchanged
 
174
         0 modified
 
175
         0 added
 
176
         0 removed
 
177
         0 renamed
 
178
         0 unknown
 
179
         0 ignored
 
180
         0 versioned subdirectories
 
181
 
 
182
branch history:
 
183
         0 revisions
 
184
         0 committers
 
185
 
 
186
revision store:
 
187
         0 revisions
 
188
         0 kB
 
189
""" % (a_branch.bzrdir.root_transport.base,
 
190
       ),
 
191
            out)
 
192
        self.assertEqual('', err)
 
193
 
 
194
    def test_info_out_of_date_light_checkout(self):
 
195
        # note this deliberately uses a checkout at 'None' to 
 
196
        # test the out of date message with a revision notin the 
 
197
        # revision history.
 
198
        a_branch = self.make_branch('branch')
 
199
        # make two checkouts
 
200
        self.runbzr('checkout --lightweight branch checkout')
 
201
        self.runbzr('checkout --lightweight branch checkout2')
 
202
        self.build_tree(['checkout/file'])
 
203
        self.runbzr('add checkout/file')
 
204
        self.runbzr('commit -m add-file checkout')
 
205
        # now checkout2 should be out of date
 
206
        out,err = self.runbzr('info checkout2')
 
207
        rev = a_branch.repository.get_revision(a_branch.revision_history()[0])
 
208
        datestring = format_date(rev.timestamp, rev.timezone)
 
209
        self.assertEqualDiff(
139
210
"""working tree format: Bazaar-NG Working Tree format 3
140
211
branch location: %s
141
212
branch format: Bazaar-NG branch, format 6