Gentoo Archives: gentoo-commits

From: Brian Dolbec <brian.dolbec@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/modules/git/
Date: Fri, 02 May 2014 23:13:37
Message-Id: 1398843526.9f1e5834998fef10b7dd20cfa30f4418ca8c41a7.dol-sen@gentoo
1 commit: 9f1e5834998fef10b7dd20cfa30f4418ca8c41a7
2 Author: Chris Reffett <2011creffett <AT> tjhsst <DOT> edu>
3 AuthorDate: Sat Feb 8 15:22:58 2014 +0000
4 Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
5 CommitDate: Wed Apr 30 07:38:46 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9f1e5834
7
8 Fix mixed spaces/tabs, update _sync to not take kwargs since it's
9 an internal function
10
11 ---
12 pym/portage/sync/modules/git/git.py | 11 ++++++-----
13 1 file changed, 6 insertions(+), 5 deletions(-)
14
15 diff --git a/pym/portage/sync/modules/git/git.py b/pym/portage/sync/modules/git/git.py
16 index baf43fe..741daf3 100644
17 --- a/pym/portage/sync/modules/git/git.py
18 +++ b/pym/portage/sync/modules/git/git.py
19 @@ -45,6 +45,7 @@ class GitSync(object):
20
21
22 def _kwargs(self, kwargs):
23 + '''Sets internal variables from kwargs'''
24 self.options = kwargs.get('options', {})
25 self.settings = self.options.get('settings', None)
26 self.logger = self.options.get('logger', None)
27 @@ -53,7 +54,7 @@ class GitSync(object):
28
29
30 def exists(self, **kwargs):
31 - '''Tests whether the repo actually exists'''
32 + '''Tests whether the repo actually exists'''
33 if kwargs:
34 self._kwargs(kwargs)
35 elif not self.repo:
36 @@ -87,7 +88,7 @@ class GitSync(object):
37 '''Do the initial clone of the repository'''
38 if kwargs:
39 self._kwargs(kwargs)
40 - emerge_config = self.options.get('emerge_config', None)
41 + emerge_config = self.options.get('emerge_config', None)
42 spawn_kwargs = self.options.get('spawn_kwargs', None)
43 portdb = self.options.get('portdb', None)
44 try:
45 @@ -115,14 +116,14 @@ class GitSync(object):
46 return self.post_sync(portdb, self.repo.location, emerge_config)
47
48
49 - def _sync(self, **kwargs):
50 + def _sync(self):
51 ''' Update existing git repository, and ignore the syncuri. We are
52 going to trust the user and assume that the user is in the branch
53 that he/she wants updated. We'll let the user manage branches with
54 git directly.
55 '''
56 - if kwargs:
57 - self._kwargs(kwargs)
58 + # No kwargs call here; this is internal, so it should have been
59 + # called by something which set the internal variables
60 emerge_config = self.options.get('emerge_config', None)
61 spawn_kwargs = self.options.get('spawn_kwargs', None)
62 portdb = self.options.get('portdb', None)