comparison mercurial/commands.py @ 3575:0facae7566cc

log speedup: use list.extend to avoid an explicit loop
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sat, 28 Oct 2006 20:21:57 -0300
parents 8d87c8d45b3d
children 00427c4b533b
comparison
equal deleted inserted replaced
3574:8d87c8d45b3d 3575:0facae7566cc
1814 self.write(*args) 1814 self.write(*args)
1815 def status(self, *args): 1815 def status(self, *args):
1816 if not self.quiet: 1816 if not self.quiet:
1817 self.write(*args) 1817 self.write(*args)
1818 def write(self, *args): 1818 def write(self, *args):
1819 self.hunk[self.rev].append(args) 1819 self.hunk[self.rev].extend(args)
1820 def write_header(self, *args): 1820 def write_header(self, *args):
1821 self.header[self.rev].append(args) 1821 self.header[self.rev].extend(args)
1822 def debug(self, *args): 1822 def debug(self, *args):
1823 if self.debugflag: 1823 if self.debugflag:
1824 self.write(*args) 1824 self.write(*args)
1825 def __getattr__(self, key): 1825 def __getattr__(self, key):
1826 return getattr(self.ui, key) 1826 return getattr(self.ui, key)
1925 patch.diff(repo, prev, changenode, match=matchfn, fp=du) 1925 patch.diff(repo, prev, changenode, match=matchfn, fp=du)
1926 du.write("\n\n") 1926 du.write("\n\n")
1927 elif st == 'iter': 1927 elif st == 'iter':
1928 if count == limit: break 1928 if count == limit: break
1929 if du.header[rev]: 1929 if du.header[rev]:
1930 for args in du.header[rev]: 1930 ui.write_header(*du.header[rev])
1931 ui.write_header(*args)
1932 if du.hunk[rev]: 1931 if du.hunk[rev]:
1933 count += 1 1932 count += 1
1934 for args in du.hunk[rev]: 1933 ui.write(*du.hunk[rev])
1935 ui.write(*args)
1936 1934
1937 def manifest(ui, repo, rev=None): 1935 def manifest(ui, repo, rev=None):
1938 """output the latest or given revision of the project manifest 1936 """output the latest or given revision of the project manifest
1939 1937
1940 Print a list of version controlled files for the given revision. 1938 Print a list of version controlled files for the given revision.