From: Eric S. Raymond Date: Tue, 11 Nov 2014 21:00:27 +0000 (-0500) Subject: current_branch() selection works with log and list methods. X-Git-Tag: 0.5~16 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=f68fe83f139ff7be232e6aa3b1beb563233ee821;p=src.git current_branch() selection works with log and list methods. Regression test passes. --- diff --git a/src b/src index 03e7b50..6e7004d 100755 --- a/src +++ b/src @@ -532,7 +532,7 @@ def list_method(*args): sys.stdout.write("= %s %s\n" % (arg, ((width - len(arg) - 5) * "="))) metadata = History(arg) ctx.resolve(metadata) - for item in metadata: + for item in metadata.current_branch(reversed=True): if ctx.is_empty() or item.revno in ctx: # Must allow enough room for revno and date summary = item.log.strip()[:width - 34] @@ -551,7 +551,7 @@ def log_method(*args): sys.stdout.write("= %s %s\n" % (arg, ((width - len(arg) - 5) * "="))) metadata = History(arg) ctx.resolve(metadata) - for item in metadata: + for item in metadata.current_branch(reversed=True): if ctx.is_empty() or item.revno in ctx: sys.stdout.write("%-4d | %s\n%s" % (item.revno, item.date, item.log)) sys.stdout.write(("-" * (width - 1)) + "\n")