view mercurial/help/environment.txt @ 33390:32331f54930c

hgweb: re-implement followlines UI selection using buttons This changeset attempts to solve two issues with the "followlines" UI in hgweb. First the "followlines" action is currently not easily discoverable (one has to hover on a line for some time, wait for the invite message to appear and then perform some action). Second, it gets in the way of natural line selection, especially in filerevision view. This changeset introduces an additional markup element (a <button class="btn-followlines">) alongside each content line of the view. This button now holds events for line selection that were previously plugged onto content lines directly. Consequently, there's no more action on content lines, hence restoring the "natural line selection" behavior (solving the second problem). These buttons are hidden by default and get displayed upon hover of content lines; then upon hover of a button itself, a text inviting followlines section shows up. This solves the first problem (discoverability) as we now have a clear visual element indicating that "some action could be perform" (i.e. a button) and that is self-documented. In followlines.js, all event listeners are now attached to these <button> elements. The custom "floating tooltip" element is dropped as <button> elements are now self-documented through a "title" attribute that changes depending on preceding actions (selection started or not, in particular). The new <button> element is inserted in followlines.js script (thus only visible if JavaScript is activated); it contains a "+" and "-" with a "diff-semantics" style; upon hover, it scales up. To find the parent element under which to insert the <button> we either rely on the "data-selectabletag" attribute (which defines the HTML tag of children of class="sourcelines" element e.g. <span> for filerevision view and <tr> for annotate view) or use a child of the latter elements if we find an element with class="followlines-btn-parent" (useful for annotate view, for which we have to find the <td> in which to insert the <button>). On noticeable change in CSS concerns the "margin-left" of span:before pseudo-elements in filelog view that has been increased a bit in order to leave space for the new button to appear between line number column and line content one. Also note the "z-index" addition for "annotate-info" box so that the latter appears on top of new buttons (instead of getting hidden). In some respect, the UI similar to line commenting feature that is implemented in popular code hosting site like GitHub, BitBucket or Kallithea.
author Denis Laxalde <denis.laxalde@logilab.fr>
date Mon, 03 Jul 2017 13:49:03 +0200
parents 40785ccab410
children c9740b69b9b7 d4805a5e7e70
line wrap: on
line source

HG
    Path to the 'hg' executable, automatically passed when running
    hooks, extensions or external tools. If unset or empty, this is
    the hg executable's name if it's frozen, or an executable named
    'hg' (with %PATHEXT% [defaulting to COM/EXE/BAT/CMD] extensions on
    Windows) is searched.

HGEDITOR
    This is the name of the editor to run when committing. See EDITOR.

    (deprecated, see :hg:`help config.ui.editor`)

HGENCODING
    This overrides the default locale setting detected by Mercurial.
    This setting is used to convert data including usernames,
    changeset descriptions, tag names, and branches. This setting can
    be overridden with the --encoding command-line option.

HGENCODINGMODE
    This sets Mercurial's behavior for handling unknown characters
    while transcoding user input. The default is "strict", which
    causes Mercurial to abort if it can't map a character. Other
    settings include "replace", which replaces unknown characters, and
    "ignore", which drops them. This setting can be overridden with
    the --encodingmode command-line option.

HGENCODINGAMBIGUOUS
    This sets Mercurial's behavior for handling characters with
    "ambiguous" widths like accented Latin characters with East Asian
    fonts. By default, Mercurial assumes ambiguous characters are
    narrow, set this variable to "wide" if such characters cause
    formatting problems.

HGMERGE
    An executable to use for resolving merge conflicts. The program
    will be executed with three arguments: local file, remote file,
    ancestor file.

    (deprecated, see :hg:`help config.ui.merge`)

HGRCPATH
    A list of files or directories to search for configuration
    files. Item separator is ":" on Unix, ";" on Windows. If HGRCPATH
    is not set, platform default search path is used. If empty, only
    the .hg/hgrc from the current repository is read.

    For each element in HGRCPATH:

    - if it's a directory, all files ending with .rc are added
    - otherwise, the file itself will be added

HGPLAIN
    When set, this disables any configuration settings that might
    change Mercurial's default output. This includes encoding,
    defaults, verbose mode, debug mode, quiet mode, tracebacks, and
    localization. This can be useful when scripting against Mercurial
    in the face of existing user configuration.

    Equivalent options set via command line flags or environment
    variables are not overridden.

HGPLAINEXCEPT
    This is a comma-separated list of features to preserve when
    HGPLAIN is enabled. Currently the following values are supported:

    ``alias``
        Don't remove aliases.
    ``i18n``
        Preserve internationalization.
    ``revsetalias``
        Don't remove revset aliases.
    ``templatealias``
        Don't remove template aliases.
    ``progress``
        Don't hide progress output.

    Setting HGPLAINEXCEPT to anything (even an empty string) will
    enable plain mode.

HGUSER
    This is the string used as the author of a commit. If not set,
    available values will be considered in this order:

    - HGUSER (deprecated)
    - configuration files from the HGRCPATH
    - EMAIL
    - interactive prompt
    - LOGNAME (with ``@hostname`` appended)

    (deprecated, see :hg:`help config.ui.username`)

EMAIL
    May be used as the author of a commit; see HGUSER.

LOGNAME
    May be used as the author of a commit; see HGUSER.

VISUAL
    This is the name of the editor to use when committing. See EDITOR.

EDITOR
    Sometimes Mercurial needs to open a text file in an editor for a
    user to modify, for example when writing commit messages. The
    editor it uses is determined by looking at the environment
    variables HGEDITOR, VISUAL and EDITOR, in that order. The first
    non-empty one is chosen. If all of them are empty, the editor
    defaults to 'vi'.

PYTHONPATH
    This is used by Python to find imported modules and may need to be
    set appropriately if this Mercurial is not installed system-wide.