/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_info.py

  • Committer: John Arbash Meinel
  • Date: 2007-02-08 16:28:05 UTC
  • mto: This revision was merged to the branch mainline in revision 2278.
  • Revision ID: john@arbash-meinel.com-20070208162805-dcqiqrwjh9a5lo7n
``GPGStrategy.sign()`` will now raise ``BzrBadParameterUnicode`` if
you pass a Unicode string rather than an 8-bit string. It doesn't 
make sense to sign a Unicode string, and it turns out that some 
versions of python will write out the raw Unicode bytes rather than
encoding automatically. So fail and make callers do the right thing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2006 Canonical Ltd
 
2
# -*- coding: utf-8 -*-
 
3
#
 
4
# This program is free software; you can redistribute it and/or modify
 
5
# it under the terms of the GNU General Public License as published by
 
6
# the Free Software Foundation; either version 2 of the License, or
 
7
# (at your option) any later version.
 
8
#
 
9
# This program is distributed in the hope that it will be useful,
 
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
# GNU General Public License for more details.
 
13
#
 
14
# You should have received a copy of the GNU General Public License
 
15
# along with this program; if not, write to the Free Software
 
16
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
17
 
 
18
 
 
19
"""Tests for the info command of bzr."""
 
20
 
 
21
import sys
 
22
 
 
23
import bzrlib
 
24
from bzrlib import (
 
25
    bzrdir,
 
26
    repository,
 
27
    )
 
28
from bzrlib.osutils import format_date
 
29
from bzrlib.tests import TestSkipped
 
30
from bzrlib.tests.blackbox import ExternalBase
 
31
 
 
32
 
 
33
class TestInfo(ExternalBase):
 
34
 
 
35
    def test_info_non_existing(self):
 
36
        if sys.platform == "win32":
 
37
            location = "C:/i/do/not/exist/"
 
38
        else:
 
39
            location = "/i/do/not/exist/"
 
40
        out, err = self.runbzr('info '+location, retcode=3)
 
41
        self.assertEqual(out, '')
 
42
        self.assertEqual(err, 'bzr: ERROR: Not a branch: %s\n' % location)
 
43
 
 
44
    def test_info_standalone(self):
 
45
        transport = self.get_transport()
 
46
 
 
47
        # Create initial standalone branch
 
48
        tree1 = self.make_branch_and_tree('standalone', 'weave')
 
49
        self.build_tree(['standalone/a'])
 
50
        tree1.add('a')
 
51
        branch1 = tree1.branch
 
52
        out, err = self.runbzr('info standalone')
 
53
        self.assertEqualDiff(
 
54
"""Location:
 
55
  branch root: %s
 
56
 
 
57
Format:
 
58
       control: All-in-one format 6
 
59
  working tree: Working tree format 2
 
60
        branch: Branch format 4
 
61
    repository: Weave repository format 6
 
62
 
 
63
In the working tree:
 
64
         0 unchanged
 
65
         0 modified
 
66
         1 added
 
67
         0 removed
 
68
         0 renamed
 
69
         0 unknown
 
70
         0 ignored
 
71
         0 versioned subdirectories
 
72
 
 
73
Branch history:
 
74
         0 revisions
 
75
 
 
76
Revision store:
 
77
         0 revisions
 
78
         0 KiB
 
79
""" % branch1.bzrdir.root_transport.base, out)
 
80
        self.assertEqual('', err)
 
81
        tree1.commit('commit one')
 
82
        rev = branch1.repository.get_revision(branch1.revision_history()[0])
 
83
        datestring_first = format_date(rev.timestamp, rev.timezone)
 
84
 
 
85
        # Branch standalone with push location
 
86
        branch2 = branch1.bzrdir.sprout('branch').open_branch()
 
87
        branch2.set_push_location(branch1.bzrdir.root_transport.base)
 
88
        out, err = self.runbzr('info branch --verbose')
 
89
        self.assertEqualDiff(
 
90
"""Location:
 
91
  branch root: %s
 
92
 
 
93
Related branches:
 
94
      parent branch: %s
 
95
  publish to branch: %s
 
96
 
 
97
Format:
 
98
       control: All-in-one format 6
 
99
  working tree: Working tree format 2
 
100
        branch: Branch format 4
 
101
    repository: Weave repository format 6
 
102
 
 
103
In the working tree:
 
104
         1 unchanged
 
105
         0 modified
 
106
         0 added
 
107
         0 removed
 
108
         0 renamed
 
109
         0 unknown
 
110
         0 ignored
 
111
         0 versioned subdirectories
 
112
 
 
113
Branch history:
 
114
         1 revision
 
115
         1 committer
 
116
         0 days old
 
117
   first revision: %s
 
118
  latest revision: %s
 
119
 
 
120
Revision store:
 
121
         1 revision
 
122
         %d KiB
 
123
""" % (branch2.bzrdir.root_transport.base,
 
124
       branch1.bzrdir.root_transport.base,
 
125
       branch1.bzrdir.root_transport.base,
 
126
       datestring_first, datestring_first,
 
127
       # poking at _revision_store isn't all that clean, but neither is
 
128
       # having the ui test dependent on the exact overhead of a given store.
 
129
       branch2.repository._revision_store.total_size(
 
130
        branch2.repository.get_transaction())[1] / 1024,
 
131
       ), out)
 
132
        self.assertEqual('', err)
 
133
 
 
134
        # Branch and bind to standalone, needs upgrade to metadir
 
135
        # (creates backup as unknown)
 
136
        branch1.bzrdir.sprout('bound')
 
137
        knit1_format = bzrdir.format_registry.make_bzrdir('knit')
 
138
        bzrlib.upgrade.upgrade('bound', knit1_format)
 
139
        branch3 = bzrlib.bzrdir.BzrDir.open('bound').open_branch()
 
140
        branch3.bind(branch1)
 
141
        bound_tree = branch3.bzrdir.open_workingtree()
 
142
        out, err = self.runbzr('info bound')
 
