commit: fb501443770bd025994a5211bc782bc21979a22e Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> AuthorDate: Sun Feb 7 18:50:21 2016 +0000 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> CommitDate: Thu Apr 21 16:49:28 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=fb501443
repoman: Add repo_settings to VCSSettings class and the Changes classes Needed for more code migration from atcions.py to the vcs modules. pym/repoman/main.py | 4 ++++ pym/repoman/modules/vcs/None/changes.py | 4 ++-- pym/repoman/modules/vcs/bzr/changes.py | 4 ++-- pym/repoman/modules/vcs/changes.py | 4 +++- pym/repoman/modules/vcs/cvs/changes.py | 4 ++-- pym/repoman/modules/vcs/git/changes.py | 4 ++-- pym/repoman/modules/vcs/hg/changes.py | 4 ++-- pym/repoman/modules/vcs/svn/changes.py | 4 ++-- 8 files changed, 19 insertions(+), 13 deletions(-) diff --git a/pym/repoman/main.py b/pym/repoman/main.py index 6921005..337e638 100755 --- a/pym/repoman/main.py +++ b/pym/repoman/main.py @@ -84,6 +84,7 @@ def repoman_main(argv): myreporoot = os.path.basename(portdir_overlay) myreporoot += mydir[len(portdir_overlay):] + # avoid a circular parameter repo_settings vcs_settings = VCSSettings(options, repoman_settings) repo_settings = RepoSettings( @@ -91,6 +92,9 @@ def repoman_main(argv): repoman_settings, vcs_settings, options, qawarnings) repoman_settings = repo_settings.repoman_settings + # Now set repo_settings + vcs_settings.repo_settings = repo_settings + if 'digest' in repoman_settings.features and options.digest != 'n': options.digest = 'y' diff --git a/pym/repoman/modules/vcs/None/changes.py b/pym/repoman/modules/vcs/None/changes.py index 759b554..37693ad 100644 --- a/pym/repoman/modules/vcs/None/changes.py +++ b/pym/repoman/modules/vcs/None/changes.py @@ -12,12 +12,12 @@ class Changes(ChangesBase): vcs = 'None' - def __init__(self, options): + def __init__(self, options, repo_settings): '''Class init @param options: commandline options ''' - super(Changes, self).__init__(options) + super(Changes, self).__init__(options, repo_settings) def scan(self): '''VCS type scan function, looks for all detectable changes''' diff --git a/pym/repoman/modules/vcs/bzr/changes.py b/pym/repoman/modules/vcs/bzr/changes.py index 519d311..9bd0646 100644 --- a/pym/repoman/modules/vcs/bzr/changes.py +++ b/pym/repoman/modules/vcs/bzr/changes.py @@ -13,12 +13,12 @@ class Changes(ChangesBase): vcs = 'bzr' - def __init__(self, options): + def __init__(self, options, repo_settings): '''Class init @param options: commandline options ''' - super(Changes, self).__init__(options) + super(Changes, self).__init__(options, repo_settings) def _scan(self): '''VCS type scan function, looks for all detectable changes''' diff --git a/pym/repoman/modules/vcs/changes.py b/pym/repoman/modules/vcs/changes.py index 1745a65..921e9b5 100644 --- a/pym/repoman/modules/vcs/changes.py +++ b/pym/repoman/modules/vcs/changes.py @@ -13,8 +13,10 @@ class ChangesBase(object): vcs = 'None' - def __init__(self, options): + def __init__(self, options, repo_settings): self.options = options + self.repo_settings = repo_settings + self.repoman_settings = repo_settings.repoman_settings self._reset() def _reset(self): diff --git a/pym/repoman/modules/vcs/cvs/changes.py b/pym/repoman/modules/vcs/cvs/changes.py index 061486f..5fc9642 100644 --- a/pym/repoman/modules/vcs/cvs/changes.py +++ b/pym/repoman/modules/vcs/cvs/changes.py @@ -16,12 +16,12 @@ class Changes(ChangesBase): vcs = 'cvs' - def __init__(self, options): + def __init__(self, options, repo_settings): '''Class init @param options: commandline options ''' - super(Changes, self).__init__(options) + super(Changes, self).__init__(options, repo_settings) self._tree = None def _scan(self): diff --git a/pym/repoman/modules/vcs/git/changes.py b/pym/repoman/modules/vcs/git/changes.py index d0b6acd..f159298 100644 --- a/pym/repoman/modules/vcs/git/changes.py +++ b/pym/repoman/modules/vcs/git/changes.py @@ -13,12 +13,12 @@ class Changes(ChangesBase): vcs = 'git' - def __init__(self, options): + def __init__(self, options, repo_settings): '''Class init @param options: commandline options ''' - super(Changes, self).__init__(options) + super(Changes, self).__init__(options, repo_settings) def _scan(self): '''VCS type scan function, looks for all detectable changes''' diff --git a/pym/repoman/modules/vcs/hg/changes.py b/pym/repoman/modules/vcs/hg/changes.py index 9729085..311ca12 100644 --- a/pym/repoman/modules/vcs/hg/changes.py +++ b/pym/repoman/modules/vcs/hg/changes.py @@ -13,12 +13,12 @@ class Changes(ChangesBase): vcs = 'hg' - def __init__(self, options): + def __init__(self, options, repo_settings): '''Class init @param options: commandline options ''' - super(Changes, self).__init__(options) + super(Changes, self).__init__(options, repo_settings) def _scan(self): '''VCS type scan function, looks for all detectable changes''' diff --git a/pym/repoman/modules/vcs/svn/changes.py b/pym/repoman/modules/vcs/svn/changes.py index 6b25a21..ffe19c1 100644 --- a/pym/repoman/modules/vcs/svn/changes.py +++ b/pym/repoman/modules/vcs/svn/changes.py @@ -13,12 +13,12 @@ class Changes(ChangesBase): vcs = 'svn' - def __init__(self, options): + def __init__(self, options, repo_settings): '''Class init @param options: commandline options ''' - super(Changes, self).__init__(options) + super(Changes, self).__init__(options, repo_settings) def _scan(self): '''VCS type scan function, looks for all detectable changes'''