@ -5024,9 +5024,10 @@ def CMDlint(parser, args):
def CMDpresubmit ( parser , args ) :
def CMDpresubmit ( parser , args ) :
""" Runs presubmit tests on the current changelist. """
""" Runs presubmit tests on the current changelist. """
if gclient_utils . IsEnvCog ( ) :
if gclient_utils . IsEnvCog ( ) :
# TODO - crbug/336555565: give user more instructions on how to
print ( ' presubmit command is not supported in non-git environment. '
# trigger presubmit in Cog once the UX is finalized.
' Please use the " Chromium PRESUBMITS " panel or the " Run '
print ( ' presubmit command is not supported in non-git environment. ' ,
' Presubmit Checks " command in the command palette in the editor '
' instead. ' ,
file = sys . stderr )
file = sys . stderr )
return 1
return 1
parser . add_option ( ' -u ' ,
parser . add_option ( ' -u ' ,
@ -6308,9 +6309,9 @@ def CMDweb(parser, args):
""" Opens the current CL in the web browser. """
""" Opens the current CL in the web browser. """
if gclient_utils . IsEnvCog ( ) :
if gclient_utils . IsEnvCog ( ) :
print (
print (
' web command is not supported . Please use " Gerrit: Open Changes '
' web command is not supported in non-git environment . Please use '
' in Gerrit" functionality in the command palette in the Editor '
' "Gerrit: Open Changes in Gerrit" functionality in the command '
' instead.' ,
' palette in the editor instead.' ,
file = sys . stderr )
file = sys . stderr )
return 1
return 1
@ -6958,9 +6959,9 @@ def CMDformat(parser, args):
""" Runs auto-formatting tools (clang-format etc.) on the diff. """
""" Runs auto-formatting tools (clang-format etc.) on the diff. """
if gclient_utils . IsEnvCog ( ) :
if gclient_utils . IsEnvCog ( ) :
print (
print (
' format command is not supported . Please use the " Format '
' format command is not supported in non-git environment . Please '
' Modified Lines in All Files (git cl format)" functionality in '
' use the " Format Modified Lines in All Files (git cl format)" '
' command palette in the editor instead.' ,
' functionality in the command palette in the editor instead.' ,
file = sys . stderr )
file = sys . stderr )
return 1
return 1
clang_exts = [ ' .cc ' , ' .cpp ' , ' .h ' , ' .m ' , ' .mm ' , ' .proto ' ]
clang_exts = [ ' .cc ' , ' .cpp ' , ' .h ' , ' .m ' , ' .mm ' , ' .proto ' ]