143
        self.assertEqualDiff(
 
144
"""Location:
 
145
       checkout root: %s
 
146
  checkout of branch: %s
 
147
 
 
148
Related branches:
 
149
  parent branch: %s
 
150
 
 
151
Format:
 
152
       control: Meta directory format 1
 
153
  working tree: %s
 
154
        branch: Branch format 5
 
155
    repository: %s
 
156
 
 
157
In the working tree:
 
158
         1 unchanged
 
159
         0 modified
 
160
         0 added
 
161
         0 removed
 
162
         0 renamed
 
163
         1 unknown
 
164
         0 ignored
 
165
         0 versioned subdirectories
 
166
 
 
167
Branch history:
 
168
         1 revision
 
169
         0 days old
 
170
   first revision: %s
 
171
  latest revision: %s
 
172
 
 
173
Revision store:
 
174
         1 revision
 
175
         %d KiB
 
176
""" % (branch3.bzrdir.root_transport.base,
 
177
       branch1.bzrdir.root_transport.base,
 
178
       branch1.bzrdir.root_transport.base,
 
179
       bound_tree._format.get_format_description(),      
 
180
       branch3.repository._format.get_format_description(),
 
181
       datestring_first, datestring_first,
 
182
       # poking at _revision_store isn't all that clean, but neither is
 
183
       # having the ui test dependent on the exact overhead of a given store.
 
184
       branch3.repository._revision_store.total_size(
 
185
        branch3.repository.get_transaction())[1] / 1024,
 
186
       ), out)
 
187
        self.assertEqual('', err)
 
188
 
 
189
        # Checkout standalone (same as above, but does not have parent set)
 
190
        branch4 = bzrlib.bzrdir.BzrDir.create_branch_convenience('checkout',
 
191
            format=knit1_format)
 
192
        branch4.bind(branch1)
 
193
        branch4.bzrdir.open_workingtree().update()
 
194
        out, err = self.runbzr('info checkout --verbose')
 
195
        self.assertEqualDiff(
 
196
"""Location:
 
197
       checkout root: %s
 
198
  checkout of branch: %s
 
199
 
 
200
Format:
 
201
       control: Meta directory format 1
 
202
  working tree: Working tree format 3
 
203
        branch: Branch format 5
 
204
    repository: %s
 
205
 
 
206
In the working tree:
 
207
         1 unchanged
 
208
         0 modified
 
209
         0 added
 
210
         0 removed
 
211
         0 renamed
 
212
         0 unknown
 
213
         0 ignored
 
214
         0 versioned subdirectories
 
215
 
 
216
Branch history:
 
217
         1 revision
 
218
         1 committer
 
219
         0 days old
 
220
   first revision: %s
 
221
  latest revision: %s
 
222
 
 
223
Revision store:
 
224
         1 revision
 
225
         %d KiB
 
226
""" % (branch4.bzrdir.root_transport.base,
 
227
       branch1.bzrdir.root_transport.base,
 
228
       branch4.repository._format.get_format_description(),
 
229
       datestring_first, datestring_first,
 
230
       # poking at _revision_store isn't all that clean, but neither is
 
231
       # having the ui test dependent on the exact overhead of a given store.
 
232
       branch4.repository._revision_store.total_size(
 
233
        branch4.repository.get_transaction())[1] / 1024,
 
234
       ), out)
 
235
        self.assertEqual('', err)
 
236
 
 
237
        # Lightweight checkout (same as above, different branch and repository)
 
238
        tree5 = branch1.create_checkout('lightcheckout', lightweight=True)
 
239
        branch5 = tree5.branch
 
240
        out, err = self.runbzr('info lightcheckout')
 
241
        self.assertEqualDiff(
 
242
"""Location:
 
243
 light checkout root: %s
 
244
  checkout of branch: %s
 
245
 
 
246
Format:
 
247
       control: Meta directory format 1
 
248
  working tree: Working tree format 3
 
249
        branch: Branch format 4
 
250
    repository: Weave repository format 6
 
251
 
 
252
In the working tree:
 
253
         1 unchanged
 
254
         0 modified
 
255
         0 added
 
256
         0 removed
 
257
         0 renamed
 
258
         0 unknown
 
259
         0 ignored
 
260
         0 versioned subdirectories
 
261
 
 
262
Branch history:
 
263
         1 revision
 
264
         0 days old
 
265
   first revision: %s
 
266
  latest revision: %s
 
267
 
 
268
Revision store:
 
269
         1 revision
 
270
         0 KiB
 
271
""" % (tree5.bzrdir.root_transport.base,
 
272
       branch1.bzrdir.root_transport.base,
 
273
       datestring_first, datestring_first,
 
274
       ), out)
 
275
        self.assertEqual('', err)
 
276
 
 
277
        # Update initial standalone branch
 
278
        self.build_tree(['standalone/b'])
 
279
        tree1.add('b')
 
280
        tree1.commit('commit two')
 
281
        rev = branch1.repository.get_revision(branch1.revision_history()[-1])
 
282
        datestring_last = format_date(rev.timestamp, rev.timezone)
 
283
 
 
284
        # Out of date branched standalone branch will not be detected
 
285
        out, err = self.runbzr('info branch')
 
286
        self.assertEqualDiff(
 
287
"""Location:
 
288
  branch root: %s
 
289
 
 
290
Related branches:
 
291
      parent branch: %s
 
292
  publish to branch: %s
 
293
 
 
294
Format:
 
295
       control: All-in-one format 6
 
296
  working tree: Working tree format 2
 
297
        branch: Branch format 4
 
298
    repository: Weave repository format 6
 
299
 
 
300
In the working tree:
 
301
         1 unchanged
 
302
         0 modified
 
303
         0 added
 
304
         0 removed
 
305
         0 renamed
 
306
         0 unknown
 
307
         0 ignored
 
308
         0 versioned subdirectories
 
309
 
 
310
Branch history:
 
311
         1 revision
 
312
         0 days old
 
313
   first revision: %s
 
314
  latest revision: %s
 
315
 
 
316
Revision store:
 
317
         1 revision
 
318
         0 KiB
 
319
""" % (branch2.bzrdir.root_transport.base,
 
320
       branch1.bzrdir.root_transport.base,
 
321
       branch1.bzrdir.root_transport.base,
 
322
       datestring_first, datestring_first,
 
323
       ), out)
 
324
        self.assertEqual('', err)
 
325
 
 
326
        # Out of date bound branch
 
327
        out, err = self.runbzr('info bound')
 
