public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:repoman commit in: pym/repoman/, pym/repoman/modules/vcs/git/, pym/repoman/modules/vcs/cvs/, ...
@ 2016-01-29  5:01 Brian Dolbec
  0 siblings, 0 replies; only message in thread
From: Brian Dolbec @ 2016-01-29  5:01 UTC (permalink / raw
  To: gentoo-commits

commit:     73908358bc1c9a92310747f7e6321005496fee7a
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 29 04:43:36 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Fri Jan 29 04:53:01 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=73908358

repoman:  Initialize the Changes class with the VCS type

The vcs_settings were not needed, just the vcs type was used.
This internally stores it's own type for simplicity

 pym/repoman/modules/vcs/None/Nonechanges.py | 6 +++---
 pym/repoman/modules/vcs/bzr/bzrchanges.py   | 4 ++--
 pym/repoman/modules/vcs/changes.py          | 7 ++++---
 pym/repoman/modules/vcs/cvs/cvschanges.py   | 4 ++--
 pym/repoman/modules/vcs/git/gitchanges.py   | 4 ++--
 pym/repoman/modules/vcs/hg/hgchanges.py     | 4 ++--
 pym/repoman/modules/vcs/svn/svnchanges.py   | 4 ++--
 pym/repoman/scanner.py                      | 2 +-
 8 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/pym/repoman/modules/vcs/None/Nonechanges.py b/pym/repoman/modules/vcs/None/Nonechanges.py
index ee3c8f2..619eaa4 100644
--- a/pym/repoman/modules/vcs/None/Nonechanges.py
+++ b/pym/repoman/modules/vcs/None/Nonechanges.py
@@ -8,8 +8,8 @@ class Changes(ChangesBase):
 	for all changes to process.
 	'''
 
-	def __init__(self, options):
-		super(Changes, self).__init__(options)
+	def __init__(self, options, vcs):
+		super(Changes, self).__init__(options, vcs)
 
-	def scan(self, vcs_settings):
+	def scan(self):
 		pass

diff --git a/pym/repoman/modules/vcs/bzr/bzrchanges.py b/pym/repoman/modules/vcs/bzr/bzrchanges.py
index a482a7d..f37aec8 100644
--- a/pym/repoman/modules/vcs/bzr/bzrchanges.py
+++ b/pym/repoman/modules/vcs/bzr/bzrchanges.py
@@ -9,8 +9,8 @@ class Changes(ChangesBase):
 	for all changes to process.
 	'''
 
-	def __init__(self, options):
-		super(Changes, self).__init__(options)
+	def __init__(self, options, vcs):
+		super(Changes, self).__init__(options, vcs)
 
 	def _scan(self):
 		with repoman_popen("bzr status -S .") as f:

diff --git a/pym/repoman/modules/vcs/changes.py b/pym/repoman/modules/vcs/changes.py
index be6295e..788f157 100644
--- a/pym/repoman/modules/vcs/changes.py
+++ b/pym/repoman/modules/vcs/changes.py
@@ -8,8 +8,9 @@ class ChangesBase(object):
 	for all changes to process.
 	'''
 
-	def __init__(self, options):
+	def __init__(self, options, vcs):
 		self.options = options
+		self.vcs = vcs
 		self._reset()
 
 	def _reset(self):
@@ -20,10 +21,10 @@ class ChangesBase(object):
 		self.new = []
 		self.removed = []
 
-	def scan(self, vcs_settings):
+	def scan(self):
 		self._reset()
 
-		if vcs_settings.vcs:
+		if self.vcs:
 			self._scan()
 			self.new_ebuilds.update(x for x in self.new if x.endswith(".ebuild"))
 			self.ebuilds.update(x for x in self.changed if x.endswith(".ebuild"))

diff --git a/pym/repoman/modules/vcs/cvs/cvschanges.py b/pym/repoman/modules/vcs/cvs/cvschanges.py
index eb8bb25..6e9dc83 100644
--- a/pym/repoman/modules/vcs/cvs/cvschanges.py
+++ b/pym/repoman/modules/vcs/cvs/cvschanges.py
@@ -8,8 +8,8 @@ class Changes(ChangesBase):
 	for all changes to process.
 	'''
 
-	def __init__(self, options):
-		super(Changes, self).__init__(options)
+	def __init__(self, options, vcs):
+		super(Changes, self).__init__(options, vcs)
 
 	def _scan(self):
 		tree = cvstree.getentries("./", recursive=1)

diff --git a/pym/repoman/modules/vcs/git/gitchanges.py b/pym/repoman/modules/vcs/git/gitchanges.py
index 1bb6357..b7ab31d 100644
--- a/pym/repoman/modules/vcs/git/gitchanges.py
+++ b/pym/repoman/modules/vcs/git/gitchanges.py
@@ -9,8 +9,8 @@ class Changes(ChangesBase):
 	for all changes to process.
 	'''
 
-	def __init__(self, options):
-		super(Changes, self).__init__(options)
+	def __init__(self, options, vcs):
+		super(Changes, self).__init__(options, vcs)
 
 	def _scan(self):
 		with repoman_popen(

diff --git a/pym/repoman/modules/vcs/hg/hgchanges.py b/pym/repoman/modules/vcs/hg/hgchanges.py
index 7d150d2..180301b 100644
--- a/pym/repoman/modules/vcs/hg/hgchanges.py
+++ b/pym/repoman/modules/vcs/hg/hgchanges.py
@@ -9,8 +9,8 @@ class Changes(ChangesBase):
 	for all changes to process.
 	'''
 
-	def __init__(self, options):
-		super(Changes, self).__init__(options)
+	def __init__(self, options, vcs):
+		super(Changes, self).__init__(options, vcs)
 
 	def _scan(self):
 		with repoman_popen("hg status --no-status --modified .") as f:

diff --git a/pym/repoman/modules/vcs/svn/svnchanges.py b/pym/repoman/modules/vcs/svn/svnchanges.py
index d5d69f8..c023c74 100644
--- a/pym/repoman/modules/vcs/svn/svnchanges.py
+++ b/pym/repoman/modules/vcs/svn/svnchanges.py
@@ -9,8 +9,8 @@ class Changes(ChangesBase):
 	for all changes to process.
 	'''
 
-	def __init__(self, options):
-		super(Changes, self).__init__(options)
+	def __init__(self, options, vcs):
+		super(Changes, self).__init__(options, vcs)
 
 	def _scan(self):
 		with repoman_popen("svn status") as f:

diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
index e286a81..a6689e1 100644
--- a/pym/repoman/scanner.py
+++ b/pym/repoman/scanner.py
@@ -145,7 +145,7 @@ class Scanner(object):
 		# bypass unneeded VCS operations if not needed
 		if (self.options.if_modified != "y" and
 			self.options.mode in ("manifest", "manifest-check")):
-			self.changed.scan(self.vcs_settings)
+			self.changed.scan()
 
 		self.have = {
 			'pmasked': False,


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-01-29  5:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-29  5:01 [gentoo-commits] proj/portage:repoman commit in: pym/repoman/, pym/repoman/modules/vcs/git/, pym/repoman/modules/vcs/cvs/, Brian Dolbec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox