Bug 169143 - webkitpy.common.checkout.scm.git.py has too many git-svn references: should be refactored into new git-svn class
Summary: webkitpy.common.checkout.scm.git.py has too many git-svn references: should b...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: Other
Hardware: Other Other
: P2 Enhancement
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-03 12:42 PST by Kocsen Chung
Modified: 2017-03-04 08:57 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kocsen Chung 2017-03-03 12:42:34 PST
Inside of webkitpy/common/checkout/scm/

The Git class (git.py) inherits from SCM class (scm.py) _and_ SVNRepository class (svn.py).
This can be misleading since many of the implemented functions on git.py are really implementations for a git-svn repository.

Examples of this include:
- git.svn_url()
- git.svn_commit_log()
- git.svn_blame()
- git.svn_revision()

And a heavily misleading one:
- git.push_local_commits_to_server() => Uses git svn dcommit

It seems that this Git class is really an abstraction around git-svn commands and should be refactored accordingly.
This bug may also involve changing the abstract functions declared on scm.py. (i.e scm.svn_revision() is not an appropriate abstraction of an scm. Instead, something like svn.latest_revision() may be more appropriate. It would, then, be up to sublcasses git.py / svn.py to implement acoordingly.)

This bug was inspired after I wanted to use the Git class to fetch the latest SHA/Hash and found it didn't exist under git.py. The closest thing was git.svn_revision() which seemed out of place.