328
        self.assertEqualDiff(
 
329
"""Location:
 
330
       checkout root: %s
 
331
  checkout of branch: %s
 
332
 
 
333
Related branches:
 
334
  parent branch: %s
 
335
 
 
336
Format:
 
337
       control: Meta directory format 1
 
338
  working tree: Working tree format 3
 
339
        branch: Branch format 5
 
340
    repository: %s
 
341
 
 
342
Branch is out of date: missing 1 revision.
 
343
 
 
344
In the working tree:
 
345
         1 unchanged
 
346
         0 modified
 
347
         0 added
 
348
         0 removed
 
349
         0 renamed
 
350
         1 unknown
 
351
         0 ignored
 
352
         0 versioned subdirectories
 
353
 
 
354
Branch history:
 
355
         1 revision
 
356
         0 days old
 
357
   first revision: %s
 
358
  latest revision: %s
 
359
 
 
360
Revision store:
 
361
         1 revision
 
362
         %d KiB
 
363
""" % (branch3.bzrdir.root_transport.base,
 
364
       branch1.bzrdir.root_transport.base,
 
365
       branch1.bzrdir.root_transport.base,
 
366
       branch3.repository._format.get_format_description(),
 
367
       datestring_first, datestring_first,
 
368
       # poking at _revision_store isn't all that clean, but neither is
 
369
       # having the ui test dependent on the exact overhead of a given store.
 
370
       branch3.repository._revision_store.total_size(
 
371
        branch3.repository.get_transaction())[1] / 1024,
 
372
       ), out)
 
373
        self.assertEqual('', err)
 
374
 
 
375
        # Out of date checkout
 
376
        out, err = self.runbzr('info checkout')
 
377
        self.assertEqualDiff(
 
378
"""Location:
 
379
       checkout root: %s
 
380
  checkout of branch: %s
 
381
 
 
382
Format:
 
383
       control: Meta directory format 1
 
384
  working tree: Working tree format 3
 
385
        branch: Branch format 5
 
386
    repository: %s
 
387
 
 
388
Branch is out of date: missing 1 revision.
 
389
 
 
390
In the working tree:
 
391
         1 unchanged
 
392
         0 modified
 
393
         0 added
 
394
         0 removed
 
395
         0 renamed
 
396
         0 unknown
 
397
         0 ignored
 
398
         0 versioned subdirectories
 
399
 
 
400
Branch history:
 
401
         1 revision
 
402
         0 days old
 
403
   first revision: %s
 
404
  latest revision: %s
 
405
 
 
406
Revision store:
 
407
         1 revision
 
408
         %d KiB
 
409
""" % (branch4.bzrdir.root_transport.base,
 
410
       branch1.bzrdir.root_transport.base,
 
411
       branch4.repository._format.get_format_description(),
 
412
       datestring_first, datestring_first,
 
413
       # poking at _revision_store isn't all that clean, but neither is
 
414
       # having the ui test dependent on the exact overhead of a given store.
 
415
       branch4.repository._revision_store.total_size(
 
416
        branch4.repository.get_transaction())[1] / 1024,
 
417
       ), out)
 
418
        self.assertEqual('', err)
 
419
 
 
420
        # Out of date lightweight checkout
 
421
        out, err = self.runbzr('info lightcheckout --verbose')
 
422
        self.assertEqualDiff(
 
423
"""Location:
 
424
 light checkout root: %s
 
425
  checkout of branch: %s
 
426
 
 
427
Format:
 
428
       control: Meta directory format 1
 
429
  working tree: Working tree format 3
 
430
        branch: Branch format 4
 
431
    repository: Weave repository format 6
 
432
 
 
433
Working tree is out of date: missing 1 revision.
 
434
 
 
435
In the working tree:
 
436
         1 unchanged
 
437
         0 modified
 
438
         0 added
 
439
         0 removed
 
440
         0 renamed
 
441
         0 unknown
 
442
         0 ignored
 
443
         0 versioned subdirectories
 
444
 
 
445
Branch history:
 
446
         2 revisions
 
447
         1 committer
 
448
         0 days old
 
449
   first revision: %s
 
450
  latest revision: %s
 
451
 
 
452
Revision store:
 
453
         2 revisions
 
454
         0 KiB
 
455
""" % (tree5.bzrdir.root_transport.base,
 
456
       branch1.bzrdir.root_transport.base,
 
457
       datestring_first, datestring_last,
 
458
       ), out)
 
459
        self.assertEqual('', err)
 
460
 
 
461
    def test_info_standalone_no_tree(self):
 
462
        # create standalone branch without a working tree
 
463
        format = bzrdir.format_registry.make_bzrdir('default')
 
464
        branch = self.make_branch('branch')
 
465
        repo = branch.repository
 
466
        out, err = self.runbzr('info branch')
 
467
        self.assertEqualDiff(
 
468
"""Location:
 
469
  branch root: %s
 
470
 
 
471
Format:
 
472
       control: Meta directory format 1
 
473
        branch: Branch format 5
 
474
    repository: %s
 
475
 
 
476
Branch history:
 
477
         0 revisions
 
478
 
 
479
Revision store:
 
480
         0 revisions
 
481
         0 KiB
 
482
""" % (branch.bzrdir.root_transport.base,
 
483
       format.repository_format.get_format_description(),
 
484
       ), out)
 
485
        self.assertEqual('', err)
 
486
 
 
487
    def test_info_shared_repository(self):
 
488
        format = bzrdir.format_registry.make_bzrdir('metaweave')
 
489
        transport = self.get_transport()
 
490
 
 
491
        # Create shared repository
 
492
        repo = self.make_repository('repo', shared=True, format=format)
 
493
        repo.set_make_working_trees(False)
 
494
        out, err = self.runbzr('info repo')
 
495
        self.assertEqualDiff(
 
496
"""Location:
 
497
  shared repository: %s
 
498
 
 
499
Format:
 
500
       control: Meta directory format 1
 
501
    repository: %s
 
502
 
 
503
Revision store:
 
504
         0 revisions
 
505
         0 KiB
 
506
""" % (repo.bzrdir.root_transport.base,
 
507
       format.repository_format.get_format_description(),
 
508
       ), out)
 
509
        self.assertEqual('', err)
 
510
 
 
511
        # Create branch inside shared repository
 
512
        repo.bzrdir.root_transport.mkdir('branch')
 
513
        branch1 = repo.bzrdir.create_branch_convenience('repo/branch',
 
514
            format=format)
 
515
        out, err = self.runbzr('info repo/branch')
 
