Bug 95742

Summary: Need to run git commands within the checkout directory
Product: WebKit Reporter: Satish Sampath <satish>
Component: Tools / TestsAssignee: Satish Sampath <satish>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, dpranke, eric, ojan, peter, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch none

Description Satish Sampath 2012-09-04 06:30:08 PDT
git commands run from Tools/Scripts/webkitpy/common/checkout/scm/git.py are sometimes run with cwd set to the checkout_root and other times with whatever directory was the default cwd. Instead all these should run with the checkout root set as the cwd (except where we explicitly need a different path)
Comment 1 Satish Sampath 2012-09-04 06:36:00 PDT
Created attachment 162031 [details]
Patch
Comment 2 Peter Beverloo 2012-09-04 06:44:34 PDT
Comment on attachment 162031 [details]
Patch

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

One minor nit. Thanks, seems like a good clean-up overall :-). Did you intend to request commit as well?

> Tools/Scripts/webkitpy/common/checkout/scm/git.py:101
> +    def _run_exe(self, command_args, **kwargs):

nit: I'm not thrilled about the "_run_exe" name, maybe something like "_run_git_command" would be better? If this issue applies to svn as well, maybe this could be generalized in the SCM class and name it "_run_scm_command"..
Comment 3 Satish Sampath 2012-09-04 07:37:11 PDT
Comment on attachment 162031 [details]
Patch

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

>> Tools/Scripts/webkitpy/common/checkout/scm/git.py:101
>> +    def _run_exe(self, command_args, **kwargs):
> 
> nit: I'm not thrilled about the "_run_exe" name, maybe something like "_run_git_command" would be better? If this issue applies to svn as well, maybe this could be generalized in the SCM class and name it "_run_scm_command"..

I'll rename it to _run_git() similar to how there is a _run_svn() in svn.py. Since I don't have an svn checkout don't know if that has similar issues, would be better for someone with an svn checkout to send a patch if they find an issue with it.
Comment 4 Satish Sampath 2012-09-04 07:37:26 PDT
Created attachment 162041 [details]
Patch
Comment 5 Adam Barth 2012-09-04 11:41:11 PDT
Eric should probably review this patch.
Comment 6 Eric Seidel (no email) 2012-09-04 12:44:03 PDT
Comment on attachment 162041 [details]
Patch

Seems like a win.  Thanks!
Comment 7 WebKit Review Bot 2012-09-04 14:22:38 PDT
Comment on attachment 162041 [details]
Patch

Clearing flags on attachment: 162041

Committed r127507: <http://trac.webkit.org/changeset/127507>
Comment 8 WebKit Review Bot 2012-09-04 14:22:42 PDT
All reviewed patches have been landed.  Closing bug.