]> thyrsus.com Git - src.git/commitdiff
current_branch() selection works with log and list methods.
authorEric S. Raymond <esr@thyrsus.com>
Tue, 11 Nov 2014 21:00:27 +0000 (16:00 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 11 Nov 2014 21:01:33 +0000 (16:01 -0500)
Regression test passes.

src

diff --git a/src b/src
index 03e7b5089e9d81d2779790e30e2181433af5f772..6e7004df8f72b67686b2544e2e065658ee1754dc 100755 (executable)
--- 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")