516
        self.assertEqualDiff(
 
517
"""Location:
 
518
  shared repository: %s
 
519
  repository branch: branch
 
520
 
 
521
Format:
 
522
       control: Meta directory format 1
 
523
        branch: Branch format 5
 
524
    repository: %s
 
525
 
 
526
Branch history:
 
527
         0 revisions
 
528
 
 
529
Revision store:
 
530
         0 revisions
 
531
         0 KiB
 
532
""" % (repo.bzrdir.root_transport.base,
 
533
       format.repository_format.get_format_description(),
 
534
       ), out)
 
535
        self.assertEqual('', err)
 
536
 
 
537
        # Create lightweight checkout
 
538
        transport.mkdir('tree')
 
539
        transport.mkdir('tree/lightcheckout')
 
540
        tree2 = branch1.create_checkout('tree/lightcheckout', 
 
541
            lightweight=True)
 
542
        branch2 = tree2.branch
 
543
        self.assertCheckoutStatusOutput('tree/lightcheckout', tree2, 
 
544
                   shared_repo=repo)
 
545
 
 
546
        # Create normal checkout
 
547
        tree3 = branch1.create_checkout('tree/checkout')
 
548
        self.assertCheckoutStatusOutput('tree/checkout --verbose', tree3,
 
549
            verbose=True,
 
550
            light_checkout=False, repo_branch=branch1)
 
551
        # Update lightweight checkout
 
552
        self.build_tree(['tree/lightcheckout/a'])
 
553
        tree2.add('a')
 
554
        tree2.commit('commit one')
 
555
        rev = repo.get_revision(branch2.revision_history()[0])
 
556
        datestring_first = format_date(rev.timestamp, rev.timezone)
 
557
        out, err = self.runbzr('info tree/lightcheckout --verbose')
 
558
        self.assertEqualDiff(
 
559
"""Location:
 
560
 light checkout root: %s
 
561
   shared repository: %s
 
562
   repository branch: branch
 
563
 
 
564
Format:
 
565
       control: Meta directory format 1
 
566
  working tree: Working tree format 3
 
567
        branch: Branch format 5
 
568
    repository: %s
 
569
 
 
570
In the working tree:
 
571
         1 unchanged
 
572
         0 modified
 
573
         0 added
 
574
         0 removed
 
575
         0 renamed
 
576
         0 unknown
 
577
         0 ignored
 
578
         0 versioned subdirectories
 
579
 
 
580
Branch history:
 
581
         1 revision
 
582
         1 committer
 
583
         0 days old
 
584
   first revision: %s
 
585
  latest revision: %s
 
586
 
 
587
Revision store:
 
588
         1 revision
 
589
         %d KiB
 
590
""" % (tree2.bzrdir.root_transport.base,
 
591
       repo.bzrdir.root_transport.base,
 
592
       format.repository_format.get_format_description(),
 
593
       datestring_first, datestring_first,
 
594
       # poking at _revision_store isn't all that clean, but neither is
 
595
       # having the ui test dependent on the exact overhead of a given store.
 
596
       repo._revision_store.total_size(repo.get_transaction())[1] / 1024,
 
597
       ), out)
 
598
        self.assertEqual('', err)
 
599
 
 
600
        # Out of date checkout
 
601
        out, err = self.runbzr('info tree/checkout')
 
602
        self.assertEqualDiff(
 
603
"""Location:
 
604
       checkout root: %s
 
605
  checkout of branch: %s
 
606
 
 
607
Format:
 
608
       control: Meta directory format 1
 
609
  working tree: Working tree format 3
 
610
        branch: Branch format 5
 
611
    repository: %s
 
612
 
 
613
Branch is out of date: missing 1 revision.
 
614
 
 
615
In the working tree:
 
616
         0 unchanged
 
617
         0 modified
 
618
         0 added
 
619
         0 removed
 
620
         0 renamed
 
621
         0 unknown
 
622
         0 ignored
 
623
         0 versioned subdirectories
 
624
 
 
625
Branch history:
 
626
         0 revisions
 
627
 
 
628
Revision store:
 
629
         0 revisions
 
630
         0 KiB
 
631
""" % (tree3.bzrdir.root_transport.base,
 
632
       branch1.bzrdir.root_transport.base,
 
633
       format.repository_format.get_format_description(),
 
634
       ), out)
 
635
        self.assertEqual('', err)
 
636
 
 
637
        # Update checkout
 
638
        tree3.update()
 
639
        self.build_tree(['tree/checkout/b'])
 
640
        tree3.add('b')
 
641
        out, err = self.runbzr('info tree/checkout --verbose')
 
642
        self.assertEqualDiff(
 
643
"""Location:
 
644
       checkout root: %s
 
645
  checkout of branch: %s
 
646
 
 
647
Format:
 
648
       control: Meta directory format 1
 
649
  working tree: Working tree format 3
 
650
        branch: Branch format 5
 
651
    repository: %s
 
652
 
 
653
In the working tree:
 
654
         1 unchanged
 
655
         0 modified
 
656
         1 added
 
657
         0 removed
 
658
         0 renamed
 
659
         0 unknown
 
660
         0 ignored
 
661
         0 versioned subdirectories
 
662
 
 
663
Branch history:
 
664
         1 revision
 
665
         1 committer
 
666
         0 days old
 
667
   first revision: %s
 
668
  latest revision: %s
 
669
 
 
670
Revision store:
 
671
         1 revision
 
672
         %d KiB
 
673
""" % (tree3.bzrdir.root_transport.base, branch1.bzrdir.root_transport.base,
 
674
       format.repository_format.get_format_description(),
 
675
       datestring_first, datestring_first,
 
676
       # poking at _revision_store isn't all that clean, but neither is
 
677
       # having the ui test dependent on the exact overhead of a given store.
 
678
       repo._revision_store.total_size(repo.get_transaction())[1] / 1024,
 
679
       ), out)
 
680
        self.assertEqual('', err)
 
681
        tree3.commit('commit two')
 
682
 
 
683
        # Out of date lightweight checkout
 
684
        rev = repo.get_revision(branch1.revision_history()[-1])
 
685
        datestring_last = format_date(rev.timestamp, rev.timezone)
 
686
        out, err = self.runbzr('info tree/lightcheckout --verbose')
 
