Summary: | [git-webkit] Add identifiers to 'log' and 'blame' | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jonathan Bedard <jbedard> | ||||||||||
Component: | Tools / Tests | Assignee: | Jonathan Bedard <jbedard> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | aakash_jain, dewei_zhu, ryanhaddad, slewis, webkit-bug-importer, zhifei_fang | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=225616 https://bugs.webkit.org/show_bug.cgi?id=228000 https://bugs.webkit.org/show_bug.cgi?id=228606 https://bugs.webkit.org/show_bug.cgi?id=228619 https://bugs.webkit.org/show_bug.cgi?id=228662 |
||||||||||||
Attachments: |
|
Description
Jonathan Bedard
2021-07-16 10:19:42 PDT
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]. |