
Update of /cvsroot/python/python/dist/src/Lib In directory sc8-pr-cvs1:/tmp/cvs-serv16228 Modified Files: filecmp.py Log Message: SF bug #453515: filecmp.dircmp case sensitivity bug Index: filecmp.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/filecmp.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** filecmp.py 27 Feb 2003 00:05:31 -0000 1.16 --- filecmp.py 2 Sep 2003 05:42:00 -0000 1.17 *************** *** 13,17 **** import stat import warnings ! from itertools import ifilter, ifilterfalse __all__ = ["cmp","dircmp","cmpfiles"] --- 13,17 ---- import stat import warnings ! from itertools import ifilter, ifilterfalse, imap, izip __all__ = ["cmp","dircmp","cmpfiles"] *************** *** 136,144 **** def phase1(self): # Compute common names ! b = dict.fromkeys(self.right_list) ! common = dict.fromkeys(ifilter(b.has_key, self.left_list)) ! self.left_only = list(ifilterfalse(common.has_key, self.left_list)) ! self.right_only = list(ifilterfalse(common.has_key, self.right_list)) ! self.common = common.keys() def phase2(self): # Distinguish files, directories, funnies --- 136,144 ---- def phase1(self): # Compute common names ! a = dict(izip(imap(os.path.normcase, self.left_list), self.left_list)) ! b = dict(izip(imap(os.path.normcase, self.right_list), self.right_list)) ! self.common = map(a.__getitem__, ifilter(b.has_key, a)) ! self.left_only = map(a.__getitem__, ifilterfalse(b.has_key, a)) ! self.right_only = map(b.__getitem__, ifilterfalse(a.has_key, b)) def phase2(self): # Distinguish files, directories, funnies