Gentoo Archives: gentoo-commits

From: Brian Dolbec <dolsen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:repoman commit in: pym/repoman/, pym/repoman/modules/vcs/git/, pym/repoman/modules/vcs/cvs/, ...
Date: Fri, 29 Jan 2016 05:01:22
Message-Id: 1454043181.73908358bc1c9a92310747f7e6321005496fee7a.dolsen@gentoo
1 commit: 73908358bc1c9a92310747f7e6321005496fee7a
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jan 29 04:43:36 2016 +0000
4 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 29 04:53:01 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=73908358
7
8 repoman: Initialize the Changes class with the VCS type
9
10 The vcs_settings were not needed, just the vcs type was used.
11 This internally stores it's own type for simplicity
12
13 pym/repoman/modules/vcs/None/Nonechanges.py | 6 +++---
14 pym/repoman/modules/vcs/bzr/bzrchanges.py | 4 ++--
15 pym/repoman/modules/vcs/changes.py | 7 ++++---
16 pym/repoman/modules/vcs/cvs/cvschanges.py | 4 ++--
17 pym/repoman/modules/vcs/git/gitchanges.py | 4 ++--
18 pym/repoman/modules/vcs/hg/hgchanges.py | 4 ++--
19 pym/repoman/modules/vcs/svn/svnchanges.py | 4 ++--
20 pym/repoman/scanner.py | 2 +-
21 8 files changed, 18 insertions(+), 17 deletions(-)
22
23 diff --git a/pym/repoman/modules/vcs/None/Nonechanges.py b/pym/repoman/modules/vcs/None/Nonechanges.py
24 index ee3c8f2..619eaa4 100644
25 --- a/pym/repoman/modules/vcs/None/Nonechanges.py
26 +++ b/pym/repoman/modules/vcs/None/Nonechanges.py
27 @@ -8,8 +8,8 @@ class Changes(ChangesBase):
28 for all changes to process.
29 '''
30
31 - def __init__(self, options):
32 - super(Changes, self).__init__(options)
33 + def __init__(self, options, vcs):
34 + super(Changes, self).__init__(options, vcs)
35
36 - def scan(self, vcs_settings):
37 + def scan(self):
38 pass
39
40 diff --git a/pym/repoman/modules/vcs/bzr/bzrchanges.py b/pym/repoman/modules/vcs/bzr/bzrchanges.py
41 index a482a7d..f37aec8 100644
42 --- a/pym/repoman/modules/vcs/bzr/bzrchanges.py
43 +++ b/pym/repoman/modules/vcs/bzr/bzrchanges.py
44 @@ -9,8 +9,8 @@ class Changes(ChangesBase):
45 for all changes to process.
46 '''
47
48 - def __init__(self, options):
49 - super(Changes, self).__init__(options)
50 + def __init__(self, options, vcs):
51 + super(Changes, self).__init__(options, vcs)
52
53 def _scan(self):
54 with repoman_popen("bzr status -S .") as f:
55
56 diff --git a/pym/repoman/modules/vcs/changes.py b/pym/repoman/modules/vcs/changes.py
57 index be6295e..788f157 100644
58 --- a/pym/repoman/modules/vcs/changes.py
59 +++ b/pym/repoman/modules/vcs/changes.py
60 @@ -8,8 +8,9 @@ class ChangesBase(object):
61 for all changes to process.
62 '''
63
64 - def __init__(self, options):
65 + def __init__(self, options, vcs):
66 self.options = options
67 + self.vcs = vcs
68 self._reset()
69
70 def _reset(self):
71 @@ -20,10 +21,10 @@ class ChangesBase(object):
72 self.new = []
73 self.removed = []
74
75 - def scan(self, vcs_settings):
76 + def scan(self):
77 self._reset()
78
79 - if vcs_settings.vcs:
80 + if self.vcs:
81 self._scan()
82 self.new_ebuilds.update(x for x in self.new if x.endswith(".ebuild"))
83 self.ebuilds.update(x for x in self.changed if x.endswith(".ebuild"))
84
85 diff --git a/pym/repoman/modules/vcs/cvs/cvschanges.py b/pym/repoman/modules/vcs/cvs/cvschanges.py
86 index eb8bb25..6e9dc83 100644
87 --- a/pym/repoman/modules/vcs/cvs/cvschanges.py
88 +++ b/pym/repoman/modules/vcs/cvs/cvschanges.py
89 @@ -8,8 +8,8 @@ class Changes(ChangesBase):
90 for all changes to process.
91 '''
92
93 - def __init__(self, options):
94 - super(Changes, self).__init__(options)
95 + def __init__(self, options, vcs):
96 + super(Changes, self).__init__(options, vcs)
97
98 def _scan(self):
99 tree = cvstree.getentries("./", recursive=1)
100
101 diff --git a/pym/repoman/modules/vcs/git/gitchanges.py b/pym/repoman/modules/vcs/git/gitchanges.py
102 index 1bb6357..b7ab31d 100644
103 --- a/pym/repoman/modules/vcs/git/gitchanges.py
104 +++ b/pym/repoman/modules/vcs/git/gitchanges.py
105 @@ -9,8 +9,8 @@ class Changes(ChangesBase):
106 for all changes to process.
107 '''
108
109 - def __init__(self, options):
110 - super(Changes, self).__init__(options)
111 + def __init__(self, options, vcs):
112 + super(Changes, self).__init__(options, vcs)
113
114 def _scan(self):
115 with repoman_popen(
116
117 diff --git a/pym/repoman/modules/vcs/hg/hgchanges.py b/pym/repoman/modules/vcs/hg/hgchanges.py
118 index 7d150d2..180301b 100644
119 --- a/pym/repoman/modules/vcs/hg/hgchanges.py
120 +++ b/pym/repoman/modules/vcs/hg/hgchanges.py
121 @@ -9,8 +9,8 @@ class Changes(ChangesBase):
122 for all changes to process.
123 '''
124
125 - def __init__(self, options):
126 - super(Changes, self).__init__(options)
127 + def __init__(self, options, vcs):
128 + super(Changes, self).__init__(options, vcs)
129
130 def _scan(self):
131 with repoman_popen("hg status --no-status --modified .") as f:
132
133 diff --git a/pym/repoman/modules/vcs/svn/svnchanges.py b/pym/repoman/modules/vcs/svn/svnchanges.py
134 index d5d69f8..c023c74 100644
135 --- a/pym/repoman/modules/vcs/svn/svnchanges.py
136 +++ b/pym/repoman/modules/vcs/svn/svnchanges.py
137 @@ -9,8 +9,8 @@ class Changes(ChangesBase):
138 for all changes to process.
139 '''
140
141 - def __init__(self, options):
142 - super(Changes, self).__init__(options)
143 + def __init__(self, options, vcs):
144 + super(Changes, self).__init__(options, vcs)
145
146 def _scan(self):
147 with repoman_popen("svn status") as f:
148
149 diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
150 index e286a81..a6689e1 100644
151 --- a/pym/repoman/scanner.py
152 +++ b/pym/repoman/scanner.py
153 @@ -145,7 +145,7 @@ class Scanner(object):
154 # bypass unneeded VCS operations if not needed
155 if (self.options.if_modified != "y" and
156 self.options.mode in ("manifest", "manifest-check")):
157 - self.changed.scan(self.vcs_settings)
158 + self.changed.scan()
159
160 self.have = {
161 'pmasked': False,