1 |
commit: ef4fc7d5347e96e085c11d8843cceae1f433fe24 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 28 04:57:35 2012 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 28 04:57:35 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ef4fc7d5 |
7 |
|
8 |
cvstree.getentries: handle "ignored" files in cvs |
9 |
|
10 |
It's possible for files to be under version control even though they |
11 |
match our ignore filter, so don't ignore them if they are listed in the |
12 |
"Entries" file. Thanks to Mike Gilbert <floppym <AT> gentoo.org> for |
13 |
reporting in this blog post: |
14 |
|
15 |
http://floppym.blogspot.com/2012/02/cvs-status-display-cvs-checkout-in-svn.html |
16 |
|
17 |
--- |
18 |
pym/portage/cvstree.py | 10 ++++++++-- |
19 |
1 files changed, 8 insertions(+), 2 deletions(-) |
20 |
|
21 |
diff --git a/pym/portage/cvstree.py b/pym/portage/cvstree.py |
22 |
index 9ba22f3..3680ae4 100644 |
23 |
--- a/pym/portage/cvstree.py |
24 |
+++ b/pym/portage/cvstree.py |
25 |
@@ -248,11 +248,13 @@ def getentries(mydir,recursive=0): |
26 |
if entries["files"][mysplit[1]]["revision"][0]=="-": |
27 |
entries["files"][mysplit[1]]["status"]+=["removed"] |
28 |
|
29 |
- for file in apply_cvsignore_filter(os.listdir(mydir)): |
30 |
+ for file in os.listdir(mydir): |
31 |
if file=="CVS": |
32 |
continue |
33 |
if os.path.isdir(mydir+"/"+file): |
34 |
if file not in entries["dirs"]: |
35 |
+ if ignore_list.match(file) is not None: |
36 |
+ continue |
37 |
entries["dirs"][file]={"dirs":{},"files":{}} |
38 |
# It's normal for a directory to be unlisted in Entries |
39 |
# when checked out without -P (see bug #257660). |
40 |
@@ -266,6 +268,8 @@ def getentries(mydir,recursive=0): |
41 |
entries["dirs"][file]["status"]=["exists"] |
42 |
elif os.path.isfile(mydir+"/"+file): |
43 |
if file not in entries["files"]: |
44 |
+ if ignore_list.match(file) is not None: |
45 |
+ continue |
46 |
entries["files"][file]={"revision":"","date":"","flags":"","tags":""} |
47 |
if "status" in entries["files"][file]: |
48 |
if "exists" not in entries["files"][file]["status"]: |
49 |
@@ -285,7 +289,9 @@ def getentries(mydir,recursive=0): |
50 |
print("failed to stat",file) |
51 |
print(e) |
52 |
return |
53 |
- |
54 |
+ |
55 |
+ elif ignore_list.match(file) is not None: |
56 |
+ pass |
57 |
else: |
58 |
print() |
59 |
print("File of unknown type:",mydir+"/"+file) |