We should have a `git-webkit log` and `git-webkit blame` command that use identifiers in those commands and their output.
<rdar://problem/80691164>
Created attachment 433700 [details] Patch
Created attachment 434313 [details] Patch
Comment on attachment 434313 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=434313&action=review > Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/log.py:70 > + def main(cls, args, repository, **kwargs): > + if not repository.root_path: > + sys.stderr.write("Cannot run 'log' on remote repository\n") > + return 1 > + > + # If we're a terminal, rely on 'more' to display output > + if sys.stdin.isatty() and not isinstance(args, list): > + environ = os.environ > + environ['PYTHONPATH'] = ':'.join(sys.path) > + > + child = subprocess.Popen( > + [sys.executable, __file__, repository.root_path, args.representation] + args.args, > + env=environ, > + stdout=subprocess.PIPE, > + stderr=subprocess.PIPE, > + ) > + more = subprocess.Popen([which('more'), '-F'], stdin=child.stdout) > + > + try: > + while more.poll() is None and not child.poll(): > + time.sleep(0.25) > + finally: > + child.kill() > + more.kill() > + child_error = child.stderr.read() > + if child_error: > + sys.stderr.buffer.write(b'\n' + child_error) > + > + return child.returncode > + > + return FilteredCommand.main(args, repository, command='log', **kwargs) This is almost identical to Blame. The only differences are line 42 and Line 70, which can be changed to ``` sys.stderr.write("Cannot run '{}' on remote repository\n".format(cls.name)) return FilteredCommand.main(args, repository, command=cls.name, **kwargs) ```
Created attachment 434522 [details] Patch
Comment on attachment 434522 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=434522&action=review r=me > Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/blame.py:37 > + return Blame.pager(args, repository, file=__file__, **kwargs) Is It intentional to use 'Blame.pager' rather than 'cls.pager' ? > Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/log.py:37 > + return Log.pager(args, repository, file=__file__, **kwargs) Ditto.
Created attachment 434536 [details] Patch
Committed r280436 (240074@main): <https://commits.webkit.org/240074@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 434536 [details].