bzr branch or checkout --hardlink has no effect in 2a format
Bug #408193 reported by
Martin Pool
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Medium
|
Unassigned |
Bug Description
If the default format is set to 2a, blackbox tests show that branch/checkout --hardlink have no effect.
Related branches
lp://staging/~mbp/bzr/408193-hardlink
- Robert Collins (community): Approve
- Diff: 136 lines
lp://staging/~spiv/bzr/hardlink-2a-408193
Merged
into
lp://staging/bzr
- Martin Pool: Approve
- John A Meinel: Approve
-
Diff: 202 lines (+60/-40)8 files modifiedNEWS (+4/-0)
bzrlib/builtins.py (+0/-3)
bzrlib/tests/blackbox/test_branch.py (+1/-9)
bzrlib/tests/blackbox/test_checkout.py (+1/-9)
bzrlib/tests/per_tree/test_iter_search_rules.py (+0/-1)
bzrlib/tests/test_transform.py (+45/-2)
bzrlib/transform.py (+6/-2)
bzrlib/workingtree_4.py (+3/-14)
Changed in bzr: | |
status: | In Progress → Fix Released |
milestone: | none → 2.1.0b4 |
To post a comment you must log in.
This behaviour is explained by this comment by Ian in workingtree_4.py:
1416 # If content filtering is supported, do not use the accelerator content_ filtering( ): nTrees, inventory_ delta does not mutate the input build_tree( basis, wt, accelerator_tree, tree=delta_ from_tree)
1417 # tree - the cost of transforming the content both ways and
1418 # checking for changed content can outweight the gains it gives.
1419 # Note: do NOT move this logic up higher - using the basis from
1420 # the accelerator tree is still desirable because that can save
1421 # a minute or more of processing on large trees!
1422 # The original tree may not have the same content filters
1423 # applied so we can't safely build the inventory delta from
1424 # the source tree.
1425 if wt.supports_
1426 accelerator_tree = None
1427 delta_from_tree = False
1428 else:
1429 delta_from_tree = True
1430 # delta_from_tree is safe even for DirStateRevisio
1431 # because wt4.apply_
1432 # inventory entries.
1433 transform.
1434 hardlink=hardlink,
1435 delta_from_
I'll change the test to expect failure here, and I think we should at least give a message to the user explaining why their request was not followed.
It seems like Ian's saying that we *could* hardlink them, it just might be slow. I think we should still give the user the option to do it if it's safe: they may care about disk space more than they care about speed, or they may not actually have any content filters configured.