Show More
@@ -0,0 +1,84 b'' | |||||
|
1 | #!/bin/sh | |||
|
2 | ||||
|
3 | echo "[extensions]" >> $HGRCPATH | |||
|
4 | echo "mq=" >> $HGRCPATH | |||
|
5 | ||||
|
6 | echo % init | |||
|
7 | hg init a | |||
|
8 | cd a | |||
|
9 | ||||
|
10 | echo % commit | |||
|
11 | mkdir 1 2 | |||
|
12 | echo 'base' > 1/base | |||
|
13 | echo 'base' > 2/base | |||
|
14 | hg ci -Ambase -d '1 0' | |||
|
15 | ||||
|
16 | echo % qnew mqbase | |||
|
17 | hg qnew -mmqbase mqbase | |||
|
18 | ||||
|
19 | echo % qrefresh | |||
|
20 | echo 'patched' > 1/base | |||
|
21 | echo 'patched' > 2/base | |||
|
22 | hg qrefresh | |||
|
23 | ||||
|
24 | echo % qdiff | |||
|
25 | hg qdiff | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | |||
|
26 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" | |||
|
27 | ||||
|
28 | echo % qdiff dirname | |||
|
29 | hg qdiff . | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | |||
|
30 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" | |||
|
31 | ||||
|
32 | echo % patch file contents | |||
|
33 | cat .hg/patches/mqbase | \ | |||
|
34 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | |||
|
35 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" | |||
|
36 | ||||
|
37 | echo % qrefresh 1 | |||
|
38 | echo 'patched again' > base | |||
|
39 | hg qrefresh 1 | |||
|
40 | ||||
|
41 | echo % qdiff | |||
|
42 | hg qdiff | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | |||
|
43 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" | |||
|
44 | ||||
|
45 | echo % qdiff dirname | |||
|
46 | hg qdiff . | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | |||
|
47 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" | |||
|
48 | ||||
|
49 | echo % patch file contents | |||
|
50 | cat .hg/patches/mqbase | \ | |||
|
51 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | |||
|
52 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" | |||
|
53 | ||||
|
54 | echo % qrefresh . in subdir | |||
|
55 | ( cd 1 ; hg qrefresh . ) | |||
|
56 | ||||
|
57 | echo % qdiff | |||
|
58 | hg qdiff | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | |||
|
59 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" | |||
|
60 | ||||
|
61 | echo % qdiff dirname | |||
|
62 | hg qdiff . | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | |||
|
63 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" | |||
|
64 | ||||
|
65 | echo % patch file contents | |||
|
66 | cat .hg/patches/mqbase | \ | |||
|
67 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | |||
|
68 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" | |||
|
69 | ||||
|
70 | echo % qrefresh in hg-root again | |||
|
71 | hg qrefresh | |||
|
72 | ||||
|
73 | echo % qdiff | |||
|
74 | hg qdiff | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | |||
|
75 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" | |||
|
76 | ||||
|
77 | echo % qdiff dirname | |||
|
78 | hg qdiff . | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | |||
|
79 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" | |||
|
80 | ||||
|
81 | echo % patch file contents | |||
|
82 | cat .hg/patches/mqbase | \ | |||
|
83 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | |||
|
84 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" |
@@ -0,0 +1,161 b'' | |||||
|
1 | % init | |||
|
2 | % commit | |||
|
3 | adding 1/base | |||
|
4 | adding 2/base | |||
|
5 | % qnew mqbase | |||
|
6 | % qrefresh | |||
|
7 | % qdiff | |||
|
8 | diff -r b55ecdccb5cf 1/base | |||
|
9 | --- a/1/base | |||
|
10 | +++ b/1/base | |||
|
11 | @@ -1,1 +1,1 @@ base | |||
|
12 | -base | |||
|
13 | +patched | |||
|
14 | diff -r b55ecdccb5cf 2/base | |||
|
15 | --- a/2/base | |||
|
16 | +++ b/2/base | |||
|
17 | @@ -1,1 +1,1 @@ base | |||
|
18 | -base | |||
|
19 | +patched | |||
|
20 | % qdiff dirname | |||
|
21 | diff -r b55ecdccb5cf 1/base | |||
|
22 | --- a/1/base | |||
|
23 | +++ b/1/base | |||
|
24 | @@ -1,1 +1,1 @@ base | |||
|
25 | -base | |||
|
26 | +patched | |||
|
27 | diff -r b55ecdccb5cf 2/base | |||
|
28 | --- a/2/base | |||
|
29 | +++ b/2/base | |||
|
30 | @@ -1,1 +1,1 @@ base | |||
|
31 | -base | |||
|
32 | +patched | |||
|
33 | % patch file contents | |||
|
34 | mqbase | |||
|
35 | ||||
|
36 | diff -r b55ecdccb5cf 1/base | |||
|
37 | --- a/1/base | |||
|
38 | +++ b/1/base | |||
|
39 | @@ -1,1 +1,1 @@ base | |||
|
40 | -base | |||
|
41 | +patched | |||
|
42 | diff -r b55ecdccb5cf 2/base | |||
|
43 | --- a/2/base | |||
|
44 | +++ b/2/base | |||
|
45 | @@ -1,1 +1,1 @@ base | |||
|
46 | -base | |||
|
47 | +patched | |||
|
48 | % qrefresh 1 | |||
|
49 | % qdiff | |||
|
50 | diff -r b55ecdccb5cf 1/base | |||
|
51 | --- a/1/base | |||
|
52 | +++ b/1/base | |||
|
53 | @@ -1,1 +1,1 @@ base | |||
|
54 | -base | |||
|
55 | +patched | |||
|
56 | diff -r b55ecdccb5cf 2/base | |||
|
57 | --- a/2/base | |||
|
58 | +++ b/2/base | |||
|
59 | @@ -1,1 +1,1 @@ base | |||
|
60 | -base | |||
|
61 | +patched | |||
|
62 | % qdiff dirname | |||
|
63 | diff -r b55ecdccb5cf 1/base | |||
|
64 | --- a/1/base | |||
|
65 | +++ b/1/base | |||
|
66 | @@ -1,1 +1,1 @@ base | |||
|
67 | -base | |||
|
68 | +patched | |||
|
69 | diff -r b55ecdccb5cf 2/base | |||
|
70 | --- a/2/base | |||
|
71 | +++ b/2/base | |||
|
72 | @@ -1,1 +1,1 @@ base | |||
|
73 | -base | |||
|
74 | +patched | |||
|
75 | % patch file contents | |||
|
76 | mqbase | |||
|
77 | ||||
|
78 | diff -r b55ecdccb5cf 1/base | |||
|
79 | --- a/1/base | |||
|
80 | +++ b/1/base | |||
|
81 | @@ -1,1 +1,1 @@ base | |||
|
82 | -base | |||
|
83 | +patched | |||
|
84 | % qrefresh . in subdir | |||
|
85 | % qdiff | |||
|
86 | diff -r b55ecdccb5cf 1/base | |||
|
87 | --- a/1/base | |||
|
88 | +++ b/1/base | |||
|
89 | @@ -1,1 +1,1 @@ base | |||
|
90 | -base | |||
|
91 | +patched | |||
|
92 | diff -r b55ecdccb5cf 2/base | |||
|
93 | --- a/2/base | |||
|
94 | +++ b/2/base | |||
|
95 | @@ -1,1 +1,1 @@ base | |||
|
96 | -base | |||
|
97 | +patched | |||
|
98 | % qdiff dirname | |||
|
99 | diff -r b55ecdccb5cf 1/base | |||
|
100 | --- a/1/base | |||
|
101 | +++ b/1/base | |||
|
102 | @@ -1,1 +1,1 @@ base | |||
|
103 | -base | |||
|
104 | +patched | |||
|
105 | diff -r b55ecdccb5cf 2/base | |||
|
106 | --- a/2/base | |||
|
107 | +++ b/2/base | |||
|
108 | @@ -1,1 +1,1 @@ base | |||
|
109 | -base | |||
|
110 | +patched | |||
|
111 | % patch file contents | |||
|
112 | mqbase | |||
|
113 | ||||
|
114 | diff -r b55ecdccb5cf 1/base | |||
|
115 | --- a/1/base | |||
|
116 | +++ b/1/base | |||
|
117 | @@ -1,1 +1,1 @@ base | |||
|
118 | -base | |||
|
119 | +patched | |||
|
120 | % qrefresh in hg-root again | |||
|
121 | % qdiff | |||
|
122 | diff -r b55ecdccb5cf 1/base | |||
|
123 | --- a/1/base | |||
|
124 | +++ b/1/base | |||
|
125 | @@ -1,1 +1,1 @@ base | |||
|
126 | -base | |||
|
127 | +patched | |||
|
128 | diff -r b55ecdccb5cf 2/base | |||
|
129 | --- a/2/base | |||
|
130 | +++ b/2/base | |||
|
131 | @@ -1,1 +1,1 @@ base | |||
|
132 | -base | |||
|
133 | +patched | |||
|
134 | % qdiff dirname | |||
|
135 | diff -r b55ecdccb5cf 1/base | |||
|
136 | --- a/1/base | |||
|
137 | +++ b/1/base | |||
|
138 | @@ -1,1 +1,1 @@ base | |||
|
139 | -base | |||
|
140 | +patched | |||
|
141 | diff -r b55ecdccb5cf 2/base | |||
|
142 | --- a/2/base | |||
|
143 | +++ b/2/base | |||
|
144 | @@ -1,1 +1,1 @@ base | |||
|
145 | -base | |||
|
146 | +patched | |||
|
147 | % patch file contents | |||
|
148 | mqbase | |||
|
149 | ||||
|
150 | diff -r b55ecdccb5cf 1/base | |||
|
151 | --- a/1/base | |||
|
152 | +++ b/1/base | |||
|
153 | @@ -1,1 +1,1 @@ base | |||
|
154 | -base | |||
|
155 | +patched | |||
|
156 | diff -r b55ecdccb5cf 2/base | |||
|
157 | --- a/2/base | |||
|
158 | +++ b/2/base | |||
|
159 | @@ -1,1 +1,1 @@ base | |||
|
160 | -base | |||
|
161 | +patched |
General Comments 0
You need to be logged in to leave comments.
Login now