D210: pushvars: move fb extension pushvars to core

quark (Jun Wu) phabricator at mercurial-scm.org
Wed Aug 2 15:23:33 EDT 2017


quark added inline comments.

INLINE COMMENTS

> commands.py:3973
>      ('', 'new-branch', False, _('allow pushing a new branch')),
> +    ('', 'pushvars', [], _('variables that can be sent to server')),
>      ] + remoteopts,

Maybe add `(ADVANCED)` so it gets hidden in `--help` without `--verbose`.

> akushner wrote in commands.py:4012
>   The --pushvars option sends strings to the server that become environment variables prepended with HG_USERVAR_. For example, '--pushvars ENABLE_FEATURE=true', provides the server side hooks with 'HG_USERVAR_ENABLE_FEATURE=true' as part of their environment.
>   
>   Pushvars can provide for user-overridable hooks as well as set debug levels. One example is having a hook that blocks commits containing conflict markers, but enables the user to override the hook if the file is using conflict markers for testing purposes or the file format has strings that look like conflict markers.
>   
>   To enable this feature on your server, add the following to your configuration file:
>   
>   [push]
>   pushvars.server = true

To better fit the rst format, it might be:

  .. container:: verbose
  
     The --pushvars option sends strings to the server that become environment
     variables prepended with HG_USERVAR_. For example, ``--pushvars
     ENABLE_FEATURE=true`` provides the server side hooks with
     ``HG_USERVAR_ENABLE_FEATURE=true`` as part of their environment.
  
     Pushvars can provide for user-overridable hooks as well as set debug levels.
     One example is having a hook that blocks commits containing conflict
     markers, but enables the user to override the hook if the file is using
     conflict markers for testing purposes or the file format has strings that
     look like conflict markers.
  
     By default, servers will ignore `--pushvars`. To enable it, set
     ``pushvars.server`` set to ``true`` server-side.

REPOSITORY
  rHG Mercurial

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

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


More information about the Mercurial-devel mailing list