~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2006-09-11 22:48:57 UTC
  • mto: This revision was merged to the branch mainline in revision 2004.
  • Revision ID: john@arbash-meinel.com-20060911224857-d7008be21aeee33e
Switch from individual functions to a class

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
21
22
 
22
23
import bzrlib
23
 
 
24
 
 
25
24
from bzrlib.osutils import format_date
26
25
from bzrlib.tests import TestSkipped
27
26
from bzrlib.tests.blackbox import ExternalBase
30
29
class TestInfo(ExternalBase):
31
30
 
32
31
    def test_info_non_existing(self):
33
 
        out, err = self.runbzr('info /i/do/not/exist/', retcode=3)
 
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)
34
37
        self.assertEqual(out, '')
35
 
        self.assertEqual(err, 'bzr: ERROR: Not a branch: /i/do/not/exist/\n')
 
38
        self.assertEqual(err, 'bzr: ERROR: Not a branch: %s\n' % location)
36
39
 
37
40
    def test_info_standalone(self):
38
41
        transport = self.get_transport()
133
136
        bzrlib.upgrade.upgrade('bound', bzrlib.bzrdir.BzrDirMetaFormat1())
134
137
        branch3 = bzrlib.bzrdir.BzrDir.open('bound').open_branch()
135
138
        branch3.bind(branch1)
 
139
        bound_tree = branch3.bzrdir.open_workingtree()
136
140
        out, err = self.runbzr('info bound')
