find_bzrdirs shouldn't follow symlinks

Bug #995055 reported by Matthew Fuller
18
This bug affects 4 people
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/local/bin/bzr --no-plugins --no-aliases"

${bzr} init-repo A
(
 cd A
 bzr init a
 ln -s x a/x
 ${bzr} check
)

John A Meinel (jameinel)
Changed in bzr:
status: New → Confirmed
importance: Undecided → Low
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.