Show More
@@ -1304,6 +1304,9 b' class localrepository(repo.repository):' | |||||
1304 | # tag cache retrieval" case to work. |
|
1304 | # tag cache retrieval" case to work. | |
1305 | self.invalidatecaches() |
|
1305 | self.invalidatecaches() | |
1306 |
|
1306 | |||
|
1307 | # Discard all cache entries to force reloading everything. | |||
|
1308 | self._filecache.clear() | |||
|
1309 | ||||
1307 | def walk(self, match, node=None): |
|
1310 | def walk(self, match, node=None): | |
1308 | ''' |
|
1311 | ''' | |
1309 | walk recursively through the directory tree or a given |
|
1312 | walk recursively through the directory tree or a given |
@@ -200,6 +200,16 b' def setphase(server):' | |||||
200 | os.system('hg phase -r . -p') |
|
200 | os.system('hg phase -r . -p') | |
201 | runcommand(server, ['phase', '-r', '.']) |
|
201 | runcommand(server, ['phase', '-r', '.']) | |
202 |
|
202 | |||
|
203 | def rollback(server): | |||
|
204 | readchannel(server) | |||
|
205 | runcommand(server, ['phase', '-r', '.', '-p']) | |||
|
206 | f = open('a', 'ab') | |||
|
207 | f.write('a\n') | |||
|
208 | f.close() | |||
|
209 | runcommand(server, ['commit', '-Am.']) | |||
|
210 | runcommand(server, ['rollback']) | |||
|
211 | runcommand(server, ['phase', '-r', '.']) | |||
|
212 | ||||
203 | if __name__ == '__main__': |
|
213 | if __name__ == '__main__': | |
204 | os.system('hg init') |
|
214 | os.system('hg init') | |
205 |
|
215 | |||
@@ -219,3 +229,4 b" if __name__ == '__main__':" | |||||
219 | check(bookmarks) |
|
229 | check(bookmarks) | |
220 | check(tagscache) |
|
230 | check(tagscache) | |
221 | check(setphase) |
|
231 | check(setphase) | |
|
232 | check(rollback) |
@@ -134,3 +134,14 b' testing setphase:' | |||||
134 | 3: draft |
|
134 | 3: draft | |
135 | runcommand phase -r . |
|
135 | runcommand phase -r . | |
136 | 3: public |
|
136 | 3: public | |
|
137 | no phases changed | |||
|
138 | ||||
|
139 | testing rollback: | |||
|
140 | ||||
|
141 | runcommand phase -r . -p | |||
|
142 | runcommand commit -Am. | |||
|
143 | runcommand rollback | |||
|
144 | repository tip rolled back to revision 3 (undo commit) | |||
|
145 | working directory now based on revision 3 | |||
|
146 | runcommand phase -r . | |||
|
147 | 3: public |
General Comments 0
You need to be logged in to leave comments.
Login now