##// END OF EJS Templates
track-tags: introduce first bits of tags tracking during transaction...
track-tags: introduce first bits of tags tracking during transaction This changeset introduces detection of tags changes during transaction. When this happens a 'tag_moved=1' argument is set for hooks, similar to what we do for bookmarks and phases. This code is disabled by default as there are still various performance concerns. Some require a smarter use of our existing tag caches and some other require rework around the transaction logic to skip execution when unneeded. These performance improvements have been delayed, I would like to be able to experiment and stabilize the feature behavior first. Later changesets will push the concept further and provide a way for hooks to know what are the actual changes introduced by the transaction. Similar work is needed for the other families of changes (bookmark, phase, obsolescence, etc). Upgrade of the transaction logic will likely be performed at the same time. The current code can report some false positive when .hgtags file changes but resulting tags are unchanged. This will be fixed in the next changeset. For testing, we simply globally enable a hook in the tag test as all the possible tag update cases should exist there. A couple of them show the false positive mentioned above. See in code documentation for more details.

File last commit:

r31286:f8df8701 default
r31994:b36318e6 default
Show More
filesets.txt
78 lines | 2.0 KiB | text/plain | TextLexer
Matt Mackall
fileset: add a help topic...
r14686 Mercurial supports a functional language for selecting a set of
Mads Kiilerich
check-code: check txt files for trailing whitespace
r18960 files.
Matt Mackall
fileset: add a help topic...
r14686
Like other file patterns, this pattern type is indicated by a prefix,
'set:'. The language supports a number of predicates which are joined
by infix operators. Parenthesis can be used for grouping.
Identifiers such as filenames or patterns must be quoted with single
or double quotes if they contain characters outside of
``[.*{}[]?/\_a-zA-Z0-9\x80-\xff]`` or if they match one of the
predefined predicates. This generally applies to file patterns other
than globs and arguments for predicates.
Special characters can be used in quoted identifiers by escaping them,
e.g., ``\n`` is interpreted as a newline. To prevent them from being
interpreted, strings can be prefixed with ``r``, e.g. ``r'...'``.
Matt Harbison
help: apply the section headings from revsets to filesets...
r30729 See also :hg:`help patterns`.
Matt Harbison
help: merge the various operator sections of revsets, filesets and templates...
r30731 Operators
=========
Matt Harbison
help: apply the section headings from revsets to filesets...
r30729
Matt Mackall
fileset: add a help topic...
r14686 There is a single prefix operator:
``not x``
Files not in x. Short form is ``! x``.
These are the supported infix operators:
``x and y``
The intersection of files in x and y. Short form is ``x & y``.
``x or y``
The union of files in x and y. There are two alternative short
forms: ``x | y`` and ``x + y``.
``x - y``
Files in x but not in y.
Matt Harbison
help: apply the section headings from revsets to filesets...
r30729 Predicates
==========
Matt Mackall
fileset: add a help topic...
r14686 The following predicates are supported:
.. predicatesmarker
Matt Harbison
help: apply the section headings from revsets to filesets...
r30729 Examples
========
Matt Mackall
fileset: add a help topic...
r14686 Some sample queries:
- Show status of files that appear to be binary in the working directory::
hg status -A "set:binary()"
- Forget files that are in .hgignore but are already tracked::
hg forget "set:hgignore() and not ignored()"
- Find text files that contain a string::
FUJIWARA Katsunori
help: use "hg files" instead of "hg locate" in "hg help filesets"...
r23109 hg files "set:grep(magic) and not binary()"
Matt Mackall
fileset: add a help topic...
r14686
- Find C files in a non-standard encoding::
FUJIWARA Katsunori
help: use "hg files" instead of "hg locate" in "hg help filesets"...
r23109 hg files "set:**.c and not encoding('UTF-8')"
Matt Mackall
fileset: add a help topic...
r14686
- Revert copies of large binary files::
hg revert "set:copied() and binary() and size('>1M')"
Pierre-Yves David
fileset: add revs(revs, fileset) to evaluate set in working directory...
r31193 - Revert files that were added to the working directory::
Yuya Nishihara
help: fix example of revs() fileset
r31286 hg revert "set:revs('wdir()', added())"
Pierre-Yves David
fileset: add revs(revs, fileset) to evaluate set in working directory...
r31193
Arne Babenhauserheide
help: fileset foo.lst was named files.lst
r14829 - Remove files listed in foo.lst that contain the letter a or b::
Matt Mackall
fileset: add a help topic...
r14686
hg remove "set: 'listfile:foo.lst' and (**a* or **b*)"