You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2012/10/02 23:30:29 UTC

[33/34] git commit: [#2809] Suppress warnings about untrusted hgrc

[#2809] Suppress warnings about untrusted hgrc

Signed-off-by: Cory Johns <jo...@geek.net>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/bba9bcb5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/bba9bcb5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/bba9bcb5

Branch: refs/heads/db/4968
Commit: bba9bcb5be5607a0be93ef6056f944c20433609d
Parents: e39d6fa
Author: Cory Johns <jo...@geek.net>
Authored: Thu Sep 27 15:56:51 2012 +0000
Committer: Cory Johns <jo...@geek.net>
Committed: Thu Sep 27 16:01:53 2012 +0000

----------------------------------------------------------------------
 ForgeHg/forgehg/model/hg.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/bba9bcb5/ForgeHg/forgehg/model/hg.py
----------------------------------------------------------------------
diff --git a/ForgeHg/forgehg/model/hg.py b/ForgeHg/forgehg/model/hg.py
index 0b1c5b6..a36b262 100644
--- a/ForgeHg/forgehg/model/hg.py
+++ b/ForgeHg/forgehg/model/hg.py
@@ -47,6 +47,12 @@ class Repository(M.Repository):
     def log(self, branch='default', offset=0, limit=10):
         return super(Repository, self).log(branch, offset, limit)
 
+class HgUI(ui.ui):
+    '''Hg UI subclass that suppresses reporting of untrusted hgrc files.'''
+    def __init__(self, *args, **kwargs):
+        super(HgUI, self).__init__(*args, **kwargs)
+        self._reportuntrusted = False
+
 class HgImplementation(M.RepositoryImplementation):
     re_hg_user = re.compile('(.*) <(.*)>')
     skip_internal_files = set([
@@ -78,7 +84,7 @@ class HgImplementation(M.RepositoryImplementation):
 
     @LazyProperty
     def _hg(self):
-        return hg.repository(ui.ui(), self._repo.full_fs_path)
+        return hg.repository(HgUI(), self._repo.full_fs_path)
 
     def init(self):
         fullname = self._setup_paths()