687
        self.assertEqualDiff(
 
688
"""Location:
 
689
 light checkout root: %s
 
690
   shared repository: %s
 
691
   repository branch: branch
 
692
 
 
693
Format:
 
694
       control: Meta directory format 1
 
695
  working tree: Working tree format 3
 
696
        branch: Branch format 5
 
697
    repository: %s
 
698
 
 
699
Working tree is out of date: missing 1 revision.
 
700
 
 
701
In the working tree:
 
702
         1 unchanged
 
703
         0 modified
 
704
         0 added
 
705
         0 removed
 
706
         0 renamed
 
707
         0 unknown
 
708
         0 ignored
 
709
         0 versioned subdirectories
 
710
 
 
711
Branch history:
 
712
         2 revisions
 
713
         1 committer
 
714
         0 days old
 
715
   first revision: %s
 
716
  latest revision: %s
 
717
 
 
718
Revision store:
 
719
         2 revisions
 
720
         %d KiB
 
721
""" % (tree2.bzrdir.root_transport.base,
 
722
       repo.bzrdir.root_transport.base,
 
723
       format.repository_format.get_format_description(),
 
724
       datestring_first, datestring_last,
 
725
       # poking at _revision_store isn't all that clean, but neither is
 
726
       # having the ui test dependent on the exact overhead of a given store.
 
727
       repo._revision_store.total_size(repo.get_transaction())[1] / 1024,
 
728
       ), out)
 
729
        self.assertEqual('', err)
 
730
 
 
731
        # Show info about shared branch
 
732
        out, err = self.runbzr('info repo/branch --verbose')
 
733
        self.assertEqualDiff(
 
734
"""Location:
 
735
  shared repository: %s
 
736
  repository branch: branch
 
737
 
 
738
Format:
 
739
       control: Meta directory format 1
 
740
        branch: Branch format 5
 
741
    repository: %s
 
742
 
 
743
Branch history:
 
744
         2 revisions
 
745
         1 committer
 
746
         0 days old
 
747
   first revision: %s
 
748
  latest revision: %s
 
749
 
 
750
Revision store:
 
751
         2 revisions
 
752
         %d KiB
 
753
""" % (repo.bzrdir.root_transport.base,
 
754
       format.repository_format.get_format_description(),
 
755
       datestring_first, datestring_last,
 
756
       # poking at _revision_store isn't all that clean, but neither is
 
757
       # having the ui test dependent on the exact overhead of a given store.
 
758
       repo._revision_store.total_size(repo.get_transaction())[1] / 1024,
 
759
       ), out)
 
760
        self.assertEqual('', err)
 
761
 
 
762
        # Show info about repository with revisions
 
763
        out, err = self.runbzr('info repo')
 
764
        self.assertEqualDiff(
 
765
"""Location:
 
766
  shared repository: %s
 
767
 
 
768
Format:
 
769
       control: Meta directory format 1
 
770
    repository: %s
 
771
 
 
772
Revision store:
 
773
         2 revisions
 
774
         %d KiB
 
775
""" % (repo.bzrdir.root_transport.base,
 
776
       format.repository_format.get_format_description(),
 
777
       # poking at _revision_store isn't all that clean, but neither is
 
778
       # having the ui test dependent on the exact overhead of a given store.
 
779
       repo._revision_store.total_size(repo.get_transaction())[1] / 1024,
 
780
       ), out)
 
781
        self.assertEqual('', err)
 
782
 
 
783
    def test_info_shared_repository_with_trees(self):
 
784
        format = bzrdir.format_registry.make_bzrdir('metaweave')
 
785
        transport = self.get_transport()
 
786
 
 
787
        # Create shared repository with working trees
 
788
        repo = self.make_repository('repo', shared=True, format=format)
 
789
        repo.set_make_working_trees(True)
 
790
        out, err = self.runbzr('info repo')
 
791
        self.assertEqualDiff(
 
792
"""Location:
 
793
  shared repository: %s
 
794
 
 
795
Format:
 
796
       control: Meta directory format 1
 
797
    repository: %s
 
798
 
 
799
Create working tree for new branches inside the repository.
 
800
 
 
801
Revision store:
 
802
         0 revisions
 
803
         0 KiB
 
804
""" % (repo.bzrdir.root_transport.base,
 
805
       format.repository_format.get_format_description(),
 
806
       ), out)
 
807
        self.assertEqual('', err)
 
808
 
 
809
        # Create two branches
 
810
        repo.bzrdir.root_transport.mkdir('branch1')
 
811
        branch1 = repo.bzrdir.create_branch_convenience('repo/branch1',
 
812
            format=format)
 
813
        branch2 = branch1.bzrdir.sprout('repo/branch2').open_branch()
 
814
 
 
815
        # Empty first branch
 
816
        out, err = self.runbzr('info repo/branch1 --verbose')
 
817
        self.assertEqualDiff(
 
818
"""Location:
 
819
    shared repository: %s
 
820
  repository checkout: branch1
 
821
 
 
822
Format:
 
823
       control: Meta directory format 1
 
824
  working tree: Working tree format 3
 
825
        branch: Branch format 5
 
826
    repository: %s
 
827
 
 
828
In the working tree:
 
829
         0 unchanged
 
830
         0 modified
 
831
         0 added
 
832
         0 removed
 
833
         0 renamed
 
834
         0 unknown
 
835
         0 ignored
 
836
         0 versioned subdirectories
 
837
 
 
838
Branch history:
 
839
         0 revisions
 
840
         0 committers
 
841
 
 
842
Revision store:
 
843
         0 revisions
 
844
         0 KiB
 
845
""" % (repo.bzrdir.root_transport.base,
 
846
       format.repository_format.get_format_description(),
 
847
       ), out)
 
848
        self.assertEqual('', err)
 
849
 
 
850
        # Update first branch
 
851
        self.build_tree(['repo/branch1/a'])
 
852
        tree1 = branch1.bzrdir.open_workingtree()
 
853
        tree1.add('a')
 
854
        tree1.commit('commit one')
 
855
        rev = repo.get_revision(branch1.revision_history()[0])
 
856
        datestring_first = format_date(rev.timestamp, rev.timezone)
 
857
        out, err = self.runbzr('info repo/branch1')
 
