Bug 168816 - Rename 'commit_parent' in 'commits' table to 'commit_previous_commit'.
Summary: Rename 'commit_parent' in 'commits' table to 'commit_previous_commit'.
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2017-02-23 19:16 PST by dewei_zhu
Modified: 2017-02-23 23:23 PST (History)
4 users (show)

See Also:

Patch (13.49 KB, patch)
2017-02-23 19:21 PST, dewei_zhu
no flags Details | Formatted Diff | Diff
Patch for landing (16.77 KB, patch)
2017-02-23 22:39 PST, dewei_zhu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description dewei_zhu 2017-02-23 19:16:26 PST
Rename 'commit_parent' in 'commits' table to 'commit_previous_commit'.
Comment 1 dewei_zhu 2017-02-23 19:21:20 PST
Created attachment 302630 [details]
Comment 2 Chris Dumez 2017-02-23 19:25:00 PST
commit_previous_commit ? What does it mean?
Comment 3 Ryosuke Niwa 2017-02-23 19:45:16 PST
Comment on attachment 302630 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=302630&action=review

r=me with previous_commit > previousCommit in JSON API.

> Websites/perf.webkit.org/public/include/commit-log-fetcher.php:124
> -            'parent' => $commit_row['commit_parent'],
> +            'previous_commit' => $commit_row['commit_previous_commit'],

We should be using camelCase for JSON API.

> Websites/perf.webkit.org/tools/sync-commits.py:234
> -            'parent': parent_hash,
> +            'previous_commit': previous_hash,

This should also be previousCommit.
Comment 4 Ryosuke Niwa 2017-02-23 19:47:26 PST
(In reply to comment #2)
> commit_previous_commit ? What does it mean?

In subversion, the previous commit of a revision X is X - 1. In git, the previous commit of a commit X is the parent commit.

Because we're introducing the concept of a repository having a parent/owner repository, we're changing this column to be more semantically clear as to what it means.

We can also call it preceding commit but that doesn't make much sense in Git world.
Comment 5 dewei_zhu 2017-02-23 22:39:51 PST
Created attachment 302644 [details]
Patch for landing
Comment 6 WebKit Commit Bot 2017-02-23 23:19:36 PST
Comment on attachment 302644 [details]
Patch for landing

Clearing flags on attachment: 302644

Committed r212947: <http://trac.webkit.org/changeset/212947>
Comment 7 WebKit Commit Bot 2017-02-23 23:19:40 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Ryosuke Niwa 2017-02-23 23:23:13 PST
Confirmed this works on a local copy of the production database on my machine.