WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
228027
[git-webkit] Add identifiers to 'log' and 'blame'
https://bugs.webkit.org/show_bug.cgi?id=228027
Summary
[git-webkit] Add identifiers to 'log' and 'blame'
Jonathan Bedard
Reported
2021-07-16 10:19:42 PDT
We should have a `git-webkit log` and `git-webkit blame` command that use identifiers in those commands and their output.
Attachments
Patch
(19.44 KB, patch)
2021-07-16 14:01 PDT
,
Jonathan Bedard
no flags
Details
Formatted Diff
Diff
Patch
(28.72 KB, patch)
2021-07-27 14:18 PDT
,
Jonathan Bedard
no flags
Details
Formatted Diff
Diff
Patch
(27.69 KB, patch)
2021-07-29 08:38 PDT
,
Jonathan Bedard
no flags
Details
Formatted Diff
Diff
Patch
(27.81 KB, patch)
2021-07-29 11:01 PDT
,
Jonathan Bedard
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-07-16 10:20:32 PDT
<
rdar://problem/80691164
>
Jonathan Bedard
Comment 2
2021-07-16 14:01:14 PDT
Created
attachment 433700
[details]
Patch
Jonathan Bedard
Comment 3
2021-07-27 14:18:42 PDT
Created
attachment 434313
[details]
Patch
dewei_zhu
Comment 4
2021-07-28 18:07:31 PDT
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) ```
Jonathan Bedard
Comment 5
2021-07-29 08:38:31 PDT
Created
attachment 434522
[details]
Patch
dewei_zhu
Comment 6
2021-07-29 10:14:57 PDT
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.
Jonathan Bedard
Comment 7
2021-07-29 11:01:51 PDT
Created
attachment 434536
[details]
Patch
EWS
Comment 8
2021-07-29 11:32:31 PDT
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]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug