From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 906351387B1 for ; Mon, 21 Sep 2015 23:48:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DDB0421C059; Mon, 21 Sep 2015 23:48:12 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3009921C059 for ; Mon, 21 Sep 2015 23:48:02 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5061E3409F9 for ; Mon, 21 Sep 2015 23:48:01 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CE4AB24F for ; Mon, 21 Sep 2015 23:47:56 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1442878967.3f47be32adcee89a34234d594b04e81089ea85ce.dolsen@gentoo> Subject: [gentoo-commits] proj/portage:repoman commit in: pym/repoman/ X-VCS-Repository: proj/portage X-VCS-Files: pym/repoman/actions.py X-VCS-Directories: pym/repoman/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 3f47be32adcee89a34234d594b04e81089ea85ce X-VCS-Branch: repoman Date: Mon, 21 Sep 2015 23:47:56 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 418e8c00-6f63-4fc0-914b-a75f84474457 X-Archives-Hash: 485f2cdab8175810112bd2a16dda70df commit: 3f47be32adcee89a34234d594b04e81089ea85ce Author: Brian Dolbec gentoo org> AuthorDate: Sat Sep 19 04:25:34 2015 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Mon Sep 21 23:42:47 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=3f47be32 repoman/actions.py: Split out thick_manifest() pym/repoman/actions.py | 101 +++++++++++++++++++++++++------------------------ 1 file changed, 52 insertions(+), 49 deletions(-) diff --git a/pym/repoman/actions.py b/pym/repoman/actions.py index af50c1b..974de62 100644 --- a/pym/repoman/actions.py +++ b/pym/repoman/actions.py @@ -146,55 +146,7 @@ class Actions(object): # committed in one big commit at the end. print() elif not self.repo_settings.repo_config.thin_manifest: - if self.vcs_settings.vcs == 'cvs': - headerstring = "'\$(Header|Id).*\$'" - elif self.vcs_settings.vcs == "svn": - svn_keywords = dict((k.lower(), k) for k in [ - "Rev", - "Revision", - "LastChangedRevision", - "Date", - "LastChangedDate", - "Author", - "LastChangedBy", - "URL", - "HeadURL", - "Id", - "Header", - ]) - - for myfile in myupdates: - - # for CVS, no_expansion contains files that are excluded from expansion - if self.vcs_settings.vcs == "cvs": - if myfile in no_expansion: - continue - - # for SVN, expansion contains files that are included in expansion - elif self.vcs_settings.vcs == "svn": - if myfile not in expansion: - continue - - # Subversion keywords are case-insensitive - # in svn:keywords properties, - # but case-sensitive in contents of files. - enabled_keywords = [] - for k in expansion[myfile]: - keyword = svn_keywords.get(k.lower()) - if keyword is not None: - enabled_keywords.append(keyword) - - headerstring = "'\$(%s).*\$'" % "|".join(enabled_keywords) - - myout = repoman_getstatusoutput( - "egrep -q %s %s" % (headerstring, portage._shell_quote(myfile))) - if myout[0] == 0: - myheaders.append(myfile) - - print("%s have headers that will change." % green(str(len(myheaders)))) - print( - "* Files with headers will" - " cause the manifests to be changed and committed separately.") + self.thick_manifest(myupdates, myheaders, no_expansion, expansion) logging.info("myupdates: %s", myupdates) logging.info("myheaders: %s", myheaders) @@ -814,3 +766,54 @@ class Actions(object): except OSError: pass + + def thick_manifest(self, myupdates, myheaders, no_expansion, expansion): + if self.vcs_settings.vcs == 'cvs': + headerstring = "'\$(Header|Id).*\$'" + elif self.vcs_settings.vcs == "svn": + svn_keywords = dict((k.lower(), k) for k in [ + "Rev", + "Revision", + "LastChangedRevision", + "Date", + "LastChangedDate", + "Author", + "LastChangedBy", + "URL", + "HeadURL", + "Id", + "Header", + ]) + + for myfile in myupdates: + + # for CVS, no_expansion contains files that are excluded from expansion + if self.vcs_settings.vcs == "cvs": + if myfile in no_expansion: + continue + + # for SVN, expansion contains files that are included in expansion + elif self.vcs_settings.vcs == "svn": + if myfile not in expansion: + continue + + # Subversion keywords are case-insensitive + # in svn:keywords properties, + # but case-sensitive in contents of files. + enabled_keywords = [] + for k in expansion[myfile]: + keyword = svn_keywords.get(k.lower()) + if keyword is not None: + enabled_keywords.append(keyword) + + headerstring = "'\$(%s).*\$'" % "|".join(enabled_keywords) + + myout = repoman_getstatusoutput( + "egrep -q %s %s" % (headerstring, portage._shell_quote(myfile))) + if myout[0] == 0: + myheaders.append(myfile) + + print("%s have headers that will change." % green(str(len(myheaders)))) + print( + "* Files with headers will" + " cause the manifests to be changed and committed separately.") From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id DDC941387B1 for ; Mon, 21 Sep 2015 23:51:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C28D121C050; Mon, 21 Sep 2015 23:51:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 091D721C050 for ; Mon, 21 Sep 2015 23:51:32 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 29C7F3409FC for ; Mon, 21 Sep 2015 23:51:26 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BDB8824F for ; Mon, 21 Sep 2015 23:51:19 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1442878967.3f47be32adcee89a34234d594b04e81089ea85ce.dolsen@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/repoman/ X-VCS-Repository: proj/portage X-VCS-Files: pym/repoman/actions.py X-VCS-Directories: pym/repoman/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 3f47be32adcee89a34234d594b04e81089ea85ce X-VCS-Branch: master Date: Mon, 21 Sep 2015 23:51:19 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 948c0025-2c8f-4be5-ab72-a7c80c8c3d84 X-Archives-Hash: 3c6145adeceee3ea87b1b8fd1a228a08 Message-ID: <20150921235119.VkMt7pnkrc_pi_GbRtUQEME1XTtoNPyUijR_s0_7vWw@z> commit: 3f47be32adcee89a34234d594b04e81089ea85ce Author: Brian Dolbec gentoo org> AuthorDate: Sat Sep 19 04:25:34 2015 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Mon Sep 21 23:42:47 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=3f47be32 repoman/actions.py: Split out thick_manifest() pym/repoman/actions.py | 101 +++++++++++++++++++++++++------------------------ 1 file changed, 52 insertions(+), 49 deletions(-) diff --git a/pym/repoman/actions.py b/pym/repoman/actions.py index af50c1b..974de62 100644 --- a/pym/repoman/actions.py +++ b/pym/repoman/actions.py @@ -146,55 +146,7 @@ class Actions(object): # committed in one big commit at the end. print() elif not self.repo_settings.repo_config.thin_manifest: - if self.vcs_settings.vcs == 'cvs': - headerstring = "'\$(Header|Id).*\$'" - elif self.vcs_settings.vcs == "svn": - svn_keywords = dict((k.lower(), k) for k in [ - "Rev", - "Revision", - "LastChangedRevision", - "Date", - "LastChangedDate", - "Author", - "LastChangedBy", - "URL", - "HeadURL", - "Id", - "Header", - ]) - - for myfile in myupdates: - - # for CVS, no_expansion contains files that are excluded from expansion - if self.vcs_settings.vcs == "cvs": - if myfile in no_expansion: - continue - - # for SVN, expansion contains files that are included in expansion - elif self.vcs_settings.vcs == "svn": - if myfile not in expansion: - continue - - # Subversion keywords are case-insensitive - # in svn:keywords properties, - # but case-sensitive in contents of files. - enabled_keywords = [] - for k in expansion[myfile]: - keyword = svn_keywords.get(k.lower()) - if keyword is not None: - enabled_keywords.append(keyword) - - headerstring = "'\$(%s).*\$'" % "|".join(enabled_keywords) - - myout = repoman_getstatusoutput( - "egrep -q %s %s" % (headerstring, portage._shell_quote(myfile))) - if myout[0] == 0: - myheaders.append(myfile) - - print("%s have headers that will change." % green(str(len(myheaders)))) - print( - "* Files with headers will" - " cause the manifests to be changed and committed separately.") + self.thick_manifest(myupdates, myheaders, no_expansion, expansion) logging.info("myupdates: %s", myupdates) logging.info("myheaders: %s", myheaders) @@ -814,3 +766,54 @@ class Actions(object): except OSError: pass + + def thick_manifest(self, myupdates, myheaders, no_expansion, expansion): + if self.vcs_settings.vcs == 'cvs': + headerstring = "'\$(Header|Id).*\$'" + elif self.vcs_settings.vcs == "svn": + svn_keywords = dict((k.lower(), k) for k in [ + "Rev", + "Revision", + "LastChangedRevision", + "Date", + "LastChangedDate", + "Author", + "LastChangedBy", + "URL", + "HeadURL", + "Id", + "Header", + ]) + + for myfile in myupdates: + + # for CVS, no_expansion contains files that are excluded from expansion + if self.vcs_settings.vcs == "cvs": + if myfile in no_expansion: + continue + + # for SVN, expansion contains files that are included in expansion + elif self.vcs_settings.vcs == "svn": + if myfile not in expansion: + continue + + # Subversion keywords are case-insensitive + # in svn:keywords properties, + # but case-sensitive in contents of files. + enabled_keywords = [] + for k in expansion[myfile]: + keyword = svn_keywords.get(k.lower()) + if keyword is not None: + enabled_keywords.append(keyword) + + headerstring = "'\$(%s).*\$'" % "|".join(enabled_keywords) + + myout = repoman_getstatusoutput( + "egrep -q %s %s" % (headerstring, portage._shell_quote(myfile))) + if myout[0] == 0: + myheaders.append(myfile) + + print("%s have headers that will change." % green(str(len(myheaders)))) + print( + "* Files with headers will" + " cause the manifests to be changed and committed separately.")