Show More
@@ -185,6 +185,7 class server(object): | |||
|
185 | 185 | copiedui = self.ui.copy() |
|
186 | 186 | self.repo.baseui = copiedui |
|
187 | 187 | self.repo.ui = self.repo.dirstate._ui = self.repoui.copy() |
|
188 | self.repo.invalidate() | |
|
188 | 189 | |
|
189 | 190 | req = dispatch.request(args[:], copiedui, self.repo, self.cin, |
|
190 | 191 | self.cout, self.cerr) |
@@ -154,6 +154,30 def hookoutput(server): | |||
|
154 | 154 | 'hooks.pre-identify=python:test-commandserver.hook', 'id'], |
|
155 | 155 | input=cStringIO.StringIO('some input')) |
|
156 | 156 | |
|
157 | def outsidechanges(server): | |
|
158 | readchannel(server) | |
|
159 | os.system('echo a >> a && hg ci -Am2') | |
|
160 | runcommand(server, ['tip']) | |
|
161 | ||
|
162 | def bookmarks(server): | |
|
163 | readchannel(server) | |
|
164 | runcommand(server, ['bookmarks']) | |
|
165 | ||
|
166 | # changes .hg/bookmarks | |
|
167 | os.system('hg bookmark -i bm1') | |
|
168 | os.system('hg bookmark -i bm2') | |
|
169 | runcommand(server, ['bookmarks']) | |
|
170 | ||
|
171 | # changes .hg/bookmarks.current | |
|
172 | os.system('hg upd bm1 -q') | |
|
173 | runcommand(server, ['bookmarks']) | |
|
174 | ||
|
175 | def tagscache(server): | |
|
176 | readchannel(server) | |
|
177 | runcommand(server, ['id', '-t', '-r', '0']) | |
|
178 | os.system('hg tag -r 0 foo') | |
|
179 | runcommand(server, ['id', '-t', '-r', '0']) | |
|
180 | ||
|
157 | 181 | if __name__ == '__main__': |
|
158 | 182 | os.system('hg init') |
|
159 | 183 | |
@@ -169,3 +193,6 if __name__ == '__main__': | |||
|
169 | 193 | hgrc.close() |
|
170 | 194 | check(localhgrc) |
|
171 | 195 | check(hookoutput) |
|
196 | check(outsidechanges) | |
|
197 | check(bookmarks) | |
|
198 | check(tagscache) |
@@ -52,3 +52,16 ui.slash=True | |||
|
52 | 52 | hook talking |
|
53 | 53 | now try to read something: 'some input' |
|
54 | 54 | eff892de26ec tip |
|
55 | changeset: 1:d3a0a68be6de | |
|
56 | tag: tip | |
|
57 | user: test | |
|
58 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
59 | summary: 2 | |
|
60 | ||
|
61 | no bookmarks set | |
|
62 | bm1 1:d3a0a68be6de | |
|
63 | bm2 1:d3a0a68be6de | |
|
64 | * bm1 1:d3a0a68be6de | |
|
65 | bm2 1:d3a0a68be6de | |
|
66 | ||
|
67 | foo |
General Comments 0
You need to be logged in to leave comments.
Login now