[chromium-dev] Re: [announce] git-cl now has presubmit support.. read on to find out how to enable it!

2009-10-15 Thread Andrew Scherkus
Hrmm... it looks your script assumes depot_tools is in your PATH -- if it
can't find it the script crashes.
Trying to figure out a workaround.  If all else fails I can always give in
and add depot_tools to my PATH :)

On Wed, Oct 14, 2009 at 11:08 PM, Aaron Boodman a...@chromium.org wrote:


 Hooray, this is awesome.

 On Wed, Oct 14, 2009 at 10:35 PM, Chase Phillips ch...@chromium.org
 wrote:
  If you don't use git-cl, you can stop reading now.
  Attention git-cl users: git-cl now has presubmit support!  New users that
  set up their git checkout on or after Wednesday (2009/10/14) are already
  configured with presubmit support.  Feel free to skip
 the setup instructions
  since you've already run them but read on to learn more about the recent
  changes.
  Presubmit support for Existing Users (if you set up your git checkout
 before
  2009/10/14):
  Run these commands to install the required git hooks in your repository:
 
  cd /work/chromium/src # where /work/chromium/src is the path to your
 git
  repository
  gclient sync # to upgrade your copy of depot_tools and git-cl
  git cl config http://src.chromium.org/svn/ # to install the git-cl
 presubmit
  hooks
 
  You must rerun the git cl config command in each of your local git
  repositories.
  New and updated git-cl commands:
git-cl presubmit
  Runs upload and commit presubmit checks on the current changelist.
git-cl upload
  Runs presubmit tests on upload, continues even if tests fail.
git-cl dcommit
  Run presubmit tests on commit, halts if tests fail.
  To bypass the presubmit tests in upload or dcommit, use
  the --bypass-hooks flag. git-cl dcommit's -f now implies --bypass-hooks
  along with skipping the commit confirm prompt.
  Questions?
  Feel free to reply to me off-list with any questions you have.
  Thanks to Evan Martin, Marc-Antoine Ruel, and Nicolas Sylvain for their
 help
  making git-cl presubmit support a reality.
  Chase
  
 

 


--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: [announce] git-cl now has presubmit support.. read on to find out how to enable it!

2009-10-15 Thread Ojan Vafai
Replying off-list as requested...

Firstly, this is awesome!

On Wed, Oct 14, 2009 at 10:35 PM, Chase Phillips ch...@chromium.org wrote:

   git-cl upload
 Runs presubmit tests on upload, continues even if tests fail.


This latter part is different than the gcl version. Is that intentional? I
don't have an opinion on which is the correct behavior, but it would be nice
to keep the scripts consistent.


 To bypass the presubmit tests in upload or dcommit, use
 the --bypass-hooks flag. git-cl dcommit's -f now implies --bypass-hooks
 along with skipping the commit confirm prompt.


Ditto above. The gcl flag is --no-presubmit.

--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: [announce] git-cl now has presubmit support.. read on to find out how to enable it!

2009-10-15 Thread Chase Phillips
Hi Andrew,

On Wed, Oct 14, 2009 at 11:31 PM, Andrew Scherkus scher...@chromium.orgwrote:

 Hrmm... it looks your script assumes depot_tools is in your PATH -- if it
 can't find it the script crashes.


Thanks for pointing this out.  The hooks should fail gracefully in those
cases, so I'll make that happen.


 Trying to figure out a workaround.  If all else fails I can always give in
 and add depot_tools to my PATH :)


I am under the impression depot_tools in each of our PATHs was already a
hard requirement.  Are tools like git-cl, git-try, trychange.py, etc in some
other directory in your PATH, or do you run them with absolute paths, or
...?

Giving in might be best. :)

