1252
1252
def has_workingtree(self):
1253
1253
"""Tell if this bzrdir contains a working tree.
1255
This will still raise an exception if the bzrdir has a workingtree that
1256
is remote & inaccessible.
1258
1255
Note: if you're going to open the working tree, you should just go
1259
1256
ahead and try, and not ask permission first.
1261
1258
from bzrlib.workingtree import WorkingTreeFormat
1263
WorkingTreeFormat.find_format(self)
1260
WorkingTreeFormat.find_format_string(self)
1264
1261
except errors.NoWorkingTree:
2121
2118
help='New in 0.15: Fast local operations. Compatible with bzr 0.8 and '
2122
2119
'above when accessed over the network.',
2123
2120
branch_format='bzrlib.branch.BzrBranchFormat5',
2124
# this uses bzrlib.workingtree.WorkingTreeFormat4 because importing
2125
# directly from workingtree_4 triggers a circular import.
2126
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
2121
tree_format='bzrlib.workingtree_4.WorkingTreeFormat4',
2128
2123
deprecated=True)
2129
2124
register_metadir(controldir.format_registry, 'dirstate-tags',
2132
2127
'network operations. Additionally adds support for tags.'
2133
2128
' Incompatible with bzr < 0.15.',
2134
2129
branch_format='bzrlib.branch.BzrBranchFormat6',
2135
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
2130
tree_format='bzrlib.workingtree_4.WorkingTreeFormat4',
2137
2132
deprecated=True)
2138
2133
register_metadir(controldir.format_registry, 'rich-root',
2140
2135
help='New in 1.0. Better handling of tree roots. Incompatible with'
2142
2137
branch_format='bzrlib.branch.BzrBranchFormat6',
2143
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
2138
tree_format='bzrlib.workingtree_4.WorkingTreeFormat4',
2145
2140
deprecated=True)
2146
2141
register_metadir(controldir.format_registry, 'dirstate-with-subtree',
2149
2144
'network operations. Additionally adds support for versioning nested '
2150
2145
'bzr branches. Incompatible with bzr < 0.15.',
2151
2146
branch_format='bzrlib.branch.BzrBranchFormat6',
2152
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
2147
tree_format='bzrlib.workingtree_4.WorkingTreeFormat4',
2153
2148
experimental=True,
2160
2155
'bzr repositories before 0.92 but cannot be read by bzr < 0.92. '
2162
2157
branch_format='bzrlib.branch.BzrBranchFormat6',
2163
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
2158
tree_format='bzrlib.workingtree_4.WorkingTreeFormat4',
2165
2160
register_metadir(controldir.format_registry, 'pack-0.92-subtree',
2166
2161
'bzrlib.repofmt.knitpack_repo.RepositoryFormatKnitPack3',
2169
2164
'bzr repositories before 0.92 but cannot be read by bzr < 0.92. '
2171
2166
branch_format='bzrlib.branch.BzrBranchFormat6',
2172
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
2167
tree_format='bzrlib.workingtree_4.WorkingTreeFormat4',
2174
2169
experimental=True,
2178
2173
help='New in 1.0: A variant of pack-0.92 that supports rich-root data '
2179
2174
'(needed for bzr-svn and bzr-git).',
2180
2175
branch_format='bzrlib.branch.BzrBranchFormat6',
2181
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
2176
tree_format='bzrlib.workingtree_4.WorkingTreeFormat4',
2184
2179
register_metadir(controldir.format_registry, '1.6',
2187
2182
'(stacked) repository that should be used to access data that is '
2188
2183
'not present locally.',
2189
2184
branch_format='bzrlib.branch.BzrBranchFormat7',
2190
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
2185
tree_format='bzrlib.workingtree_4.WorkingTreeFormat4',
2193
2188
register_metadir(controldir.format_registry, '1.6.1-rich-root',
2195
2190
help='A variant of 1.6 that supports rich-root data '
2196
2191
'(needed for bzr-svn and bzr-git).',
2197
2192
branch_format='bzrlib.branch.BzrBranchFormat7',
2198
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
2193
tree_format='bzrlib.workingtree_4.WorkingTreeFormat4',
2201
2196
register_metadir(controldir.format_registry, '1.9',
2204
2199
'are smaller in size, have smarter caching and provide faster '
2205
2200
'performance for most operations.',
2206
2201
branch_format='bzrlib.branch.BzrBranchFormat7',
2207
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
2202
tree_format='bzrlib.workingtree_4.WorkingTreeFormat4',
2210
2205
register_metadir(controldir.format_registry, '1.9-rich-root',
2212
2207
help='A variant of 1.9 that supports rich-root data '
2213
2208
'(needed for bzr-svn and bzr-git).',
2214
2209
branch_format='bzrlib.branch.BzrBranchFormat7',
2215
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
2210
tree_format='bzrlib.workingtree_4.WorkingTreeFormat4',
2218
2213
register_metadir(controldir.format_registry, '1.14',
2219
2214
'bzrlib.repofmt.knitpack_repo.RepositoryFormatKnitPack6',
2220
2215
help='A working-tree format that supports content filtering.',
2221
2216
branch_format='bzrlib.branch.BzrBranchFormat7',
2222
tree_format='bzrlib.workingtree.WorkingTreeFormat5',
2217
tree_format='bzrlib.workingtree_4.WorkingTreeFormat5',
2224
2219
register_metadir(controldir.format_registry, '1.14-rich-root',
2225
2220
'bzrlib.repofmt.knitpack_repo.RepositoryFormatKnitPack6RichRoot',
2226
2221
help='A variant of 1.14 that supports rich-root data '
2227
2222
'(needed for bzr-svn and bzr-git).',
2228
2223
branch_format='bzrlib.branch.BzrBranchFormat7',
2229
tree_format='bzrlib.workingtree.WorkingTreeFormat5',
2224
tree_format='bzrlib.workingtree_4.WorkingTreeFormat5',
2231
2226
# The following un-numbered 'development' formats should always just be aliases.
2232
2227
register_metadir(controldir.format_registry, 'development-subtree',
2238
2233
'http://doc.bazaar.canonical.com/latest/developers/development-repo.html '
2240
2235
branch_format='bzrlib.branch.BzrBranchFormat7',
2241
tree_format='bzrlib.workingtree.WorkingTreeFormat6',
2236
tree_format='bzrlib.workingtree_4.WorkingTreeFormat6',
2242
2237
experimental=True,
2244
2239
alias=False, # Restore to being an alias when an actual development subtree format is added
2254
2249
'http://doc.bazaar.canonical.com/latest/developers/development-repo.html '
2256
2251
branch_format='bzrlib.branch.BzrBranchFormat7',
2257
tree_format='bzrlib.workingtree.WorkingTreeFormat6',
2252
tree_format='bzrlib.workingtree_4.WorkingTreeFormat6',
2258
2253
experimental=True,
2271
2266
# 'storage in packs, 255-way hashed CHK inventory, bencode revision, group compress, '
2272
2267
# 'rich roots. Supported by bzr 1.16 and later.',
2273
2268
branch_format='bzrlib.branch.BzrBranchFormat7',
2274
tree_format='bzrlib.workingtree.WorkingTreeFormat6',
2269
tree_format='bzrlib.workingtree_4.WorkingTreeFormat6',
2275
2270
experimental=False,
2280
2275
register_metadir(controldir.format_registry, 'default-rich-root',
2281
2276
'bzrlib.repofmt.groupcompress_repo.RepositoryFormat2a',
2282
2277
branch_format='bzrlib.branch.BzrBranchFormat7',
2283
tree_format='bzrlib.workingtree.WorkingTreeFormat6',
2278
tree_format='bzrlib.workingtree_4.WorkingTreeFormat6',
2286
2281
help='Same as 2a.')