(args, repo)
| 33 | |
| 34 | |
| 35 | def main(args, repo): |
| 36 | b = helpers.get_branch(args.b, repo) if args.b else repo.current_branch |
| 37 | with tempfile.NamedTemporaryFile(mode='w', delete=False) as tf: |
| 38 | count = 0 |
| 39 | for ci in b.history(): |
| 40 | if args.limit and count == args.limit: |
| 41 | break |
| 42 | pprint.commit(ci, compact=args.compact, stream=tf.write) |
| 43 | if not args.compact: |
| 44 | pprint.puts(stream=tf.write) |
| 45 | if args.verbose and len(ci.parents) == 1: |
| 46 | for patch in b.diff_commits(ci.parents[0], ci): |
| 47 | pprint.diff(patch, stream=tf.write) |
| 48 | |
| 49 | count += 1 |
| 50 | helpers.page(tf.name, repo) |
| 51 | os.remove(tf.name) |
| 52 | return True |
nothing calls this directly
no test coverage detected