diff options
Diffstat (limited to 'foundry/vcs/hg/providers.py')
-rw-r--r-- | foundry/vcs/hg/providers.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/foundry/vcs/hg/providers.py b/foundry/vcs/hg/providers.py new file mode 100644 index 0000000..232464e --- /dev/null +++ b/foundry/vcs/hg/providers.py | |||
@@ -0,0 +1,24 @@ | |||
1 | # vim: set filencoding=utf8 | ||
2 | """ | ||
3 | SnakeGuice Providers | ||
4 | |||
5 | @author: Mike Crute (mcrute@gmail.com) | ||
6 | @organization: SoftGroup Interactive, Inc. | ||
7 | @date: May 02, 2010 | ||
8 | """ | ||
9 | |||
10 | from mercurial import hg | ||
11 | from mercurial.ui import ui | ||
12 | from foundry.utils import implements | ||
13 | from foundry.interfaces import RepositoryProvider | ||
14 | |||
15 | |||
16 | @implements(RepositoryProvider) | ||
17 | class RepoProvider(object): | ||
18 | |||
19 | def get(self, repo_path=''): | ||
20 | u = ui() | ||
21 | u.setconfig('ui', 'report_untrusted', 'off') | ||
22 | u.setconfig('ui', 'interactive', 'false') | ||
23 | |||
24 | return hg.repository(u, repo_path) | ||