##// END OF EJS Templates
cmdserver: repo.invalidate() on every runcommand...
Idan Kamara -
r14939:b4c06b97 default
parent child Browse files
Show More
@@ -185,6 +185,7 b' class server(object):'
185 copiedui = self.ui.copy()
185 copiedui = self.ui.copy()
186 self.repo.baseui = copiedui
186 self.repo.baseui = copiedui
187 self.repo.ui = self.repo.dirstate._ui = self.repoui.copy()
187 self.repo.ui = self.repo.dirstate._ui = self.repoui.copy()
188 self.repo.invalidate()
188
189
189 req = dispatch.request(args[:], copiedui, self.repo, self.cin,
190 req = dispatch.request(args[:], copiedui, self.repo, self.cin,
190 self.cout, self.cerr)
191 self.cout, self.cerr)
@@ -154,6 +154,30 b' def hookoutput(server):'
154 'hooks.pre-identify=python:test-commandserver.hook', 'id'],
154 'hooks.pre-identify=python:test-commandserver.hook', 'id'],
155 input=cStringIO.StringIO('some input'))
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 if __name__ == '__main__':
181 if __name__ == '__main__':
158 os.system('hg init')
182 os.system('hg init')
159
183
@@ -169,3 +193,6 b" if __name__ == '__main__':"
169 hgrc.close()
193 hgrc.close()
170 check(localhgrc)
194 check(localhgrc)
171 check(hookoutput)
195 check(hookoutput)
196 check(outsidechanges)
197 check(bookmarks)
198 check(tagscache)
@@ -52,3 +52,16 b' ui.slash=True'
52 hook talking
52 hook talking
53 now try to read something: 'some input'
53 now try to read something: 'some input'
54 eff892de26ec tip
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