Show More
@@ -132,7 +132,6 b' class server(object):' | |||
|
132 | 132 | """ |
|
133 | 133 | def __init__(self, ui, repo, mode): |
|
134 | 134 | self.cwd = os.getcwd() |
|
135 | self.ui = ui | |
|
136 | 135 | |
|
137 | 136 | logpath = ui.config("cmdserver", "log", None) |
|
138 | 137 | if logpath: |
@@ -143,6 +142,9 b' class server(object):' | |||
|
143 | 142 | else: |
|
144 | 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 | 148 | self.repo = repo |
|
147 | 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 | 3 | def connect(path=None): |
|
4 | 4 | cmdline = ['hg', 'serve', '--cmdserver', 'pipe'] |
@@ -131,6 +131,19 b' def cwd(server):' | |||
|
131 | 131 | runcommand(server, ['st', 'foo/bar']) |
|
132 | 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 | 147 | if __name__ == '__main__': |
|
135 | 148 | os.system('hg init') |
|
136 | 149 | |
@@ -140,3 +153,8 b" if __name__ == '__main__':" | |||
|
140 | 153 | check(inputeof) |
|
141 | 154 | check(serverinput) |
|
142 | 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 | 39 | ? bar |
|
40 | 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