858
        self.assertEqualDiff(
 
859
"""Location:
 
860
    shared repository: %s
 
861
  repository checkout: branch1
 
862
 
 
863
Format:
 
864
       control: Meta directory format 1
 
865
  working tree: Working tree format 3
 
866
        branch: Branch format 5
 
867
    repository: %s
 
868
 
 
869
In the working tree:
 
870
         1 unchanged
 
871
         0 modified
 
872
         0 added
 
873
         0 removed
 
874
         0 renamed
 
875
         0 unknown
 
876
         0 ignored
 
877
         0 versioned subdirectories
 
878
 
 
879
Branch history:
 
880
         1 revision
 
881
         0 days old
 
882
   first revision: %s
 
883
  latest revision: %s
 
884
 
 
885
Revision store:
 
886
         1 revision
 
887
         %d KiB
 
888
""" % (repo.bzrdir.root_transport.base,
 
889
       format.repository_format.get_format_description(),
 
890
       datestring_first, datestring_first,
 
891
       # poking at _revision_store isn't all that clean, but neither is
 
892
       # having the ui test dependent on the exact overhead of a given store.
 
893
       repo._revision_store.total_size(repo.get_transaction())[1] / 1024,
 
894
       ), out)
 
895
        self.assertEqual('', err)
 
896
 
 
897
        # Out of date second branch
 
898
        out, err = self.runbzr('info repo/branch2 --verbose')
 
899
        self.assertEqualDiff(
 
900
"""Location:
 
901
    shared repository: %s
 
902
  repository checkout: branch2
 
903
 
 
904
Related branches:
 
905
  parent branch: %s
 
906
 
 
907
Format:
 
908
       control: Meta directory format 1
 
909
  working tree: Working tree format 3
 
910
        branch: Branch format 5
 
911
    repository: %s
 
912
 
 
913
In the working tree:
 
914
         0 unchanged
 
915
         0 modified
 
916
         0 added
 
917
         0 removed
 
918
         0 renamed
 
919
         0 unknown
 
920
         0 ignored
 
921
         0 versioned subdirectories
 
922
 
 
923
Branch history:
 
924
         0 revisions
 
925
         0 committers
 
926
 
 
927
Revision store:
 
928
         1 revision
 
929
         %d KiB
 
930
""" % (repo.bzrdir.root_transport.base,
 
931
       branch1.bzrdir.root_transport.base,
 
932
       format.repository_format.get_format_description(),
 
933
       # poking at _revision_store isn't all that clean, but neither is
 
934
       # having the ui test dependent on the exact overhead of a given store.
 
935
       repo._revision_store.total_size(repo.get_transaction())[1] / 1024,
 
936
       ), out)
 
937
        self.assertEqual('', err)
 
938
 
 
939
        # Update second branch
 
940
        tree2 = branch2.bzrdir.open_workingtree()
 
941
        tree2.pull(branch1)
 
942
        out, err = self.runbzr('info repo/branch2')
 
943
        self.assertEqualDiff(
 
944
"""Location:
 
945
    shared repository: %s
 
946
  repository checkout: branch2
 
947
 
 
948
Related branches:
 
949
  parent branch: %s
 
950
 
 
951
Format:
 
952
       control: Meta directory format 1
 
953
  working tree: Working tree format 3
 
954
        branch: Branch format 5
 
955
    repository: %s
 
956
 
 
957
In the working tree:
 
958
         1 unchanged
 
959
         0 modified
 
960
         0 added
 
961
         0 removed
 
962
         0 renamed
 
963
         0 unknown
 
964
         0 ignored
 
965
         0 versioned subdirectories
 
966
 
 
967
Branch history:
 
968
         1 revision
 
969
         0 days old
 
970
   first revision: %s
 
971
  latest revision: %s
 
972
 
 
973
Revision store:
 
974
         1 revision
 
975
         %d KiB
 
976
""" % (repo.bzrdir.root_transport.base,
 
977
       branch1.bzrdir.root_transport.base,
 
978
       format.repository_format.get_format_description(),
 
979
       datestring_first, datestring_first,
 
980
       # poking at _revision_store isn't all that clean, but neither is
 
981
       # having the ui test dependent on the exact overhead of a given store.
 
982
       repo._revision_store.total_size(repo.get_transaction())[1] / 1024,
 
983
       ), out)
 
984
        self.assertEqual('', err)
 
985
 
 
986
        # Show info about repository with revisions
 
987
        out, err = self.runbzr('info repo')
 
988
        self.assertEqualDiff(
 
989
"""Location:
 
990
  shared repository: %s
 
991
 
 
992
Format:
 
993
       control: Meta directory format 1
 
994
    repository: %s
 
995
 
 
996
Create working tree for new branches inside the repository.
 
997
 
 
998
Revision store:
 
999
         1 revision
 
1000
         %d KiB
 
1001
""" % (repo.bzrdir.root_transport.base,
 
1002
       format.repository_format.get_format_description(),
 
1003
       # poking at _revision_store isn't all that clean, but neither is
 
1004
       # having the ui test dependent on the exact overhead of a given store.
 
1005
       repo._revision_store.total_size(repo.get_transaction())[1] / 1024,
 
1006
       ),
 
1007
       out)
 
1008
        self.assertEqual('', err)
 
1009
    
 
1010
    def test_info_shared_repository_with_tree_in_root(self):
 
1011
        format = bzrdir.format_registry.make_bzrdir('metaweave')
 
1012
        transport = self.get_transport()
 
1013
 
 
1014
        # Create shared repository with working trees
 
1015
        repo = self.make_repository('repo', shared=True, format=format)
 
1016
        repo.set_make_working_trees(True)
 
1017
        out, err = self.runbzr('info repo')
 
1018
        self.assertEqualDiff(
 
1019
"""Location:
 
1020
  shared repository: %s
 
1021
 
 
1022
Format:
 
1023
       control: Meta directory format 1
 
1024
    repository: %s
 
1025
 
 
1026
Create working tree for new branches inside the repository.
 
1027
 
 
1028
Revision store:
 
1029
         0 revisions
 
1030
         0 KiB
 
1031
""" % (repo.bzrdir.root_transport.base,
 
1032
       format.repository_format.get_format_description(),
 
1033
       ), out)
 
1034
        self.assertEqual('', err)
 
1035
 
 
1036
        # Create branch in root of repository
 
1037
        control = repo.bzrdir
 
1038
        branch = control.create_branch()
 
1039
        control.create_workingtree()
 
1040
        out, err = self.runbzr('info repo')
 
