##// END OF EJS Templates
hgweb: add HTML elements to control whitespace settings for annotate...
hgweb: add HTML elements to control whitespace settings for annotate Building on top of the new URL query string arguments to control whitespace settings for annotate, this commit adds HTML checkboxes reflecting the values of these arguments to the paper and gitweb themes. The actual diff settings are now exported to the templating layer. The HTML templates add these as data-* attributes so they are accessible to the DOM. A new <form> with various <input> elements is added. The <form> is initially hidden via CSS. A shared JavaScript function (which runs after the <form> has been rendered but before the annotate HTML (because annotate HTML could take a while to load and we want the form to render quickly) takes care of setting the checked state of each box from the data-* attributes. It also registers an event handler to modify the URL and refresh the page whenever the checkbox state is changed. I'm using the URLSearchParams interface to perform URL manipulation. https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams tells me this may not be supported on older web browsers. Yes, apparently the web API didn't have a standard API to parse and format query strings until recently. Hence the check for the presence of this feature in the JavaScript. If the browser doesn't support the feature, the <form> will remain hidden and behavior will like it currently is. We could polyfill this feature or implement our own query string parsing. But I'm lazy and this could be done as a follow-up if people miss it. We could certainly expand this feature to support more diff options (such as lines of context). That's why the potentially reusable code is stored in a reusable place. It is also certainly possible to add diff controls to other pages that display diffs. But since Mozillians are making noise about controlling which revisions annotate shows, I figured I'd start there. .. feature:: Control whitespace settings for annotation on hgweb /annotate URLs on hgweb now accept query string arguments to influence how whitespace changes impact results. The arguments "ignorews," "ignorewsamount," "ignorewseol," and "ignoreblanklines" now have the same meaning as their [annotate] config section counterparts. Any provided setting overrides the server default. HTML checkboxes have been added to the paper and gitweb themes to expose current whitespace settings and to easily modify the current view. Differential Revision: https://phab.mercurial-scm.org/D850

File last commit:

r27514:311edddd default
r34392:6797f1fb default
Show More
phases.txt
100 lines | 3.0 KiB | text/plain | TextLexer
Matt Mackall
help: add phases topic
r15996 What are phases?
FUJIWARA Katsunori
doc: unify section level between help topics...
r17267 ================
Matt Mackall
help: add phases topic
r15996
Phases are a system for tracking which changesets have been or should
be shared. This helps prevent common mistakes when modifying history
(for instance, with the mq or rebase extensions).
Each changeset in a repository is in one of the following phases:
- public : changeset is visible on a public server
- draft : changeset is not yet published
- secret : changeset should not be pushed, pulled, or cloned
These phases are ordered (public < draft < secret) and no changeset
can be in a lower phase than its ancestors. For instance, if a
changeset is public, all its ancestors are also public. Lastly,
Johan Samyn
help: add verb to sentence in phases.txt
r16244 changeset phases should only be changed towards the public phase.
Matt Mackall
help: add phases topic
r15996
How are phases managed?
FUJIWARA Katsunori
doc: unify section level between help topics...
r17267 =======================
Matt Mackall
help: add phases topic
r15996
For the most part, phases should work transparently. By default, a
changeset is created in the draft phase and is moved into the public
phase when it is pushed to another repository.
Once changesets become public, extensions like mq and rebase will
refuse to operate on them to prevent creating duplicate changesets.
Phases can also be manually manipulated with the :hg:`phase` command
if needed. See :hg:`help -v phase` for examples.
timeless
phases: mention how to make secret commits in help
r27514 To make yours commits secret by default, put this in your
configuration file::
[phases]
new-commit = secret
Matt Mackall
help: add phases topic
r15996 Phases and servers
FUJIWARA Katsunori
doc: unify section level between help topics...
r17267 ==================
Matt Mackall
help: add phases topic
r15996
Normally, all servers are ``publishing`` by default. This means::
- all draft changesets that are pulled or cloned appear in phase
public on the client
- all draft changesets that are pushed appear as public on both
client and server
- secret changesets are neither pushed, pulled, or cloned
.. note::
Simon Heimberg
help: remove last occurrences of ".. note::" without two newlines...
r20532
Matt Mackall
help: add phases topic
r15996 Pulling a draft changeset from a publishing server does not mark it
as public on the server side due to the read-only nature of pull.
Sometimes it may be desirable to push and pull changesets in the draft
phase to share unfinished work. This can be done by setting a
repository to disable publishing in its configuration file::
[phases]
Matt Mackall
help: fix publish option spelling in phases topic
r16000 publish = False
Wagner Bruna
help/phases: remove trailing whitespace
r15998
Jordi Gutiérrez Hermoso
doc: reword "config file" to "configuration file"...
r19295 See :hg:`help config` for more information on configuration files.
Matt Mackall
help: add phases topic
r15996
.. note::
Simon Heimberg
help: remove last occurrences of ".. note::" without two newlines...
r20532
Matt Mackall
help: add phases topic
r15996 Servers running older versions of Mercurial are treated as
publishing.
Pierre-Yves David
phases: add a formal note that hash of secret changeset may leak out...
r20299 .. note::
Simon Heimberg
help: remove last occurrences of ".. note::" without two newlines...
r20532
Pierre-Yves David
phases: add a formal note that hash of secret changeset may leak out...
r20299 Changesets in secret phase are not exchanged with the server. This
applies to their content: file names, file contents, and changeset
metadata. For technical reasons, the identifier (e.g. d825e4025e39)
of the secret changeset may be communicated to the server.
Matt Mackall
help: add examples to phases topic
r16011 Examples
FUJIWARA Katsunori
doc: unify section level between help topics...
r17267 ========
Matt Mackall
help: add examples to phases topic
r16011
- list changesets in draft or secret phase::
hg log -r "not public()"
- change all secret changesets to draft::
hg phase --draft "secret()"
- forcibly move the current changeset and descendants from public to draft::
hg phase --force --draft .
- show a list of changeset revision and phase::
hg log --template "{rev} {phase}\n"
Matt Mackall
phases: add resync example to help topic
r16041 - resynchronize draft changesets relative to a remote repository::
FUJIWARA Katsunori
doc: use double quotation mark to quote arguments in examples for Windows users...
r19959 hg phase -fd "outgoing(URL)"
Matt Mackall
phases: add resync example to help topic
r16041
Matt Mackall
help: add examples to phases topic
r16011 See :hg:`help phase` for more information on manually manipulating phases.