Chase



 On Wed, Oct 14, 2009 at 11:08 PM, Aaron Boodman a...@chromium.org wrote:


 Hooray, this is awesome.

 On Wed, Oct 14, 2009 at 10:35 PM, Chase Phillips ch...@chromium.org
 wrote:
  If you don't use git-cl, you can stop reading now.
  Attention git-cl users: git-cl now has presubmit support!  New users
 that
  set up their git checkout on or after Wednesday (2009/10/14) are already
  configured with presubmit support.  Feel free to skip
 the setup instructions
  since you've already run them but read on to learn more about the recent
  changes.
  Presubmit support for Existing Users (if you set up your git checkout
 before
  2009/10/14):
  Run these commands to install the required git hooks in your repository:
 
  cd /work/chromium/src # where /work/chromium/src is the path to your
 git
  repository
  gclient sync # to upgrade your copy of depot_tools and git-cl
  git cl config http://src.chromium.org/svn/ # to install the git-cl
 presubmit
  hooks
 
  You must rerun the git cl config command in each of your local git
  repositories.
  New and updated git-cl commands:
git-cl presubmit
  Runs upload and commit presubmit checks on the current changelist.
git-cl upload
  Runs presubmit tests on upload, continues even if tests fail.
git-cl dcommit
  Run presubmit tests on commit, halts if tests fail.
  To bypass the presubmit tests in upload or dcommit, use
  the --bypass-hooks flag. git-cl dcommit's -f now implies --bypass-hooks
  along with skipping the commit confirm prompt.
  Questions?
  Feel free to reply to me off-list with any questions you have.
  Thanks to Evan Martin, Marc-Antoine Ruel, and Nicolas Sylvain for their
 help
  making git-cl presubmit support a reality.
  Chase
  
 

 



--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: [announce] git-cl now has presubmit support.. read on to find out how to enable it!

2009-10-15 Thread Andrew Scherkus
On Thu, Oct 15, 2009 at 11:03 AM, Chase Phillips ch...@chromium.org wrote:

 Hi Andrew,

 On Wed, Oct 14, 2009 at 11:31 PM, Andrew Scherkus 
 scher...@chromium.orgwrote:

 Hrmm... it looks your script assumes depot_tools is in your PATH -- if it
 can't find it the script crashes.


 Thanks for pointing this out.  The hooks should fail gracefully in those
 cases, so I'll make that happen.


 Trying to figure out a workaround.  If all else fails I can always give in
 and add depot_tools to my PATH :)


 I am under the impression depot_tools in each of our PATHs was already a
 hard requirement.  Are tools like git-cl, git-try, trychange.py, etc in some
 other directory in your PATH, or do you run them with absolute paths, or
 ...?


For git-cl and git-try, they're symlinked from ~/bin to my depot_tools and
everything seems to work.  The difference here is that the git hook is
executed from .git/hooks



 Giving in might be best. :)


Already did :)



 Chase



 On Wed, Oct 14, 2009 at 11:08 PM, Aaron Boodman a...@chromium.org wrote:


 Hooray, this is awesome.

 On Wed, Oct 14, 2009 at 10:35 PM, Chase Phillips ch...@chromium.org
 wrote:
  If you don't use git-cl, you can stop reading now.
  Attention git-cl users: git-cl now has presubmit support!  New users
 that
  set up their git checkout on or after Wednesday (2009/10/14) are
 already
  configured with presubmit support.  Feel free to skip
 the setup instructions
  since you've already run them but read on to learn more about the
 recent
  changes.
  Presubmit support for Existing Users (if you set up your git checkout
 before
  2009/10/14):
  Run these commands to install the required git hooks in your
 repository:
 
  cd /work/chromium/src # where /work/chromium/src is the path to your
 git
  repository
  gclient sync # to upgrade your copy of depot_tools and git-cl
  git cl config http://src.chromium.org/svn/ # to install the git-cl
 presubmit
  hooks
 
  You must rerun the git cl config command in each of your local git
  repositories.
  New and updated git-cl commands:
git-cl presubmit
  Runs upload and commit presubmit checks on the current changelist.
git-cl upload
  Runs presubmit tests on upload, continues even if tests fail.
git-cl dcommit
  Run presubmit tests on commit, halts if tests fail.
  To bypass the presubmit tests in upload or dcommit, use
  the --bypass-hooks flag. git-cl dcommit's -f now implies --bypass-hooks
  along with skipping the commit confirm prompt.
  Questions?
  Feel free to reply to me off-list with any questions you have.
  Thanks to Evan Martin, Marc-Antoine Ruel, and Nicolas Sylvain for their
 help
  making git-cl presubmit support a reality.
  Chase
  
 

 




--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: [announce] git-cl now has presubmit support.. read on to find out how to enable it!

