git annex map does not spot graph loops

2011-12-04 Thread Adam Spiers
I set up two git annex repos on the local machine which point to each
other and then run git annex map, it chews up a load of CPU,
presumably trying to traverse the cyclic repository graph without ever
noticing there's a loop:

% mkdir -p annex-test/{a,b}
% cd annex-test/a
% git init
Initialized empty Git repository in /home/adam/tmp/2/annex-test/a/.git/
% git annex init
init  ok
% cd ../b
% git init
Initialized empty Git repository in /home/adam/tmp/2/annex-test/b/.git/
% git annex init
init  ok
% git remote add a ../a
% cd ../a
% git remote add b ../b
% time git annex map  map.out 21
git annex map  map.out 21  25.67s user 4.38s system 93% cpu 32.238 total
% head -n10 map.out
map /home/adam/tmp/2/annex-test/a ok
map b ok
map a ok
map b ok
map a ok
map b ok
map a ok
map b ok
map a ok
map b ok
% dd if=map.dot bs=1k count=1
digraph map {
subgraph cluster_localhost {
label=localhost
style=filled
fillcolor=lightblue

/home/adam/tmp/2/annex-test/a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b/../a/../b1+0
records in
1+0 records out
1024 bytes (1.0 kB) copied, 0.000182134 s, 5.6 MB/s
___
vcs-home mailing list
vcs-home@lists.madduck.net
http://lists.madduck.net/listinfo/vcs-home


Re: git annex map does not spot graph loops

2011-12-04 Thread Joey Hess
Adam Spiers wrote:
 I set up two git annex repos on the local machine which point to each
 other and then run git annex map, it chews up a load of CPU,
 presumably trying to traverse the cyclic repository graph without ever
 noticing there's a loop:

Fixed, it only happened when the repos referred to each other with
relative paths.

-- 
see shy jo


signature.asc
Description: Digital signature
___
vcs-home mailing list
vcs-home@lists.madduck.net
http://lists.madduck.net/listinfo/vcs-home