diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-08-27 17:54:13 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-08-27 17:54:13 +0000 |
commit | d59466926e57f1226fe654deb109812a1cd19389 (patch) | |
tree | 8544fbb2fe2c1cd8b32bfd073a13b84a5260a8d4 /pym | |
parent | 1c555bc3a42dbec89111710ebd42a617789fd602 (diff) | |
download | portage-d59466926e57f1226fe654deb109812a1cd19389.tar.gz portage-d59466926e57f1226fe654deb109812a1cd19389.tar.bz2 portage-d59466926e57f1226fe654deb109812a1cd19389.zip |
Bug #190406 - Filter the myheaders list so that it doesn't include binary blobs added to cvs with the -kb option.
svn path=/main/trunk/; revision=7705
Diffstat (limited to 'pym')
-rw-r--r-- | pym/portage/cvstree.py | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/pym/portage/cvstree.py b/pym/portage/cvstree.py index ca94d3512..f74ecd4ac 100644 --- a/pym/portage/cvstree.py +++ b/pym/portage/cvstree.py @@ -72,7 +72,24 @@ def findnew(entries,recursive=0,basedir=""): for mydir in entries["dirs"]: mylist+=findnew(entries["dirs"][mydir],recursive,basedir+mydir) return mylist - + +def findoption(entries, pattern, recursive=0, basedir=""): + """(entries, pattern, recursive=0, basedir="") + Iterate over paths of cvs entries for which the pattern.search() method + finds a match. Returns a list of paths, optionally prepended with a + basedir.""" + if not basedir.endswith("/"): + basedir += "/" + for myfile, mydata in entries["files"].iteritems(): + if "cvs" in mydata["status"]: + if pattern.search(mydata["flags"]): + yield basedir+myfile + if recursive: + for mydir, mydata in entries["dirs"].iteritems(): + for x in findoption(mydata, pattern, + recursive, basedir+mydir): + yield x + def findchanged(entries,recursive=0,basedir=""): """(entries,recursive=0,basedir="") Recurses the entries tree to find all elements that exist in the cvs tree |