2009-10-15 Thread Chase Phillips
On Thu, Oct 15, 2009 at 10:38 AM, Ojan Vafai o...@chromium.org wrote:

 Replying off-list as requested...


Right! ;)


 Firstly, this is awesome!


Thanks.


 On Wed, Oct 14, 2009 at 10:35 PM, Chase Phillips ch...@chromium.orgwrote:

   git-cl upload
 Runs presubmit tests on upload, continues even if tests fail.


 This latter part is different than the gcl version. Is that intentional? I
 don't have an opinion on which is the correct behavior, but it would be nice
 to keep the scripts consistent.


I agree about keeping them as consistent as possible.

However, my tests of gcl upload show they already have the same behavior
here: gcl uploads the patch to codereview whether or not the presubmit step
fails.  I just tested this twice again to confirm it.  You see gcl fail to
upload if the presubmit step fails?


 To bypass the presubmit tests in upload or dcommit, use
 the --bypass-hooks flag. git-cl dcommit's -f now implies --bypass-hooks
 along with skipping the commit confirm prompt.


 Ditto above. The gcl flag is --no-presubmit.


I considered both gcl and git's convention.  I decided I would first wait to
see if anyone cared enough to raise the issue and take it from there. :)

git-cl is not Chromium-specific and using gcl's convention appeared to be a
Chromium-specific solution.  Based on that, I decided to go git's route
where not running hooks is done using --bypass-hooks.  This also seemed
justified because git-cl's hooks could be used for more than just presubmit
tests.

It might be valid to add --no-presubmit to git-cl, or --bypass-hooks to gcl,
or both.  Thoughts?

Chase

--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: [announce] git-cl now has presubmit support.. read on to find out how to enable it!

2009-10-15 Thread Evan Martin

On Thu, Oct 15, 2009 at 11:19 AM, Chase Phillips ch...@chromium.org wrote:
 To bypass the presubmit tests in upload or dcommit, use
 the --bypass-hooks flag. git-cl dcommit's -f now implies --bypass-hooks
 along with skipping the commit confirm prompt.

 Ditto above. The gcl flag is --no-presubmit.

 I considered both gcl and git's convention.  I decided I would first wait to
 see if anyone cared enough to raise the issue and take it from there. :)
 git-cl is not Chromium-specific and using gcl's convention appeared to be a
 Chromium-specific solution.  Based on that, I decided to go git's route
 where not running hooks is done using --bypass-hooks.  This also seemed
 justified because git-cl's hooks could be used for more than just presubmit
 tests.
 It might be valid to add --no-presubmit to git-cl, or --bypass-hooks to gcl,
 or both.  Thoughts?

I agree with Chase's reasoning.

Also, you shouldn't need to bypass hooks frequently enough for this to
matter much, and nobody switches between these two tools (they either
use one or the other).

--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---



[chromium-dev] Re: [announce] git-cl now has presubmit support.. read on to find out how to enable it!

2009-10-15 Thread Ojan Vafai
On Thu, Oct 15, 2009 at 11:19 AM, Chase Phillips ch...@chromium.org wrote:

 On Thu, Oct 15, 2009 at 10:38 AM, Ojan Vafai o...@chromium.org wrote:

 Replying off-list as requested...

 Right! ;)


Doh.


 However, my tests of gcl upload show they already have the same behavior
 here: gcl uploads the patch to codereview whether or not the presubmit step
 fails.  I just tested this twice again to confirm it.  You see gcl fail to
 upload if the presubmit step fails?


Huh. I just tested this and see the opposite (it did not upload). I made a
change that breaks the test_expectations.txt presubmit check. Maybe that's
just a bug?


 git-cl is not Chromium-specific and using gcl's convention appeared to be a
 Chromium-specific solution.  Based on that, I decided to go git's route
 where not running hooks is done using --bypass-hooks.  This also seemed
 justified because git-cl's hooks could be used for more than just presubmit
 tests.

 It might be valid to add --no-presubmit to git-cl, or --bypass-hooks to
 gcl, or both.  Thoughts?


Ah. That makes more sense. Not sure it's worth bothering to put more work
into this. As you said, if it becomes a problem we can always fix it later.

--~--~-~--~~~---~--~~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev
-~--~~~~--~~--~--~---