comparison mercurial/localrepo.py @ 4189:8e947b0e53cc

localrepo.walk: if we're walking a specific revision, sort the files This is more consistent with our behaviour while walking the working directory.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sat, 10 Mar 2007 23:00:55 -0300
parents 7b5723c95a82
children e8ee8fdeddb1
comparison
equal deleted inserted replaced
4188:dd0d9bd91e0a 4189:8e947b0e53cc
830 'b' file was not found and matched badmatch 830 'b' file was not found and matched badmatch
831 ''' 831 '''
832 832
833 if node: 833 if node:
834 fdict = dict.fromkeys(files) 834 fdict = dict.fromkeys(files)
835 for fn in self.manifest.read(self.changelog.read(node)[0]): 835 mdict = self.manifest.read(self.changelog.read(node)[0])
836 mfiles = mdict.keys()
837 mfiles.sort()
838 for fn in mfiles:
836 for ffn in fdict: 839 for ffn in fdict:
837 # match if the file is the exact name or a directory 840 # match if the file is the exact name or a directory
838 if ffn == fn or fn.startswith("%s/" % ffn): 841 if ffn == fn or fn.startswith("%s/" % ffn):
839 del fdict[ffn] 842 del fdict[ffn]
840 break 843 break
841 if match(fn): 844 if match(fn):
842 yield 'm', fn 845 yield 'm', fn
843 for fn in fdict: 846 ffiles = fdict.keys()
847 ffiles.sort()
848 for fn in ffiles:
844 if badmatch and badmatch(fn): 849 if badmatch and badmatch(fn):
845 if match(fn): 850 if match(fn):
846 yield 'b', fn 851 yield 'b', fn
847 else: 852 else:
848 self.ui.warn(_('%s: No such file in rev %s\n') % ( 853 self.ui.warn(_('%s: No such file in rev %s\n') % (