D210: pushvars: move fb extension pushvars to core

akushner (Aaron Kushner) phabricator at mercurial-scm.org
Wed Aug 2 12:40:28 EDT 2017


akushner added a comment.


  @durin42 - This isn't exporting all the shell variables.... it works almost exactly like you are suggesting
  
  > Could we accomplish something similar by having an --extra-args= flag that delivers a part with an arbitrary payload that can then be used (or not) by hooks as they see fit?
  
  How we use this feature:
  
    hg push --pushvars "BYPASS_LARGE_FILE_CHECK=true"
  
  and then the hook that usually balks when someone tries to upload some ridiculously sized binary does something like
  
    if [[ $HG_USERVAR_BYPASS_LARGE_FILE_CHECK == true ]]; then 
      # Don't bail and allow what we usually don't allow
    fi
  
  Notice that the HG_USERVAR is prepended to the "BYPASS_LARGE_FILE_CHECK" var? The user can't override normal shell variables with this.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D210

To: pulkit, #hg-reviewers
Cc: durin42, akushner, mercurial-devel


More information about the Mercurial-devel mailing list