##// END OF EJS Templates
util: disable walkrepo() recursive behaviour...
Patrick Mezard -
r7494:85dc8863 default
parent child Browse files
Show More
@@ -1901,7 +1901,7 b' def walkrepos(path, followsym=False, see'
1901 _add_dir_if_not_there(seen_dirs, path)
1901 _add_dir_if_not_there(seen_dirs, path)
1902 for root, dirs, files in os.walk(path, topdown=True, onerror=errhandler):
1902 for root, dirs, files in os.walk(path, topdown=True, onerror=errhandler):
1903 if '.hg' in dirs:
1903 if '.hg' in dirs:
1904 dirs.remove('.hg') # don't recurse inside the .hg directory
1904 dirs[:] = [] # don't descend further
1905 yield root # found a repository
1905 yield root # found a repository
1906 qroot = os.path.join(root, '.hg', 'patches')
1906 qroot = os.path.join(root, '.hg', 'patches')
1907 if os.path.isdir(os.path.join(qroot, '.hg')):
1907 if os.path.isdir(os.path.join(qroot, '.hg')):
@@ -16,14 +16,8 b" hg --cwd b ci -Amb -d'2 0'"
16 hg init c
16 hg init c
17 echo c > c/c
17 echo c > c/c
18 hg --cwd c ci -Amc -d'3 0'
18 hg --cwd c ci -Amc -d'3 0'
19 root=`pwd`
19
20
20 cd b
21 hg init d
22 echo d > d/d
23 hg --cwd d ci -Amd
24 cd ..
25
26 root=`pwd`
27 cd ..
21 cd ..
28
22
29 cat > paths.conf <<EOF
23 cat > paths.conf <<EOF
@@ -85,7 +79,6 b' echo % should succeed'
85 "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/file/tip/a?style=raw'
79 "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/file/tip/a?style=raw'
86 "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/b/file/tip/b?style=raw'
80 "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/b/file/tip/b?style=raw'
87 "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/c/file/tip/c?style=raw'
81 "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/c/file/tip/c?style=raw'
88 "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/b/d/rev/tip/?style=raw'
89
82
90 echo % paths errors 1
83 echo % paths errors 1
91 cat error-paths-1.log
84 cat error-paths-1.log
@@ -1,7 +1,6 b''
1 adding a
1 adding a
2 adding b
2 adding b
3 adding c
3 adding c
4 adding d
5 % should give a 404 - file does not exist
4 % should give a 404 - file does not exist
6 404 Not Found
5 404 Not Found
7
6
@@ -32,7 +31,6 b' 200 Script output follows'
32 /b/
31 /b/
33 /coll/a/
32 /coll/a/
34 /coll/b/
33 /coll/b/
35 /coll/b/d/
36 /coll/c/
34 /coll/c/
37 /t/a/
35 /t/a/
38
36
@@ -112,7 +110,6 b' 200 Script output follows'
112
110
113 /coll/a/
111 /coll/a/
114 /coll/b/
112 /coll/b/
115 /coll/b/d/
116 /coll/c/
113 /coll/c/
117
114
118 200 Script output follows
115 200 Script output follows
@@ -124,7 +121,6 b' 200 Script output follows'
124
121
125 /a/
122 /a/
126 /b/
123 /b/
127 /b/d/
128 /c/
124 /c/
129
125
130 200 Script output follows
126 200 Script output follows
@@ -136,21 +132,6 b' b'
136 200 Script output follows
132 200 Script output follows
137
133
138 c
134 c
139 200 Script output follows
140
141
142 # HG changeset patch
143 # User test
144 # Date 0 0
145 # Node ID 43cb50608b2ae8635a62e2e8730adefc32a274ee
146
147 d
148
149 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
150 +++ b/d Thu Jan 01 00:00:00 1970 +0000
151 @@ -0,0 +1,1 @@
152 +d
153
154 % paths errors 1
135 % paths errors 1
155 % paths errors 2
136 % paths errors 2
156 % collections errors
137 % collections errors
@@ -12,12 +12,6 b" hg.repository(u, 'top1', create=1)"
12 mkdir('subdir')
12 mkdir('subdir')
13 chdir('subdir')
13 chdir('subdir')
14 hg.repository(u, 'sub1', create=1)
14 hg.repository(u, 'sub1', create=1)
15 chdir('sub1')
16 hg.repository(u, 'inside_sub1', create=1)
17 chdir('.hg')
18 hg.repository(u, 'patches', create=1)
19 chdir(os.path.pardir)
20 chdir(os.path.pardir)
21 mkdir('subsubdir')
15 mkdir('subsubdir')
22 chdir('subsubdir')
16 chdir('subsubdir')
23 hg.repository(u, 'subsub1', create=1)
17 hg.repository(u, 'subsub1', create=1)
@@ -28,12 +22,12 b' if sym:'
28
22
29 def runtest():
23 def runtest():
30 reposet = frozenset(walkrepos('.', followsym=True))
24 reposet = frozenset(walkrepos('.', followsym=True))
31 if sym and (len(reposet) != 5):
25 if sym and (len(reposet) != 3):
32 print "reposet = %r" % (reposet,)
26 print "reposet = %r" % (reposet,)
33 raise SystemExit(1, "Found %d repositories when I should have found 5" % (len(reposet),))
27 raise SystemExit(1, "Found %d repositories when I should have found 3" % (len(reposet),))
34 if (not sym) and (len(reposet) != 4):
28 if (not sym) and (len(reposet) != 2):
35 print "reposet = %r" % (reposet,)
29 print "reposet = %r" % (reposet,)
36 raise SystemExit(1, "Found %d repositories when I should have found 4" % (len(reposet),))
30 raise SystemExit(1, "Found %d repositories when I should have found 2" % (len(reposet),))
37 sub1set = frozenset((pjoin('.', 'sub1'),
31 sub1set = frozenset((pjoin('.', 'sub1'),
38 pjoin('.', 'circle', 'subdir', 'sub1')))
32 pjoin('.', 'circle', 'subdir', 'sub1')))
39 if len(sub1set & reposet) != 1:
33 if len(sub1set & reposet) != 1:
General Comments 0
You need to be logged in to leave comments. Login now