##// END OF EJS Templates
copies: add config option for writing copy metadata to file and/or changset...
copies: add config option for writing copy metadata to file and/or changset This introduces a config option that lets you choose to write copy metadata to the changeset extras instead of to filelog. There's also an option to write it to both places. I imagine that may possibly be useful when transitioning an existing repo. The copy metadata is stored as two fields in extras: one for copies since p1 and one for copies since p2. I may need to add more information later in order to make copy tracing faster. Specifically, I'm thinking out recording which files were added or removed so that copies._chaincopies() doesn't have to look at the manifest for that. But that would just be an optimization and that can be added once we know if it's necessary. I have also considered saving space by using replacing the destination file path by an index into the "files" list, but that can also be changed later (but before the feature is ready to release). Differential Revision: https://phab.mercurial-scm.org/D6183

File last commit:

r35759:73432eee default
r42317:0e41f40b default
Show More
filesets.txt
79 lines | 2.1 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
Yuya Nishihara
fileset: add kind:pat operator...
r35759 than globs and arguments for predicates. Pattern prefixes such as
``path:`` may be specified without quoting.
Matt Mackall
fileset: add a help topic...
r14686
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
Yuya Nishihara
fileset: add kind:pat operator...
r35759 hg remove "set: listfile:foo.lst and (**a* or **b*)"