Mercurial > hg > mercurial-crew-with-dirclash
diff mercurial/ui.py @ 2033:e3280d350792
Group changes done by the same developer on the same with --style=changelog
Changeset and tags are appended to the change message for non-quiet and
non-verbose output, so grouping works.
Fixes last bit of issue110.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Sat, 01 Apr 2006 21:37:08 +0200 |
parents | 65634e1038dd |
children | 74d3f5336b66 |
line wrap: on
line diff
--- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -27,6 +27,8 @@ class ui(object): self.updateopts(verbose, debug, quiet, interactive) self.diffcache = None + self.header = [] + self.prev_header = [] else: # parentui may point to an ui object which is already a child self.parentui = parentui.parentui or parentui @@ -184,9 +186,18 @@ class ui(object): return self.config("paths", loc, loc) def write(self, *args): + if self.header: + if self.header != self.prev_header: + self.prev_header = self.header + self.write(*self.header) + self.header = [] for a in args: sys.stdout.write(str(a)) + def write_header(self, *args): + for a in args: + self.header.append(str(a)) + def write_err(self, *args): try: if not sys.stdout.closed: sys.stdout.flush()