Gentoo Archives: gentoo-commits

From: Brian Dolbec <dolsen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/repoman/
Date: Thu, 24 Sep 2015 15:24:39
Message-Id: 1443108190.d37ad00e182a069b915f1666597a130956e139ad.dolsen@gentoo
1 commit: d37ad00e182a069b915f1666597a130956e139ad
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 24 15:14:53 2015 +0000
4 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 24 15:23:10 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=d37ad00e
7
8 repoman/actions.py: Adjust indent in thick_manifest()
9
10 pym/repoman/actions.py | 96 +++++++++++++++++++++++++-------------------------
11 1 file changed, 48 insertions(+), 48 deletions(-)
12
13 diff --git a/pym/repoman/actions.py b/pym/repoman/actions.py
14 index 9dda88e..5462248 100644
15 --- a/pym/repoman/actions.py
16 +++ b/pym/repoman/actions.py
17 @@ -726,55 +726,55 @@ class Actions(object):
18
19
20 def thick_manifest(self, myupdates, myheaders, no_expansion, expansion):
21 - if self.vcs_settings.vcs == 'cvs':
22 - headerstring = "'\$(Header|Id).*\$'"
23 + if self.vcs_settings.vcs == 'cvs':
24 + headerstring = "'\$(Header|Id).*\$'"
25 + elif self.vcs_settings.vcs == "svn":
26 + svn_keywords = dict((k.lower(), k) for k in [
27 + "Rev",
28 + "Revision",
29 + "LastChangedRevision",
30 + "Date",
31 + "LastChangedDate",
32 + "Author",
33 + "LastChangedBy",
34 + "URL",
35 + "HeadURL",
36 + "Id",
37 + "Header",
38 + ])
39 +
40 + for myfile in myupdates:
41 +
42 + # for CVS, no_expansion contains files that are excluded from expansion
43 + if self.vcs_settings.vcs == "cvs":
44 + if myfile in no_expansion:
45 + continue
46 +
47 + # for SVN, expansion contains files that are included in expansion
48 elif self.vcs_settings.vcs == "svn":
49 - svn_keywords = dict((k.lower(), k) for k in [
50 - "Rev",
51 - "Revision",
52 - "LastChangedRevision",
53 - "Date",
54 - "LastChangedDate",
55 - "Author",
56 - "LastChangedBy",
57 - "URL",
58 - "HeadURL",
59 - "Id",
60 - "Header",
61 - ])
62 -
63 - for myfile in myupdates:
64 -
65 - # for CVS, no_expansion contains files that are excluded from expansion
66 - if self.vcs_settings.vcs == "cvs":
67 - if myfile in no_expansion:
68 - continue
69 -
70 - # for SVN, expansion contains files that are included in expansion
71 - elif self.vcs_settings.vcs == "svn":
72 - if myfile not in expansion:
73 - continue
74 -
75 - # Subversion keywords are case-insensitive
76 - # in svn:keywords properties,
77 - # but case-sensitive in contents of files.
78 - enabled_keywords = []
79 - for k in expansion[myfile]:
80 - keyword = svn_keywords.get(k.lower())
81 - if keyword is not None:
82 - enabled_keywords.append(keyword)
83 -
84 - headerstring = "'\$(%s).*\$'" % "|".join(enabled_keywords)
85 -
86 - myout = repoman_getstatusoutput(
87 - "egrep -q %s %s" % (headerstring, portage._shell_quote(myfile)))
88 - if myout[0] == 0:
89 - myheaders.append(myfile)
90 -
91 - print("%s have headers that will change." % green(str(len(myheaders))))
92 - print(
93 - "* Files with headers will"
94 - " cause the manifests to be changed and committed separately.")
95 + if myfile not in expansion:
96 + continue
97 +
98 + # Subversion keywords are case-insensitive
99 + # in svn:keywords properties,
100 + # but case-sensitive in contents of files.
101 + enabled_keywords = []
102 + for k in expansion[myfile]:
103 + keyword = svn_keywords.get(k.lower())
104 + if keyword is not None:
105 + enabled_keywords.append(keyword)
106 +
107 + headerstring = "'\$(%s).*\$'" % "|".join(enabled_keywords)
108 +
109 + myout = repoman_getstatusoutput(
110 + "egrep -q %s %s" % (headerstring, portage._shell_quote(myfile)))
111 + if myout[0] == 0:
112 + myheaders.append(myfile)
113 +
114 + print("%s have headers that will change." % green(str(len(myheaders))))
115 + print(
116 + "* Files with headers will"
117 + " cause the manifests to be changed and committed separately.")
118
119
120 def clear_attic(self, myheaders):