Show More
@@ -27,6 +27,7 b' from hgext.strip import strip as hgext_s' | |||
|
27 | 27 | from mercurial import commands |
|
28 | 28 | from mercurial import unionrepo |
|
29 | 29 | from mercurial import verify |
|
30 | from mercurial import repair | |
|
30 | 31 | |
|
31 | 32 | import vcsserver |
|
32 | 33 | from vcsserver import exceptions |
@@ -151,6 +152,21 b' class MercurialFactory(RepoFactory):' | |||
|
151 | 152 | return self._create_repo(wire, create) |
|
152 | 153 | |
|
153 | 154 | |
|
155 | def patch_ui_message_output(baseui): | |
|
156 | baseui.setconfig('ui', 'quiet', 'false') | |
|
157 | output = io.BytesIO() | |
|
158 | ||
|
159 | def write(data, **unused_kwargs): | |
|
160 | output.write(data) | |
|
161 | ||
|
162 | baseui.status = write | |
|
163 | baseui.write = write | |
|
164 | baseui.warn = write | |
|
165 | baseui.debug = write | |
|
166 | ||
|
167 | return baseui, output | |
|
168 | ||
|
169 | ||
|
154 | 170 | class HgRemote(RemoteBase): |
|
155 | 171 | |
|
156 | 172 | def __init__(self, factory): |
@@ -706,12 +722,8 b' class HgRemote(RemoteBase):' | |||
|
706 | 722 | def verify(self, wire,): |
|
707 | 723 | repo = self._factory.repo(wire) |
|
708 | 724 | baseui = self._factory._create_config(wire['config']) |
|
709 | baseui.setconfig('ui', 'quiet', 'false') | |
|
710 | output = io.BytesIO() | |
|
711 | 725 | |
|
712 | def write(data, **unused_kwargs): | |
|
713 | output.write(data) | |
|
714 | baseui.write = write | |
|
726 | baseui, output = patch_ui_message_output(baseui) | |
|
715 | 727 | |
|
716 | 728 | repo.ui = baseui |
|
717 | 729 | verify.verify(repo) |
@@ -721,12 +733,7 b' class HgRemote(RemoteBase):' | |||
|
721 | 733 | def hg_update_cache(self, wire,): |
|
722 | 734 | repo = self._factory.repo(wire) |
|
723 | 735 | baseui = self._factory._create_config(wire['config']) |
|
724 | baseui.setconfig('ui', 'quiet', 'false') | |
|
725 | output = io.BytesIO() | |
|
726 | ||
|
727 | def write(data, **unused_kwargs): | |
|
728 | output.write(data) | |
|
729 | baseui.write = write | |
|
736 | baseui, output = patch_ui_message_output(baseui) | |
|
730 | 737 | |
|
731 | 738 | repo.ui = baseui |
|
732 | 739 | with repo.wlock(), repo.lock(): |
@@ -735,6 +742,18 b' class HgRemote(RemoteBase):' | |||
|
735 | 742 | return output.getvalue() |
|
736 | 743 | |
|
737 | 744 | @reraise_safe_exceptions |
|
745 | def hg_rebuild_fn_cache(self, wire,): | |
|
746 | repo = self._factory.repo(wire) | |
|
747 | baseui = self._factory._create_config(wire['config']) | |
|
748 | baseui, output = patch_ui_message_output(baseui) | |
|
749 | ||
|
750 | repo.ui = baseui | |
|
751 | ||
|
752 | repair.rebuildfncache(baseui, repo) | |
|
753 | ||
|
754 | return output.getvalue() | |
|
755 | ||
|
756 | @reraise_safe_exceptions | |
|
738 | 757 | def tags(self, wire): |
|
739 | 758 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
740 | 759 | @self.region.conditional_cache_on_arguments(condition=cache_on) |
General Comments 0
You need to be logged in to leave comments.
Login now