1041
        self.assertEqualDiff(
 
1042
"""Location:
 
1043
    shared repository: %s
 
1044
  repository checkout: .
 
1045
 
 
1046
Format:
 
1047
       control: Meta directory format 1
 
1048
  working tree: Working tree format 3
 
1049
        branch: Branch format 5
 
1050
    repository: %s
 
1051
 
 
1052
In the working tree:
 
1053
         0 unchanged
 
1054
         0 modified
 
1055
         0 added
 
1056
         0 removed
 
1057
         0 renamed
 
1058
         0 unknown
 
1059
         0 ignored
 
1060
         0 versioned subdirectories
 
1061
 
 
1062
Branch history:
 
1063
         0 revisions
 
1064
 
 
1065
Revision store:
 
1066
         0 revisions
 
1067
         0 KiB
 
1068
""" % (repo.bzrdir.root_transport.base,
 
1069
       format.repository_format.get_format_description(),
 
1070
       ), out)
 
1071
        self.assertEqual('', err)
 
1072
 
 
1073
    def assertCheckoutStatusOutput(self, 
 
1074
        command_string, lco_tree, shared_repo=None,
 
1075
        repo_branch=None,
 
1076
        tree_locked=False,
 
1077
        branch_locked=False, repo_locked=False,
 
1078
        verbose=False,
 
1079
        light_checkout=True):
 
1080
        """Check the output of info in a light checkout tree.
 
1081
 
 
1082
        This is not quite a mirror of the info code: rather than using the
 
1083
        tree being examined to predict output, it uses a bunch of flags which
 
1084
        allow us, the test writers, to document what *should* be present in
 
1085
        the output. Removing this separation would remove the value of the
 
1086
        tests.
 
1087
        
 
1088
        :param path: the path to the light checkout.
 
1089
        :param lco_tree: the tree object for the light checkout.
 
1090
        :param shared_repo: A shared repository is in use, expect that in
 
1091
            the output.
 
1092
        :param repo_branch: A branch in a shared repository for non light
 
1093
            checkouts.
 
1094
        :param tree_locked: If true, expect the tree to be locked.
 
1095
        :param branch_locked: If true, expect the branch to be locked.
 
1096
        :param repo_locked: If true, expect the repository to be locked.
 
1097
        :param verbose: If true, expect verbose output
 
1098
        """
 
1099
        out, err = self.runbzr('info %s' % command_string)
 
1100
        if repo_locked or branch_locked or tree_locked:
 
1101
            def locked_message(a_bool):
 
1102
                if a_bool:
 
1103
                    return 'locked'
 
1104
                else:
 
1105
                    return 'unlocked'
 
1106
            expected_lock_output = (
 
1107
                "\n"
 
1108
                "Lock status:\n"
 
1109
                "  working tree: %s\n"
 
1110
                "        branch: %s\n"
 
1111
                "    repository: %s\n" % (
 
1112
                    locked_message(tree_locked),
 
1113
                    locked_message(branch_locked),
 
1114
                    locked_message(repo_locked)))
 
1115
        else:
 
1116
            expected_lock_output = ''
 
1117
        if light_checkout:
 
1118
            tree_data = (" light checkout root: %s" %
 
1119
                lco_tree.bzrdir.root_transport.base)
 
1120
        else:
 
1121
            tree_data = ("       checkout root: %s" %
 
1122
                lco_tree.bzrdir.root_transport.base)
 
1123
        if shared_repo is not None:
 
1124
            branch_data = (
 
1125
                "   shared repository: %s\n"
 
1126
                "   repository branch: branch\n" %
 
1127
                shared_repo.bzrdir.root_transport.base)
 
1128
        elif repo_branch is not None:
 
1129
            branch_data = (
 
1130
                "  checkout of branch: %s\n" % 
 
1131
                repo_branch.bzrdir.root_transport.base)
 
1132
        else:
 
1133
            branch_data = ("  checkout of branch: %s\n" % 
 
1134
                lco_tree.branch.bzrdir.root_transport.base)
 
1135
        
 
1136
        if verbose:
 
1137
            verbose_info = '         0 committers\n'
 
1138
        else:
 
1139
            verbose_info = ''
 
1140
            
 
1141
        self.assertEqualDiff(
 
1142
"""Location:
 
1143
%s
 
1144
%s
 
1145
Format:
 
1146
       control: Meta directory format 1
 
1147
  working tree: %s
 
1148
        branch: Branch format 5
 
1149
    repository: %s
 
1150
%s
 
1151
In the working tree:
 
1152
         0 unchanged
 
1153
         0 modified
 
1154
         0 added
 
1155
         0 removed
 
1156
         0 renamed
 
1157
         0 unknown
 
1158
         0 ignored
 
1159
         0 versioned subdirectories
 
1160
 
 
1161
Branch history:
 
1162
         0 revisions
 
1163
%s
 
1164
Revision store:
 
1165
         0 revisions
 
1166
         0 KiB
 
1167
""" %  (tree_data,
 
1168
        branch_data,
 
1169
        lco_tree._format.get_format_description(),
 
1170
        lco_tree.branch.repository._format.get_format_description(),
 
1171
        expected_lock_output,
 
1172
        verbose_info,
 
1173
        ), out)
 
1174
        self.assertEqual('', err)
 
1175
 
 
1176
    def test_info_locking(self):
 
1177
        transport = self.get_transport()
 
1178
        # Create shared repository with a branch
 
1179
        repo = self.make_repository('repo', shared=True,
 
1180
                                    format=bzrlib.bzrdir.BzrDirMetaFormat1())
 
1181
        repo.set_make_working_trees(False)
 
1182
        repo.bzrdir.root_transport.mkdir('branch')
 
1183
        repo_branch = repo.bzrdir.create_branch_convenience('repo/branch',
 
1184
                                    format=bzrlib.bzrdir.BzrDirMetaFormat1())
 
1185
        # Do a heavy checkout
 
1186
        transport.mkdir('tree')
 
1187
        transport.mkdir('tree/checkout')
 
1188
        co_branch = bzrlib.bzrdir.BzrDir.create_branch_convenience('tree/checkout',
 
1189
            format=bzrlib.bzrdir.BzrDirMetaFormat1())
 
1190
        co_branch.bind(repo_branch)
 
1191
        # Do a light checkout of the heavy one
 
1192
        transport.mkdir('tree/lightcheckout')
 
1193
        lco_dir = bzrlib.bzrdir.BzrDirMetaFormat1().initialize('tree/lightcheckout')
 
