Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/ui.py @ 3644:b7547efe78fb
refactor header handling for changelog formatting
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 13 Nov 2006 13:26:57 -0600 |
parents | f7dee427cd14 |
children | 069f3acdad6c |
comparison
equal
deleted
inserted
replaced
3643:b4ad640a3bcf | 3644:b7547efe78fb |
---|---|
368 self.write(*self.header) | 368 self.write(*self.header) |
369 self.header = [] | 369 self.header = [] |
370 for a in args: | 370 for a in args: |
371 sys.stdout.write(str(a)) | 371 sys.stdout.write(str(a)) |
372 | 372 |
373 def write_header(self, *args): | |
374 for a in args: | |
375 self.header.append(str(a)) | |
376 | |
377 def write_err(self, *args): | 373 def write_err(self, *args): |
378 try: | 374 try: |
379 if not sys.stdout.closed: sys.stdout.flush() | 375 if not sys.stdout.closed: sys.stdout.flush() |
380 for a in args: | 376 for a in args: |
381 sys.stderr.write(str(a)) | 377 sys.stderr.write(str(a)) |