find_bzrdirs shouldn't follow symlinks
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Low
|
Unassigned |
Bug Description
find_bzrdirs (used by 'bzr check', amonst other things) follow any symlinks it encounters. This has a number of terribly annoying side effects.
- If there's a symlink to a branch, that branch gets found and check'd twice (or more)
- If a symlink points off to a huge directory tree, even completely outside the location find_'ing under, the system goes and recurses down that whole tree
- Any loop in the symlinks blows up the whole process
It's possible to imagine cases where following symlinks under the find_'ing location is the Right Thing, but I think they're relatively rare, and even if done, should have dupe and loop detection that's nontrivial to write. The current state of falling into both traps is unpleasant at best (I've got repos I currently _can't_ `bzr check` because of this).
Simple test case:
#!/bin/sh -xe
bzr="/usr/
${bzr} init-repo A
(
cd A
bzr init a
ln -s x a/x
${bzr} check
)
Changed in bzr: | |
status: | New → Confirmed |
importance: | Undecided → Low |
tags: | added: check-for-breezy |