diff options
author | W. Trevor King <wking@tremily.us> | 2012-08-28 14:48:19 -0400 |
---|---|---|
committer | W. Trevor King <wking@tremily.us> | 2012-08-28 14:48:22 -0400 |
commit | 299ca4e57646921babf4dbbf95f28885549519b6 (patch) | |
tree | 67d131683c15fbdc7ef74d9451a95dc8692fe32d | |
parent | f8abe6aa77c0bc80f899cbec24cdedb297f28844 (diff) | |
download | bugseverywhere-299ca4e57646921babf4dbbf95f28885549519b6.tar.gz |
Allow symlinks in bugdir directories.
This allows you to do things like:
$ mkdir -p /tmp/joint-repo/.be
$ cd /tml/joint-repo/.be
$ ln -s ~/src/be/.be/version
$ ln -s ~/src/be/.be/bea86499-824e-4e77-b085-2d581fa9ccab/
$ ln -s ~/src/BEurtle/.be/7017b289-f207-4e39-9746-f58323404eba/
$ be list
without crashing with a:
Traceback (most recent call last):
File ".../libbe/storage/base.py", line 316, in children
return self._children(*args, **kwargs)
File ".../libbe/storage/vcs/base.py", line 820, in _children
path = self.path(id, revision, relpath=False)
File ".../libbe/storage/vcs/base.py", line 721, in path
path = self._cached_path_id.path(id)
File ".../libbe/storage/vcs/base.py", line 280, in path
raise InvalidID(uuid)
libbe.storage.base.InvalidID: 7017b289-f207-4e39-9746-f58323404eba in revision None
Currently it only lists the first bug directory it comes across, but
after this patch, it doesn't crash ;).
-rw-r--r-- | libbe/storage/vcs/base.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libbe/storage/vcs/base.py b/libbe/storage/vcs/base.py index 5f13c01..2a5f600 100644 --- a/libbe/storage/vcs/base.py +++ b/libbe/storage/vcs/base.py @@ -219,7 +219,8 @@ class CachedPathID (object): else: self._cache = cache spaced_root = os.path.join(self._root, self._spacer_dirs[0]) - for dirpath, dirnames, filenames in os.walk(spaced_root): + for dirpath, dirnames, filenames in os.walk(spaced_root, + followlinks=True): if dirpath == spaced_root: continue try: |