From db45da12089bf131579d100ff7990cbc18d07325 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Sat, 18 Apr 2009 13:49:13 -0700 Subject: Add -p to `repo forall` to improve output formatting When trying to read log output from many projects at once it can be difficult to make sense of which messages came from where. For many professional developers it is common to want to view the last week's worth of your work, so you can write a weekly summary of your activity for your status report. This is easier with the new -p option: repo forall -pc git log --reverse --since=1.week.ago --author=sop produces a report of all commits written by me in the last week, formatted in a paged output display, with headers inserted in front of each project's output. Where this can be even more useful is with git log's pickaxe, e.g. now we can use: repo forall -pc git log -Sbar v1.0..v1.1 to locate all additions or removals of the symbol 'bar' since v1.0, up to and including v1.1. Before displaying the matching commits in a project, a project header is shown, giving the user some context information for the matching results. Signed-off-by: Shawn O. Pearce --- color.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'color.py') diff --git a/color.py b/color.py index 7fa21d23..5c612acc 100644 --- a/color.py +++ b/color.py @@ -110,6 +110,9 @@ class Coloring(object): def write(self, fmt, *args): self._out.write(fmt % args) + def flush(self): + self._out.flush() + def nl(self): self._out.write('\n') -- cgit v1.2.3-54-g00ecf