Show More
@@ -1902,13 +1902,12 b' def walkrepos(path, followsym=False, see' | |||||
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 | yield root # found a repository |
|
1904 | yield root # found a repository | |
|
1905 | qroot = os.path.join(root, '.hg', 'patches') | |||
|
1906 | if os.path.isdir(os.path.join(qroot, '.hg')): | |||
|
1907 | yield qroot # we have a patch queue repo here | |||
1905 | if recurse: |
|
1908 | if recurse: | |
1906 | # avoid recursing inside the .hg directory |
|
1909 | # avoid recursing inside the .hg directory | |
1907 | # the mq repository is added in any case |
|
|||
1908 | dirs.remove('.hg') |
|
1910 | dirs.remove('.hg') | |
1909 | qroot = os.path.join(root, '.hg', 'patches') |
|
|||
1910 | if os.path.isdir(os.path.join(qroot, '.hg')): |
|
|||
1911 | yield qroot # we have a patch queue repo here |
|
|||
1912 | else: |
|
1911 | else: | |
1913 | dirs[:] = [] # don't descend further |
|
1912 | dirs[:] = [] # don't descend further | |
1914 | elif followsym: |
|
1913 | elif followsym: |
@@ -31,6 +31,7 b' 200 Script output follows' | |||||
31 |
|
31 | |||
32 | /b/ |
|
32 | /b/ | |
33 | /coll/a/ |
|
33 | /coll/a/ | |
|
34 | /coll/a/.hg/patches/ | |||
34 | /coll/b/ |
|
35 | /coll/b/ | |
35 | /coll/c/ |
|
36 | /coll/c/ | |
36 | /rcoll/a/ |
|
37 | /rcoll/a/ | |
@@ -115,6 +116,7 b' 200 Script output follows' | |||||
115 |
|
116 | |||
116 |
|
117 | |||
117 | /coll/a/ |
|
118 | /coll/a/ | |
|
119 | /coll/a/.hg/patches/ | |||
118 | /coll/b/ |
|
120 | /coll/b/ | |
119 | /coll/c/ |
|
121 | /coll/c/ | |
120 |
|
122 | |||
@@ -138,6 +140,7 b' 200 Script output follows' | |||||
138 |
|
140 | |||
139 |
|
141 | |||
140 | /a/ |
|
142 | /a/ | |
|
143 | /a/.hg/patches/ | |||
141 | /b/ |
|
144 | /b/ | |
142 | /c/ |
|
145 | /c/ | |
143 |
|
146 |
@@ -22,6 +22,8 b' root=`pwd`' | |||||
22 |
|
22 | |||
23 | cd .. |
|
23 | cd .. | |
24 |
|
24 | |||
|
25 | echo % test with recursive collection | |||
|
26 | ||||
25 | cat > collections.conf <<EOF |
|
27 | cat > collections.conf <<EOF | |
26 | [paths] |
|
28 | [paths] | |
27 | /=$root/** |
|
29 | /=$root/** | |
@@ -38,6 +40,8 b' hg --cwd b log --template "{desc}\\n"' | |||||
38 | hg --cwd b qpush -a |
|
40 | hg --cwd b qpush -a | |
39 | hg --cwd b log --template "{desc}\n" |
|
41 | hg --cwd b log --template "{desc}\n" | |
40 |
|
42 | |||
|
43 | echo % test with normal collection | |||
|
44 | ||||
41 | cat > collections1.conf <<EOF |
|
45 | cat > collections1.conf <<EOF | |
42 | [paths] |
|
46 | [paths] | |
43 | /=$root/* |
|
47 | /=$root/* | |
@@ -53,3 +57,21 b' hg qclone http://localhost:$HGPORT1/a c' | |||||
53 | hg --cwd c log --template "{desc}\n" |
|
57 | hg --cwd c log --template "{desc}\n" | |
54 | hg --cwd c qpush -a |
|
58 | hg --cwd c qpush -a | |
55 | hg --cwd c log --template "{desc}\n" |
|
59 | hg --cwd c log --template "{desc}\n" | |
|
60 | ||||
|
61 | echo % test with old-style collection | |||
|
62 | ||||
|
63 | cat > collections2.conf <<EOF | |||
|
64 | [collections] | |||
|
65 | $root=$root | |||
|
66 | EOF | |||
|
67 | ||||
|
68 | hg serve -p $HGPORT2 -d --pid-file=hg.pid --webdir-conf collections2.conf \ | |||
|
69 | -A access-paths.log -E error-paths-1.log | |||
|
70 | cat hg.pid >> $DAEMON_PIDS | |||
|
71 | ||||
|
72 | "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/?style=raw' | |||
|
73 | ||||
|
74 | hg qclone http://localhost:$HGPORT2/a d | |||
|
75 | hg --cwd d log --template "{desc}\n" | |||
|
76 | hg --cwd d qpush -a | |||
|
77 | hg --cwd d log --template "{desc}\n" |
@@ -3,6 +3,7 b' adding b' | |||||
3 | [mq]: b.patch |
|
3 | [mq]: b.patch | |
4 | a |
|
4 | a | |
5 | b.patch |
|
5 | b.patch | |
|
6 | % test with recursive collection | |||
6 | 200 Script output follows |
|
7 | 200 Script output follows | |
7 |
|
8 | |||
8 |
|
9 | |||
@@ -27,10 +28,12 b' applying b.patch' | |||||
27 | Now at: b.patch |
|
28 | Now at: b.patch | |
28 | imported patch b.patch |
|
29 | imported patch b.patch | |
29 | a |
|
30 | a | |
|
31 | % test with normal collection | |||
30 | 200 Script output follows |
|
32 | 200 Script output follows | |
31 |
|
33 | |||
32 |
|
34 | |||
33 | /a/ |
|
35 | /a/ | |
|
36 | /a/.hg/patches/ | |||
34 |
|
37 | |||
35 | requesting all changes |
|
38 | requesting all changes | |
36 | adding changesets |
|
39 | adding changesets | |
@@ -41,10 +44,37 b' requesting all changes' | |||||
41 | adding changesets |
|
44 | adding changesets | |
42 | adding manifests |
|
45 | adding manifests | |
43 | adding file changes |
|
46 | adding file changes | |
44 |
added |
|
47 | added 1 changesets with 3 changes to 3 files | |
45 | updating working directory |
|
48 | updating working directory | |
46 |
|
|
49 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
47 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
50 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
48 | a |
|
51 | a | |
49 | no patches in series |
|
52 | applying b.patch | |
|
53 | Now at: b.patch | |||
|
54 | imported patch b.patch | |||
50 | a |
|
55 | a | |
|
56 | % test with old-style collection | |||
|
57 | 200 Script output follows | |||
|
58 | ||||
|
59 | ||||
|
60 | /a/ | |||
|
61 | /a/.hg/patches/ | |||
|
62 | ||||
|
63 | requesting all changes | |||
|
64 | adding changesets | |||
|
65 | adding manifests | |||
|
66 | adding file changes | |||
|
67 | added 2 changesets with 2 changes to 2 files | |||
|
68 | requesting all changes | |||
|
69 | adding changesets | |||
|
70 | adding manifests | |||
|
71 | adding file changes | |||
|
72 | added 1 changesets with 3 changes to 3 files | |||
|
73 | updating working directory | |||
|
74 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
75 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
76 | a | |||
|
77 | applying b.patch | |||
|
78 | Now at: b.patch | |||
|
79 | imported patch b.patch | |||
|
80 | a |
General Comments 0
You need to be logged in to leave comments.
Login now