137
141
        self.assertEqualDiff(
138
142
"""Location:
144
148
 
145
149
Format:
146
150
       control: Meta directory format 1
147
 
  working tree: Working tree format 3
 
151
  working tree: %s
148
152
        branch: Branch format 5
149
153
    repository: %s
150
154
 
170
174
""" % (branch3.bzrdir.root_transport.base,
171
175
       branch1.bzrdir.root_transport.base,
172
176
       branch1.bzrdir.root_transport.base,
 
177
       bound_tree._format.get_format_description(),      
173
178
       branch3.repository._format.get_format_description(),
174
179
       datestring_first, datestring_first,
175
180
       # poking at _revision_store isn't all that clean, but neither is
242
247
        out, err = self.runbzr('info lightcheckout')
243
248
        self.assertEqualDiff(
244
249
"""Location:
245
 
  light checkout root: %s
246
 
   checkout of branch: %s
 
250
 light checkout root: %s
 
251
  checkout of branch: %s
247
252
 
248
253
Format:
249
254
       control: Meta directory format 1
423
428
        out, err = self.runbzr('info lightcheckout --verbose')
424
429
        self.assertEqualDiff(
425
430
"""Location:
426
 
  light checkout root: %s
427
 
   checkout of branch: %s
 
431
 light checkout root: %s
 
432
  checkout of branch: %s
428
433
 
429
434
Format:
430
435
       control: Meta directory format 1
543
548
        dir2.create_workingtree()
544
549
        tree2 = dir2.open_workingtree()
545
550
        branch2 = tree2.branch
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)
 
551
        self.assertCheckoutStatusOutput('tree/lightcheckout', tree2, shared_repo=repo)
580
552
 
581
553
        # Create normal checkout
582
 
        branch3 = bzrlib.bzrdir.BzrDir.create_branch_convenience('tree/checkout')
583
 
        branch3.bind(branch1)
584
 
        tree3 = branch3.bzrdir.open_workingtree()
585
 
        tree3.update()
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
 
 
 
554
        tree3 = branch1.create_checkout('tree/checkout')
 
555
        self.assertCheckoutStatusOutput('tree/checkout --verbose', tree3,
 
556
            verbose=True,
 
557
            light_checkout=False, repo_branch=branch1)
621
558
        # Update lightweight checkout
622
559
        self.build_tree(['tree/lightcheckout/a'])
623
560
        tree2.add('a')
627
564
        out, err = self.runbzr('info tree/lightcheckout --verbose')
628
565
        self.assertEqualDiff(
629
566
"""Location:
630
 
  light checkout root: %s
631
 
    shared repository: %s
632
 
    repository branch: branch
 
567
 light checkout root: %s
 
568
   shared repository: %s
 
569
   repository branch: branch
633
570
 
634
571
Format:
635
572
       control: Meta directory format 1
756
693
        out, err = self.runbzr('info tree/lightcheckout --verbose')
757
694
        self.assertEqualDiff(
758
695
"""Location:
759
 
  light checkout root: %s
760
 
    shared repository: %s
761
 
    repository branch: branch
 
696
 light checkout root: %s
 
697
   shared repository: %s
 
698
   repository branch: branch
762
699
 
763
700
Format:
764
701
       control: Meta directory format 1
1147
1084
 
1148
1085
        bzrlib.bzrdir.BzrDirFormat.set_default_format(old_format)
1149
1086
 
 
1087
    def assertCheckoutStatusOutput(self, 
 
1088
        command_string, lco_tree, shared_repo=None,
 
1089
        repo_branch=None,
 
1090
        tree_locked=False,
 
1091
        branch_locked=False, repo_locked=False,
 
1092
        verbose=False,
 
1093
        light_checkout=True):
 
1094
        """Check the output of info in a light checkout tree.
 
1095
 
 
1096
        This is not quite a mirror of the info code: rather than using the
 
1097
        tree being examined to predict output, it uses a bunch of flags which
 
1098
        allow us, the test writers, to document what *should* be present in
 
1099
        the output. Removing this separation would remove the value of the
 
1100
        tests.
 
1101
        
 
1102
        :param path: the path to the light checkout.
 
1103
        :param lco_tree: the tree object for the light checkout.
 
1104
        :param shared_repo: A shared repository is in use, expect that in
 
1105
            the output.
 
1106
        :param repo_branch: A branch in a shared repository for non light
 
1107
            checkouts.
 
1108
        :param tree_locked: If true, expect the tree to be locked.
 
1109
        :param branch_locked: If true, expect the branch to be locked.
 
1110
        :param repo_locked: If true, expect the repository to be locked.
 
1111
        :param verbose: If true, expect verbose output
 
1112
        """
 
1113
        out, err = self.runbzr('info %s' % command_string)
 
1114
        if repo_locked or branch_locked or tree_locked:
 
1115
            def locked_message(a_bool):
 
1116
                if a_bool:
 
1117
                    return 'locked'
 
1118
                else:
 
1119
                    return 'unlocked'
 
1120
            expected_lock_output = (
 
1121
                "\n"
 
1122
                "Lock status:\n"
 
1123
                "  working tree: %s\n"
 
1124
                "        branch: %s\n"
 
1125
                "    repository: %s\n" % (
 
1126
                    locked_message(tree_locked),
 
1127
                    locked_message(branch_locked),
 
1128
                    locked_message(repo_locked)))
 
1129
        else:
 
1130
            expected_lock_output = ''
 
1131
        if light_checkout:
 
1132
            tree_data = (" light checkout root: %s" %
 
1133
                lco_tree.bzrdir.root_transport.base)
 
1134
        else:
 
1135
            tree_data = ("       checkout root: %s" %
 
1136
                lco_tree.bzrdir.root_transport.base)
 
1137
        if shared_repo is not None:
 
1138
            branch_data = (
 
1139
                "   shared repository: %s\n"
 
1140
                "   repository branch: branch\n" %
 
1141
                shared_repo.bzrdir.root_transport.base)
 
1142
        elif repo_branch is not None:
 
1143
            branch_data = (
 
1144
                "  checkout of branch: %s\n" % 
 
1145
                repo_branch.bzrdir.root_transport.base)
 
1146
        else:
 
1147
            branch_data = ("  checkout of branch: %s\n" % 
 
1148
                lco_tree.branch.bzrdir.root_transport.base)
 
1149
        
 
1150
        if verbose:
 
1151
            verbose_info = '         0 committers\n'
 
1152
        else:
 
1153
            verbose_info = ''
 
1154
            
 
1155
        self.assertEqualDiff(
 
1156
"""Location:
 
1157
%s
 
1158
%s
 
1159
Format:
 
1160
       control: Meta directory format 1
 
1161
  working tree: %s
 
1162
        branch: Branch format 5
 
1163
    repository: %s
 
1164
%s
 
1165
In the working tree:
 
1166
         0 unchanged
 
1167
         0 modified
 
1168
         0 added
 
1169
         0 removed
 
1170
         0 renamed
 
1171
         0 unknown
 
1172
         0 ignored
 
1173
         0 versioned subdirectories
 
1174
 
 
1175
Branch history:
 
1176
         0 revisions
 
1177
%s
 
1178
Revision store:
 
1179
         0 revisions
 
1180
         0 KiB
 
1181
""" %  (tree_data,
 
1182
        branch_data,
 
1183
        lco_tree._format.get_format_description(),
 
1184
        lco_tree.branch.repository._format.get_format_description(),
 
1185
        expected_lock_output,
 
1186
        verbose_info,
 
1187
        ), out)
 
1188
        self.assertEqual('', err)
 
1189
 
1150
1190
    def test_info_locking(self):
1151
1191
        transport = self.get_transport()
1152
1192
        # Create shared repository with a branch
1173
1213
        # W B R
1174
1214
 
1175
1215
        # U U U
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)
 
1216
        self.assertCheckoutStatusOutput('tree/lightcheckout', lco_tree)
1209
1217
        # U U L
1210
1218
        lco_tree.branch.repository.lock_write()
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()
 
1219
        try:
 
1220
            self.assertCheckoutStatusOutput('tree/lightcheckout',
 
1221
            lco_tree,
 
1222
            repo_locked=True)
 
1223
        finally:
 
1224
            lco_tree.branch.repository.unlock()
1250
1225
        # U L L
1251
1226
        lco_tree.branch.lock_write()
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()
 
1227
        try:
 
1228
            self.assertCheckoutStatusOutput('tree/lightcheckout',
 
1229
            lco_tree,
 
1230
            branch_locked=True,
 
1231
            repo_locked=True)
 
1232
        finally:
 
1233
            lco_tree.branch.unlock()
1291
1234
        # L L L
1292
1235
        lco_tree.lock_write()
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()
 
1236
        try:
 
1237
            self.assertCheckoutStatusOutput('tree/lightcheckout',
 
1238
            lco_tree,
 
1239
            tree_locked=True,
 
1240
            branch_locked=True,
 
1241
            repo_locked=True)
 
1242
        finally:
 
1243
            lco_tree.unlock()
1332
1244
        # L L U
1333
1245
        lco_tree.lock_write()
1334
1246
        lco_tree.branch.repository.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()
 
1247
        try:
 
1248
            self.assertCheckoutStatusOutput('tree/lightcheckout',
 
1249
            lco_tree,
 
1250
            tree_locked=True,
 
1251
            branch_locked=True)
 
1252
        finally:
 
1253
            lco_tree.branch.repository.lock_write()
 
1254
            lco_tree.unlock()
1375
1255
        # L U U
1376
1256
        lco_tree.lock_write()
1377
1257
        lco_tree.branch.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()
 
1258
        try:
 
1259
            self.assertCheckoutStatusOutput('tree/lightcheckout',
 
1260
            lco_tree,
 
1261
            tree_locked=True)
 
1262
        finally:
 
1263
            lco_tree.branch.lock_write()
 
1264
            lco_tree.unlock()
1418
1265
        # L U L
1419
1266
        lco_tree.lock_write()
1420
1267
        lco_tree.branch.unlock()
1421
1268
        lco_tree.branch.repository.lock_write()
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()
 
1269
        try:
 
1270
            self.assertCheckoutStatusOutput('tree/lightcheckout',
 
1271
            lco_tree,
 
1272
            tree_locked=True,
 
1273
            repo_locked=True)
 
1274
        finally:
 
1275
            lco_tree.branch.repository.unlock()
 
1276
            lco_tree.branch.lock_write()
 
1277
            lco_tree.unlock()
1463
1278
        # U L U
1464
1279
        lco_tree.branch.lock_write()
1465
1280
        lco_tree.branch.repository.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()
 
1281
        try:
 
1282
            self.assertCheckoutStatusOutput('tree/lightcheckout',
 
1283
            lco_tree,
 
1284
            branch_locked=True)
 
1285
        finally:
 
1286
            lco_tree.branch.repository.lock_write()
 
1287
            lco_tree.branch.unlock()
1506
1288
 
1507
1289
    def test_info_locking_oslocks(self):
 
1290
        if sys.platform == "win32":
 
1291
            raise TestSkipped("don't use oslocks on win32 in unix manner")
 
1292
 
1508
1293
        tree = self.make_branch_and_tree('branch',
1509
1294
                                         format=bzrlib.bzrdir.BzrDirFormat6())
1510
1295