1194
        bzrlib.branch.BranchReferenceFormat().initialize(lco_dir, co_branch)
 
1195
        lco_dir.create_workingtree()
 
1196
        lco_tree = lco_dir.open_workingtree()
 
1197
 
 
1198
        # Test all permutations of locking the working tree, branch and repository
 
1199
        # W B R
 
1200
 
 
1201
        # U U U
 
1202
        self.assertCheckoutStatusOutput('tree/lightcheckout', lco_tree)
 
1203
        # U U L
 
1204
        lco_tree.branch.repository.lock_write()
 
1205
        try:
 
1206
            self.assertCheckoutStatusOutput('tree/lightcheckout',
 
1207
            lco_tree,
 
1208
            repo_locked=True)
 
1209
        finally:
 
1210
            lco_tree.branch.repository.unlock()
 
1211
        # U L L
 
1212
        lco_tree.branch.lock_write()
 
1213
        try:
 
1214
            self.assertCheckoutStatusOutput('tree/lightcheckout',
 
1215
            lco_tree,
 
1216
            branch_locked=True,
 
1217
            repo_locked=True)
 
1218
        finally:
 
1219
            lco_tree.branch.unlock()
 
1220
        # L L L
 
1221
        lco_tree.lock_write()
 
1222
        try:
 
1223
            self.assertCheckoutStatusOutput('tree/lightcheckout',
 
1224
            lco_tree,
 
1225
            tree_locked=True,
 
1226
            branch_locked=True,
 
1227
            repo_locked=True)
 
1228
        finally:
 
1229
            lco_tree.unlock()
 
1230
        # L L U
 
1231
        lco_tree.lock_write()
 
1232
        lco_tree.branch.repository.unlock()
 
1233
        try:
 
1234
            self.assertCheckoutStatusOutput('tree/lightcheckout',
 
1235
            lco_tree,
 
1236
            tree_locked=True,
 
1237
            branch_locked=True)
 
1238
        finally:
 
1239
            lco_tree.branch.repository.lock_write()
 
1240
            lco_tree.unlock()
 
1241
        # L U U
 
1242
        lco_tree.lock_write()
 
1243
        lco_tree.branch.unlock()
 
1244
        try:
 
1245
            self.assertCheckoutStatusOutput('tree/lightcheckout',
 
1246
            lco_tree,
 
1247
            tree_locked=True)
 
1248
        finally:
 
1249
            lco_tree.branch.lock_write()
 
1250
            lco_tree.unlock()
 
1251
        # L U L
 
1252
        lco_tree.lock_write()
 
1253
        lco_tree.branch.unlock()
 
1254
        lco_tree.branch.repository.lock_write()
 
1255
        try:
 
1256
            self.assertCheckoutStatusOutput('tree/lightcheckout',
 
1257
            lco_tree,
 
1258
            tree_locked=True,
 
1259
            repo_locked=True)
 
1260
        finally:
 
1261
            lco_tree.branch.repository.unlock()
 
1262
            lco_tree.branch.lock_write()
 
1263
            lco_tree.unlock()
 
1264
        # U L U
 
1265
        lco_tree.branch.lock_write()
 
1266
        lco_tree.branch.repository.unlock()
 
1267
        try:
 
1268
            self.assertCheckoutStatusOutput('tree/lightcheckout',
 
1269
            lco_tree,
 
1270
            branch_locked=True)
 
1271
        finally:
 
1272
            lco_tree.branch.repository.lock_write()
 
1273
            lco_tree.branch.unlock()
 
1274
 
 
1275
    def test_info_locking_oslocks(self):
 
1276
        if sys.platform == "win32":
 
1277
            raise TestSkipped("don't use oslocks on win32 in unix manner")
 
1278
 
 
1279
        tree = self.make_branch_and_tree('branch',
 
1280
                                         format=bzrlib.bzrdir.BzrDirFormat6())
 
1281
 
 
1282
        # Test all permutations of locking the working tree, branch and repository
 
1283
        # XXX: Well not yet, as we can't query oslocks yet. Currently, it's
 
1284
        # implemented by raising NotImplementedError and get_physical_lock_status()
 
1285
        # always returns false. This makes bzr info hide the lock status.  (Olaf)
 
1286
        # W B R
 
1287
 
 
1288
        # U U U
 
1289
        out, err = self.runbzr('info branch')
 
1290
        self.assertEqualDiff(
 
1291
"""Location:
 
1292
  branch root: %s
 
1293
 
 
1294
Format:
 
1295
       control: All-in-one format 6
 
1296
  working tree: Working tree format 2
 
1297
        branch: Branch format 4
 
1298
    repository: %s
 
1299
 
 
1300
In the working tree:
 
1301
         0 unchanged
 
1302
         0 modified
 
1303
         0 added
 
1304
         0 removed
 
1305
         0 renamed
 
1306
         0 unknown
 
1307
         0 ignored
 
1308
         0 versioned subdirectories
 
1309
 
 
1310
Branch history:
 
1311
         0 revisions
 
1312
 
 
1313
Revision store:
 
1314
         0 revisions
 
1315
         0 KiB
 
1316
""" % (tree.bzrdir.root_transport.base,
 
1317
       tree.branch.repository._format.get_format_description(),
 
1318
       ), out)
 
1319
        self.assertEqual('', err)
 
1320
        # L L L
 
1321
        tree.lock_write()
 
1322
        out, err = self.runbzr('info branch')
 
1323
        self.assertEqualDiff(
 
1324
"""Location:
 
1325
  branch root: %s
 
1326
 
 
1327
Format:
 
1328
       control: All-in-one format 6
 
1329
  working tree: Working tree format 2
 
1330
        branch: Branch format 4
 
1331
    repository: %s
 
1332
 
 
1333
In the working tree:
 
1334
         0 unchanged
 
1335
         0 modified
 
1336
         0 added
 
1337
         0 removed
 
1338
         0 renamed
 
1339
         0 unknown
 
1340
         0 ignored
 
1341
         0 versioned subdirectories
 
1342
 
 
1343
Branch history:
 
1344
         0 revisions
 
1345
 
 
1346
Revision store:
 
1347
         0 revisions
 
1348
         0 KiB
 
1349
""" % (tree.bzrdir.root_transport.base,
 
1350
       tree.branch.repository._format.get_format_description(),
 
1351
       ), out)
 
1352
        self.assertEqual('', err)
 
1353
        tree.unlock()