durin42 added a comment.

  In https://phab.mercurial-scm.org/D210#3506, @akushner wrote:
  
  > @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
  >
  
  
  Right, that's roughly what I expected. Could it be done using HG_EXTRA_ARGS 
that was set to whatever --extra-args contained?
  
  > Notice that the HG_USERVAR is prepended to the "BYPASS_LARGE_FILE_CHECK" 
var? The user can't override normal shell variables with this.
  
  Sure, but environment variables are still global state, so its got nonzero 
concurrency concerns. I'm also *extremely* uncomfortable shipping *all* 
environment variables because people put credentials in them on a regular 
basis, so if we do go with the "ship an environment variable" approach, I think 
the user should be specifying which variables to send.

REPOSITORY
  rHG Mercurial

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

To: pulkit, #hg-reviewers
Cc: durin42, akushner, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to