Show More
@@ -97,3 +97,80 b' Test files properties' | |||
|
97 | 97 | hg: parse error: invalid match pattern: unbalanced parenthesis |
|
98 | 98 | [255] |
|
99 | 99 | |
|
100 | #if execbit | |
|
101 | $ chmod +x b2 | |
|
102 | $ fileset 'exec()' | |
|
103 | b2 | |
|
104 | #endif | |
|
105 | ||
|
106 | #if symlink | |
|
107 | $ ln -s b2 b2link | |
|
108 | $ fileset 'symlink() and unknown()' | |
|
109 | b2link | |
|
110 | $ hg add b2link | |
|
111 | #endif | |
|
112 | ||
|
113 | >>> file('1k', 'wb').write(' '*1024) | |
|
114 | >>> file('2k', 'wb').write(' '*2048) | |
|
115 | $ hg add 1k 2k | |
|
116 | $ fileset 'size("bar")' | |
|
117 | hg: parse error: couldn't parse size: bar | |
|
118 | [255] | |
|
119 | $ fileset 'size(1k)' | |
|
120 | 1k | |
|
121 | $ fileset '(1k or 2k) and size("< 2k")' | |
|
122 | 1k | |
|
123 | $ fileset '(1k or 2k) and size("<=2k")' | |
|
124 | 1k | |
|
125 | 2k | |
|
126 | $ fileset '(1k or 2k) and size("> 1k")' | |
|
127 | 2k | |
|
128 | $ fileset '(1k or 2k) and size(">=1K")' | |
|
129 | 1k | |
|
130 | 2k | |
|
131 | $ fileset '(1k or 2k) and size(".5KB - 1.5kB")' | |
|
132 | 1k | |
|
133 | ||
|
134 | Test merge states | |
|
135 | ||
|
136 | $ hg ci -m manychanges | |
|
137 | $ hg up -C 0 | |
|
138 | * files updated, 0 files merged, * files removed, 0 files unresolved (glob) | |
|
139 | $ echo c >> b2 | |
|
140 | $ hg ci -m diverging b2 | |
|
141 | created new head | |
|
142 | $ fileset 'resolved()' | |
|
143 | $ fileset 'unresolved()' | |
|
144 | $ hg merge | |
|
145 | merging b2 | |
|
146 | warning: conflicts during merge. | |
|
147 | merging b2 incomplete! (edit conflicts, then use 'hg resolve --mark') | |
|
148 | * files updated, 0 files merged, * files removed, 1 files unresolved (glob) | |
|
149 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |
|
150 | [1] | |
|
151 | $ fileset 'resolved()' | |
|
152 | $ fileset 'unresolved()' | |
|
153 | b2 | |
|
154 | $ echo e > b2 | |
|
155 | $ hg resolve -m b2 | |
|
156 | $ fileset 'resolved()' | |
|
157 | b2 | |
|
158 | $ fileset 'unresolved()' | |
|
159 | $ hg ci -m merge | |
|
160 | ||
|
161 | Test subrepo predicate | |
|
162 | ||
|
163 | $ hg init sub | |
|
164 | $ echo a > sub/suba | |
|
165 | $ hg -R sub add sub/suba | |
|
166 | $ hg -R sub ci -m sub | |
|
167 | $ echo 'sub = sub' > .hgsub | |
|
168 | $ fileset 'subrepo()' | |
|
169 | $ hg add .hgsub | |
|
170 | $ fileset 'subrepo()' | |
|
171 | sub | |
|
172 | $ fileset 'subrepo("sub")' | |
|
173 | sub | |
|
174 | $ fileset 'subrepo("glob:*")' | |
|
175 | sub | |
|
176 |
General Comments 0
You need to be logged in to leave comments.
Login now