##// 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 1901 _add_dir_if_not_there(seen_dirs, path)
1902 1902 for root, dirs, files in os.walk(path, topdown=True, onerror=errhandler):
1903 1903 if '.hg' in dirs:
1904 dirs.remove('.hg') # don't recurse inside the .hg directory
1904 dirs[:] = [] # don't descend further
1905 1905 yield root # found a repository
1906 1906 qroot = os.path.join(root, '.hg', 'patches')
1907 1907 if os.path.isdir(os.path.join(qroot, '.hg')):
@@ -16,14 +16,8 b" hg --cwd b ci -Amb -d'2 0'"
16 16 hg init c
17 17 echo c > c/c
18 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 21 cd ..
28 22
29 23 cat > paths.conf <<EOF
@@ -85,7 +79,6 b' echo % should succeed'
85 79 "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/file/tip/a?style=raw'
86 80 "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/b/file/tip/b?style=raw'
87 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 83 echo % paths errors 1
91 84 cat error-paths-1.log
@@ -1,7 +1,6 b''
1 1 adding a
2 2 adding b
3 3 adding c
4 adding d
5 4 % should give a 404 - file does not exist
6 5 404 Not Found
7 6
@@ -32,7 +31,6 b' 200 Script output follows'
32 31 /b/
33 32 /coll/a/
34 33 /coll/b/
35 /coll/b/d/
36 34 /coll/c/
37 35 /t/a/
38 36
@@ -112,7 +110,6 b' 200 Script output follows'
112 110
113 111 /coll/a/
114 112 /coll/b/
115 /coll/b/d/
116 113 /coll/c/
117 114
118 115 200 Script output follows
@@ -124,7 +121,6 b' 200 Script output follows'
124 121
125 122 /a/
126 123 /b/
127 /b/d/
128 124 /c/
129 125
130 126 200 Script output follows
@@ -136,21 +132,6 b' b'
136 132 200 Script output follows
137 133
138 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 135 % paths errors 1
155 136 % paths errors 2
156 137 % collections errors
@@ -12,12 +12,6 b" hg.repository(u, 'top1', create=1)"
12 12 mkdir('subdir')
13 13 chdir('subdir')
14 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 15 mkdir('subsubdir')
22 16 chdir('subsubdir')
23 17 hg.repository(u, 'subsub1', create=1)
@@ -28,12 +22,12 b' if sym:'
28 22
29 23 def runtest():
30 24 reposet = frozenset(walkrepos('.', followsym=True))
31 if sym and (len(reposet) != 5):
25 if sym and (len(reposet) != 3):
32 26 print "reposet = %r" % (reposet,)
33 raise SystemExit(1, "Found %d repositories when I should have found 5" % (len(reposet),))
34 if (not sym) and (len(reposet) != 4):
27 raise SystemExit(1, "Found %d repositories when I should have found 3" % (len(reposet),))
28 if (not sym) and (len(reposet) != 2):
35 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 31 sub1set = frozenset((pjoin('.', 'sub1'),
38 32 pjoin('.', 'circle', 'subdir', 'sub1')))
39 33 if len(sub1set & reposet) != 1:
General Comments 0
You need to be logged in to leave comments. Login now