##// END OF EJS Templates
cmdserver: take repo.baseui as our ui...
Idan Kamara -
r14882:bb2cffe8 stable
parent child Browse files
Show More
@@ -132,7 +132,6 b' class server(object):'
132 """
132 """
133 def __init__(self, ui, repo, mode):
133 def __init__(self, ui, repo, mode):
134 self.cwd = os.getcwd()
134 self.cwd = os.getcwd()
135 self.ui = ui
136
135
137 logpath = ui.config("cmdserver", "log", None)
136 logpath = ui.config("cmdserver", "log", None)
138 if logpath:
137 if logpath:
@@ -143,6 +142,9 b' class server(object):'
143 else:
142 else:
144 logfile = open(logpath, 'a')
143 logfile = open(logpath, 'a')
145
144
145 # the ui here is really the repo ui so take its baseui so we don't end up
146 # with its local configuration
147 self.ui = repo.baseui
146 self.repo = repo
148 self.repo = repo
147 self.repoui = repo.ui
149 self.repoui = repo.ui
148
150
@@ -1,4 +1,4 b''
1 import sys, os, struct, subprocess, cStringIO, re
1 import sys, os, struct, subprocess, cStringIO, re, shutil
2
2
3 def connect(path=None):
3 def connect(path=None):
4 cmdline = ['hg', 'serve', '--cmdserver', 'pipe']
4 cmdline = ['hg', 'serve', '--cmdserver', 'pipe']
@@ -131,6 +131,19 b' def cwd(server):'
131 runcommand(server, ['st', 'foo/bar'])
131 runcommand(server, ['st', 'foo/bar'])
132 os.remove('foo/bar')
132 os.remove('foo/bar')
133
133
134 def localhgrc(server):
135 """ check that local configs for the cached repo aren't inherited when -R
136 is used """
137 readchannel(server)
138
139 # the cached repo local hgrc contains ui.foo=bar, so showconfig should show it
140 runcommand(server, ['showconfig'])
141
142 # but not for this repo
143 runcommand(server, ['init', 'foo'])
144 runcommand(server, ['-R', 'foo', 'showconfig'])
145 shutil.rmtree('foo')
146
134 if __name__ == '__main__':
147 if __name__ == '__main__':
135 os.system('hg init')
148 os.system('hg init')
136
149
@@ -140,3 +153,8 b" if __name__ == '__main__':"
140 check(inputeof)
153 check(inputeof)
141 check(serverinput)
154 check(serverinput)
142 check(cwd)
155 check(cwd)
156
157 hgrc = open('.hg/hgrc', 'a')
158 hgrc.write('[ui]\nfoo=bar\n')
159 hgrc.close()
160 check(localhgrc)
@@ -38,3 +38,14 b' summary: 1'
38
38
39 ? bar
39 ? bar
40 ? foo/bar
40 ? foo/bar
41 bundle.mainreporoot=$TESTTMP
42 defaults.backout=-d "0 0"
43 defaults.commit=-d "0 0"
44 defaults.tag=-d "0 0"
45 ui.slash=True
46 ui.foo=bar
47 bundle.mainreporoot=$TESTTMP/foo
48 defaults.backout=-d "0 0"
49 defaults.commit=-d "0 0"
50 defaults.tag=-d "0 0"
51 ui.slash=True
General Comments 0
You need to be logged in to leave comments. Login now