~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Late bind to PatienceSequenceMatcher to allow plugin to override.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Copyright (C) 2006 by Canonical Ltd
2
2
# -*- coding: utf-8 -*-
3
 
#
 
3
 
4
4
# This program is free software; you can redistribute it and/or modify
5
5
# it under the terms of the GNU General Public License as published by
6
6
# the Free Software Foundation; either version 2 of the License, or
7
7
# (at your option) any later version.
8
 
#
 
8
 
9
9
# This program is distributed in the hope that it will be useful,
10
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
12
# GNU General Public License for more details.
13
 
#
 
13
 
14
14
# You should have received a copy of the GNU General Public License
15
15
# along with this program; if not, write to the Free Software
16
16
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
18
 
19
19
"""Tests for the info command of bzr."""
20
20
 
21
 
import sys
22
21
 
23
22
import bzrlib
 
23
 
 
24
 
24
25
from bzrlib.osutils import format_date
25
26
from bzrlib.tests import TestSkipped
26
27
from bzrlib.tests.blackbox import ExternalBase
29
30
class TestInfo(ExternalBase):
30
31
 
31
32
    def test_info_non_existing(self):
32
 
        if sys.platform == "win32":
33
 
            location = "C:/i/do/not/exist/"
34
 
        else:
35
 
            location = "/i/do/not/exist/"
36
 
        out, err = self.runbzr('info '+location, retcode=3)
 
33
        out, err = self.runbzr('info /i/do/not/exist/', retcode=3)
37
34
        self.assertEqual(out, '')
38
 
        self.assertEqual(err, 'bzr: ERROR: Not a branch: %s\n' % location)
 
35
        self.assertEqual(err, 'bzr: ERROR: Not a branch: /i/do/not/exist/\n')
39
36
 
40
37
    def test_info_standalone(self):
41
38
        transport = self.get_transport()
136
133
        bzrlib.upgrade.upgrade('bound', bzrlib.bzrdir.BzrDirMetaFormat1())
137
134
        branch3 = bzrlib.bzrdir.BzrDir.open('bound').open_branch()
138
135
        branch3.bind(branch1)
139
 
        bound_tree = branch3.bzrdir.open_workingtree()
140
136
        out, err = self.runbzr('info bound')
141
137
        self.assertEqualDiff(
142
138
"""Location:
148
144
 
149
145
Format:
150
146
       control: Meta directory format 1
151
 
  working tree: %s
 
147
  working tree: Working tree format 3
152
148
        branch: Branch format 5
153
149
    repository: %s
154
150
 
174
170
""" % (branch3.bzrdir.root_transport.base,
175
171
       branch1.bzrdir.root_transport.base,
176
172
       branch1.bzrdir.root_transport.base,
177
 
       bound_tree._format.get_format_description(),      
178
173
       branch3.repository._format.get_format_description(),
179
174
       datestring_first, datestring_first,
180
175
       # poking at _revision_store isn't all that clean, but neither is
247
242
        out, err = self.runbzr('info lightcheckout')
248
243
        self.assertEqualDiff(
249
244
"""Location:
250
 
 light checkout root: %s
251
 
  checkout of branch: %s
 
245
  light checkout root: %s
 
246
   checkout of branch: %s
252
247
 
253
248
Format:
254
249
       control: Meta directory format 1
428
423
        out, err = self.runbzr('info lightcheckout --verbose')
429
424
        self.assertEqualDiff(
430
425
"""Location:
431
 
 light checkout root: %s
432
 
  checkout of branch: %s
 
426
  light checkout root: %s
 
427
   checkout of branch: %s
433
428
 
434
429
Format:
435
430
       control: Meta directory format 1
548
543
        dir2.create_workingtree()
549
544
        tree2 = dir2.open_workingtree()
550
545
        branch2 = tree2.branch
551
 
        self.assertCheckoutStatusOutput('tree/lightcheckout', tree2, shared_repo=repo)
 
546
        out, err = self.runbzr('info tree/lightcheckout')
 
547
        self.assertEqualDiff(
 
548
"""Location:
 
549
  light checkout root: %s
 
550
    shared repository: %s
 
551
    repository branch: branch
 
552
 
 
553
Format:
 
554
       control: Meta directory format 1
 
555
  working tree: Working tree format 3
 
556
        branch: Branch format 5
 
557
    repository: %s
 
558
 
 
559
In the working tree:
 
560
         0 unchanged
 
561
         0 modified
 
562
         0 added
 
563
         0 removed
 
564
         0 renamed
 
565
         0 unknown
 
566
         0 ignored
 
567
         0 versioned subdirectories
 
568
 
 
569
Branch history:
 
570
         0 revisions
 
571
 
 
572
Revision store:
 
573
         0 revisions
 
574
         0 KiB
 
575
""" % (tree2.bzrdir.root_transport.base,
 
576
       repo.bzrdir.root_transport.base,
 
577
       repo._format.get_format_description(),
 
578
       ), out)
 
579
        self.assertEqual('', err)
552
580
 
553
581
        # Create normal checkout
554
582
        branch3 = bzrlib.bzrdir.BzrDir.create_branch_convenience('tree/checkout')
555
583
        branch3.bind(branch1)
556
584
        tree3 = branch3.bzrdir.open_workingtree()
557
585
        tree3.update()
558
 
        self.assertCheckoutStatusOutput('tree/checkout --verbose', tree3,
559
 
            verbose=True,
560
 
            light_checkout=False, repo_branch=branch1)
 
586
        out, err = self.runbzr('info tree/checkout --verbose')
 
587
        self.assertEqualDiff(
 
588
"""Location:
 
589
       checkout root: %s
 
590
  checkout of branch: %s
 
591
 
 
592
Format:
 
593
       control: Meta directory format 1
 
594
  working tree: Working tree format 3
 
595
        branch: Branch format 5
 
596
    repository: %s
 
597
 
 
598
In the working tree:
 
599
         0 unchanged
 
600
         0 modified
 
601
         0 added
 
602
         0 removed
 
603
         0 renamed
 
604
         0 unknown
 
605
         0 ignored
 
606
         0 versioned subdirectories
 
607
 
 
608
Branch history:
 
609
         0 revisions
 
610
         0 committers
 
611
 
 
612
Revision store:
 
613
         0 revisions
 
614
         0 KiB
 
615
""" % (branch3.bzrdir.root_transport.base,
 
616
       branch1.bzrdir.root_transport.base,
 
617
       repo._format.get_format_description(),
 
618
       ), out)
 
619
        self.assertEqual('', err)
 
620
 
561
621
        # Update lightweight checkout
562
622
        self.build_tree(['tree/lightcheckout/a'])
563
623
        tree2.add('a')
567
627
        out, err = self.runbzr('info tree/lightcheckout --verbose')
568
628
        self.assertEqualDiff(
569
629
"""Location:
570
 
 light checkout root: %s
571
 
   shared repository: %s
572
 
   repository branch: branch
 
630
  light checkout root: %s
 
631
    shared repository: %s
 
632
    repository branch: branch
573
633
 
574
634
Format:
575
635
       control: Meta directory format 1
696
756
        out, err = self.runbzr('info tree/lightcheckout --verbose')
697
757
        self.assertEqualDiff(
698
758
"""Location:
699
 
 light checkout root: %s
700
 
   shared repository: %s
701
 
   repository branch: branch
 
759
  light checkout root: %s
 
760
    shared repository: %s
 
761
    repository branch: branch
702
762
 
703
763
Format:
704
764
       control: Meta directory format 1
1087
1147
 
1088
1148
        bzrlib.bzrdir.BzrDirFormat.set_default_format(old_format)
1089
1149
 
1090
 
    def assertCheckoutStatusOutput(self, 
1091
 
        command_string, lco_tree, shared_repo=None,
1092
 
        repo_branch=None,
1093
 
        tree_locked=False,
1094
 
        branch_locked=False, repo_locked=False,
1095
 
        verbose=False,
1096
 
        light_checkout=True):
1097
 
        """Check the output of info in a light checkout tree.
1098
 
 
1099
 
        This is not quite a mirror of the info code: rather than using the
1100
 
        tree being examined to predict output, it uses a bunch of flags which
1101
 
        allow us, the test writers, to document what *should* be present in
1102
 
        the output. Removing this separation would remove the value of the
1103
 
        tests.
1104
 
        
1105
 
        :param path: the path to the light checkout.
1106
 
        :param lco_tree: the tree object for the light checkout.
1107
 
        :param shared_repo: A shared repository is in use, expect that in
1108
 
            the output.
1109
 
        :param repo_branch: A branch in a shared repository for non light
1110
 
            checkouts.
1111
 
        :param tree_locked: If true, expect the tree to be locked.
1112
 
        :param branch_locked: If true, expect the branch to be locked.
1113
 
        :param repo_locked: If true, expect the repository to be locked.
1114
 
        :param verbose: If true, expect verbose output
1115
 
        """
1116
 
        out, err = self.runbzr('info %s' % command_string)
1117
 
        if repo_locked or branch_locked or tree_locked:
1118
 
            def locked_message(a_bool):
1119
 
                if a_bool:
1120
 
                    return 'locked'
1121
 
                else:
1122
 
                    return 'unlocked'
1123
 
            expected_lock_output = (
1124
 
                "\n"
1125
 
                "Lock status:\n"
1126
 
                "  working tree: %s\n"
1127
 
                "        branch: %s\n"
1128
 
                "    repository: %s\n" % (
1129
 
                    locked_message(tree_locked),
1130
 
                    locked_message(branch_locked),
1131
 
                    locked_message(repo_locked)))
1132
 
        else:
1133
 
            expected_lock_output = ''
1134
 
        if light_checkout:
1135
 
            tree_data = (" light checkout root: %s" %
1136
 
                lco_tree.bzrdir.root_transport.base)
1137
 
        else:
1138
 
            tree_data = ("       checkout root: %s" %
1139
 
                lco_tree.bzrdir.root_transport.base)
1140
 
        if shared_repo is not None:
1141
 
            branch_data = (
1142
 
                "   shared repository: %s\n"
1143
 
                "   repository branch: branch\n" %
1144
 
                shared_repo.bzrdir.root_transport.base)
1145
 
        elif repo_branch is not None:
1146
 
            branch_data = (
1147
 
                "  checkout of branch: %s\n" % 
1148
 
                repo_branch.bzrdir.root_transport.base)
1149
 
        else:
1150
 
            branch_data = ("  checkout of branch: %s\n" % 
1151
 
                lco_tree.branch.bzrdir.root_transport.base)
1152
 
        
1153
 
        if verbose:
1154
 
            verbose_info = '         0 committers\n'
1155
 
        else:
1156
 
            verbose_info = ''
1157
 
            
1158
 
        self.assertEqualDiff(
1159
 
"""Location:
1160
 
%s
1161
 
%s
1162
 
Format:
1163
 
       control: Meta directory format 1
1164
 
  working tree: %s
1165
 
        branch: Branch format 5
1166
 
    repository: %s
1167
 
%s
1168
 
In the working tree:
1169
 
         0 unchanged
1170
 
         0 modified
1171
 
         0 added
1172
 
         0 removed
1173
 
         0 renamed
1174
 
         0 unknown
1175
 
         0 ignored
1176
 
         0 versioned subdirectories
1177
 
 
1178
 
Branch history:
1179
 
         0 revisions
1180
 
%s
1181
 
Revision store:
1182
 
         0 revisions
1183
 
         0 KiB
1184
 
""" %  (tree_data,
1185
 
        branch_data,
1186
 
        lco_tree._format.get_format_description(),
1187
 
        lco_tree.branch.repository._format.get_format_description(),
1188
 
        expected_lock_output,
1189
 
        verbose_info,
1190
 
        ), out)
1191
 
        self.assertEqual('', err)
1192
 
 
1193
1150
    def test_info_locking(self):
1194
1151
        transport = self.get_transport()
1195
1152
        # Create shared repository with a branch
1216
1173
        # W B R
1217
1174
 
1218
1175
        # U U U
1219
 
        self.assertCheckoutStatusOutput('tree/lightcheckout', lco_tree)
 
1176
        out, err = self.runbzr('info tree/lightcheckout')
 
1177
        self.assertEqualDiff(
 
1178
"""Location:
 
1179
  light checkout root: %s
 
1180
   checkout of branch: %s
 
1181
 
 
1182
Format:
 
1183
       control: Meta directory format 1
 
1184
  working tree: Working tree format 3
 
1185
        branch: Branch format 5
 
1186
    repository: %s
 
1187
 
 
1188
In the working tree:
 
1189
         0 unchanged
 
1190
         0 modified
 
1191
         0 added
 
1192
         0 removed
 
1193
         0 renamed
 
1194
         0 unknown
 
1195
         0 ignored
 
1196
         0 versioned subdirectories
 
1197
 
 
1198
Branch history:
 
1199
         0 revisions
 
1200
 
 
1201
Revision store:
 
1202
         0 revisions
 
1203
         0 KiB
 
1204
""" % (lco_tree.bzrdir.root_transport.base,
 
1205
       lco_tree.branch.bzrdir.root_transport.base,
 
1206
       lco_tree.branch.repository._format.get_format_description(),
 
1207
       ), out)
 
1208
        self.assertEqual('', err)
1220
1209
        # U U L
1221
1210
        lco_tree.branch.repository.lock_write()
1222
 
        try:
1223
 
            self.assertCheckoutStatusOutput('tree/lightcheckout',
1224
 
            lco_tree,
1225
 
            repo_locked=True)
1226
 
        finally:
1227
 
            lco_tree.branch.repository.unlock()
 
1211
        out, err = self.runbzr('info tree/lightcheckout')
 
1212
        self.assertEqualDiff(
 
1213
"""Location:
 
1214
  light checkout root: %s
 
1215
   checkout of branch: %s
 
1216
 
 
1217
Format:
 
1218
       control: Meta directory format 1
 
1219
  working tree: Working tree format 3
 
1220
        branch: Branch format 5
 
1221
    repository: %s
 
1222
 
 
1223
Lock status:
 
1224
  working tree: unlocked
 
1225
        branch: unlocked
 
1226
    repository: locked
 
1227
 
 
1228
In the working tree:
 
1229
         0 unchanged
 
1230
         0 modified
 
1231
         0 added
 
1232
         0 removed
 
1233
         0 renamed
 
1234
         0 unknown
 
1235
         0 ignored
 
1236
         0 versioned subdirectories
 
1237
 
 
1238
Branch history:
 
1239
         0 revisions
 
1240
 
 
1241
Revision store:
 
1242
         0 revisions
 
1243
         0 KiB
 
1244
""" % (lco_tree.bzrdir.root_transport.base,
 
1245
       lco_tree.branch.bzrdir.root_transport.base,
 
1246
       lco_tree.branch.repository._format.get_format_description(),
 
1247
       ), out)
 
1248
        self.assertEqual('', err)
 
1249
        lco_tree.branch.repository.unlock()
1228
1250
        # U L L
1229
1251
        lco_tree.branch.lock_write()
1230
 
        try:
1231
 
            self.assertCheckoutStatusOutput('tree/lightcheckout',
1232
 
            lco_tree,
1233
 
            branch_locked=True,
1234
 
            repo_locked=True)
1235
 
        finally:
1236
 
            lco_tree.branch.unlock()
 
1252
        out, err = self.runbzr('info tree/lightcheckout')
 
1253
        self.assertEqualDiff(
 
1254
"""Location:
 
1255
  light checkout root: %s
 
1256
   checkout of branch: %s
 
1257
 
 
1258
Format:
 
1259
       control: Meta directory format 1
 
1260
  working tree: Working tree format 3
 
1261
        branch: Branch format 5
 
1262
    repository: %s
 
1263
 
 
1264
Lock status:
 
1265
  working tree: unlocked
 
1266
        branch: locked
 
1267
    repository: locked
 
1268
 
 
1269
In the working tree:
 
1270
         0 unchanged
 
1271
         0 modified
 
1272
         0 added
 
1273
         0 removed
 
1274
         0 renamed
 
1275
         0 unknown
 
1276
         0 ignored
 
1277
         0 versioned subdirectories
 
1278
 
 
1279
Branch history:
 
1280
         0 revisions
 
1281
 
 
1282
Revision store:
 
1283
         0 revisions
 
1284
         0 KiB
 
1285
""" % (lco_tree.bzrdir.root_transport.base,
 
1286
       lco_tree.branch.bzrdir.root_transport.base,
 
1287
       lco_tree.branch.repository._format.get_format_description(),
 
1288
       ), out)
 
1289
        self.assertEqual('', err)
 
1290
        lco_tree.branch.unlock()
1237
1291
        # L L L
1238
1292
        lco_tree.lock_write()
1239
 
        try:
1240
 
            self.assertCheckoutStatusOutput('tree/lightcheckout',
1241
 
            lco_tree,
1242
 
            tree_locked=True,
1243
 
            branch_locked=True,
1244
 
            repo_locked=True)
1245
 
        finally:
1246
 
            lco_tree.unlock()
 
1293
        out, err = self.runbzr('info tree/lightcheckout')
 
1294
        self.assertEqualDiff(
 
1295
"""Location:
 
1296
  light checkout root: %s
 
1297
   checkout of branch: %s
 
1298
 
 
1299
Format:
 
1300
       control: Meta directory format 1
 
1301
  working tree: Working tree format 3
 
1302
        branch: Branch format 5
 
1303
    repository: %s
 
1304
 
 
1305
Lock status:
 
1306
  working tree: locked
 
1307
        branch: locked
 
1308
    repository: locked
 
1309
 
 
1310
In the working tree:
 
1311
         0 unchanged
 
1312
         0 modified
 
1313
         0 added
 
1314
         0 removed
 
1315
         0 renamed
 
1316
         0 unknown
 
1317
         0 ignored
 
1318
         0 versioned subdirectories
 
1319
 
 
1320
Branch history:
 
1321
         0 revisions
 
1322
 
 
1323
Revision store:
 
1324
         0 revisions
 
1325
         0 KiB
 
1326
""" % (lco_tree.bzrdir.root_transport.base,
 
1327
       lco_tree.branch.bzrdir.root_transport.base,
 
1328
       lco_tree.branch.repository._format.get_format_description(),
 
1329
       ), out)
 
1330
        self.assertEqual('', err)
 
1331
        lco_tree.unlock()
1247
1332
        # L L U
1248
1333
        lco_tree.lock_write()
1249
1334
        lco_tree.branch.repository.unlock()
1250
 
        try:
1251
 
            self.assertCheckoutStatusOutput('tree/lightcheckout',
1252
 
            lco_tree,
1253
 
            tree_locked=True,
1254
 
            branch_locked=True)
1255
 
        finally:
1256
 
            lco_tree.branch.repository.lock_write()
1257
 
            lco_tree.unlock()
 
1335
        out, err = self.runbzr('info tree/lightcheckout')
 
1336
        self.assertEqualDiff(
 
1337
"""Location:
 
1338
  light checkout root: %s
 
1339
   checkout of branch: %s
 
1340
 
 
1341
Format:
 
1342
       control: Meta directory format 1
 
1343
  working tree: Working tree format 3
 
1344
        branch: Branch format 5
 
1345
    repository: %s
 
1346
 
 
1347
Lock status:
 
1348
  working tree: locked
 
1349
        branch: locked
 
1350
    repository: unlocked
 
1351
 
 
1352
In the working tree:
 
1353
         0 unchanged
 
1354
         0 modified
 
1355
         0 added
 
1356
         0 removed
 
1357
         0 renamed
 
1358
         0 unknown
 
1359
         0 ignored
 
1360
         0 versioned subdirectories
 
1361
 
 
1362
Branch history:
 
1363
         0 revisions
 
1364
 
 
1365
Revision store:
 
1366
         0 revisions
 
1367
         0 KiB
 
1368
""" % (lco_tree.bzrdir.root_transport.base,
 
1369
       lco_tree.branch.bzrdir.root_transport.base,
 
1370
       lco_tree.branch.repository._format.get_format_description(),
 
1371
       ), out)
 
1372
        self.assertEqual('', err)
 
1373
        lco_tree.branch.repository.lock_write()
 
1374
        lco_tree.unlock()
1258
1375
        # L U U
1259
1376
        lco_tree.lock_write()
1260
1377
        lco_tree.branch.unlock()
1261
 
        try:
1262
 
            self.assertCheckoutStatusOutput('tree/lightcheckout',
1263
 
            lco_tree,
1264
 
            tree_locked=True)
1265
 
        finally:
1266
 
            lco_tree.branch.lock_write()
1267
 
            lco_tree.unlock()
 
1378
        out, err = self.runbzr('info tree/lightcheckout')
 
1379
        self.assertEqualDiff(
 
1380
"""Location:
 
1381
  light checkout root: %s
 
1382
   checkout of branch: %s
 
1383
 
 
1384
Format:
 
1385
       control: Meta directory format 1
 
1386
  working tree: Working tree format 3
 
1387
        branch: Branch format 5
 
1388
    repository: %s
 
1389
 
 
1390
Lock status:
 
1391
  working tree: locked
 
1392
        branch: unlocked
 
1393
    repository: unlocked
 
1394
 
 
1395
In the working tree:
 
1396
         0 unchanged
 
1397
         0 modified
 
1398
         0 added
 
1399
         0 removed
 
1400
         0 renamed
 
1401
         0 unknown
 
1402
         0 ignored
 
1403
         0 versioned subdirectories
 
1404
 
 
1405
Branch history:
 
1406
         0 revisions
 
1407
 
 
1408
Revision store:
 
1409
         0 revisions
 
1410
         0 KiB
 
1411
""" % (lco_tree.bzrdir.root_transport.base,
 
1412
       lco_tree.branch.bzrdir.root_transport.base,
 
1413
       lco_tree.branch.repository._format.get_format_description(),
 
1414
       ), out)
 
1415
        self.assertEqual('', err)
 
1416
        lco_tree.branch.lock_write()
 
1417
        lco_tree.unlock()
1268
1418
        # L U L
1269
1419
        lco_tree.lock_write()
1270
1420
        lco_tree.branch.unlock()
1271
1421
        lco_tree.branch.repository.lock_write()
1272
 
        try:
1273
 
            self.assertCheckoutStatusOutput('tree/lightcheckout',
1274
 
            lco_tree,
1275
 
            tree_locked=True,
1276
 
            repo_locked=True)
1277
 
        finally:
1278
 
            lco_tree.branch.repository.unlock()
1279
 
            lco_tree.branch.lock_write()
1280
 
            lco_tree.unlock()
 
1422
        out, err = self.runbzr('info tree/lightcheckout')
 
1423
        self.assertEqualDiff(
 
1424
"""Location:
 
1425
  light checkout root: %s
 
1426
   checkout of branch: %s
 
1427
 
 
1428
Format:
 
1429
       control: Meta directory format 1
 
1430
  working tree: Working tree format 3
 
1431
        branch: Branch format 5
 
1432
    repository: %s
 
1433
 
 
1434
Lock status:
 
1435
  working tree: locked
 
1436
        branch: unlocked
 
1437
    repository: locked
 
1438
 
 
1439
In the working tree:
 
1440
         0 unchanged
 
1441
         0 modified
 
1442
         0 added
 
1443
         0 removed
 
1444
         0 renamed
 
1445
         0 unknown
 
1446
         0 ignored
 
1447
         0 versioned subdirectories
 
1448
 
 
1449
Branch history:
 
1450
         0 revisions
 
1451
 
 
1452
Revision store:
 
1453
         0 revisions
 
1454
         0 KiB
 
1455
""" % (lco_tree.bzrdir.root_transport.base,
 
1456
       lco_tree.branch.bzrdir.root_transport.base,
 
1457
       lco_tree.branch.repository._format.get_format_description(),
 
1458
       ), out)
 
1459
        self.assertEqual('', err)
 
1460
        lco_tree.branch.repository.unlock()
 
1461
        lco_tree.branch.lock_write()
 
1462
        lco_tree.unlock()
1281
1463
        # U L U
1282
1464
        lco_tree.branch.lock_write()
1283
1465
        lco_tree.branch.repository.unlock()
1284
 
        try:
1285
 
            self.assertCheckoutStatusOutput('tree/lightcheckout',
1286
 
            lco_tree,
1287
 
            branch_locked=True)
1288
 
        finally:
1289
 
            lco_tree.branch.repository.lock_write()
1290
 
            lco_tree.branch.unlock()
 
1466
        out, err = self.runbzr('info tree/lightcheckout')
 
1467
        self.assertEqualDiff(
 
1468
"""Location:
 
1469
  light checkout root: %s
 
1470
   checkout of branch: %s
 
1471
 
 
1472
Format:
 
1473
       control: Meta directory format 1
 
1474
  working tree: Working tree format 3
 
1475
        branch: Branch format 5
 
1476
    repository: %s
 
1477
 
 
1478
Lock status:
 
1479
  working tree: unlocked
 
1480
        branch: locked
 
1481
    repository: unlocked
 
1482
 
 
1483
In the working tree:
 
1484
         0 unchanged
 
1485
         0 modified
 
1486
         0 added
 
1487
         0 removed
 
1488
         0 renamed
 
1489
         0 unknown
 
1490
         0 ignored
 
1491
         0 versioned subdirectories
 
1492
 
 
1493
Branch history:
 
1494
         0 revisions
 
1495
 
 
1496
Revision store:
 
1497
         0 revisions
 
1498
         0 KiB
 
1499
""" % (lco_tree.bzrdir.root_transport.base,
 
1500
       lco_tree.branch.bzrdir.root_transport.base,
 
1501
       lco_tree.branch.repository._format.get_format_description(),
 
1502
       ), out)
 
1503
        self.assertEqual('', err)
 
1504
        lco_tree.branch.repository.lock_write()
 
1505
        lco_tree.branch.unlock()
1291
1506
 
1292
1507
    def test_info_locking_oslocks(self):
1293
 
        if sys.platform == "win32":
1294
 
            raise TestSkipped("don't use oslocks on win32 in unix manner")
1295
 
 
1296
1508
        tree = self.make_branch_and_tree('branch',
1297
1509
                                         format=bzrlib.bzrdir.BzrDirFormat6())
1298
1510