Mercurial > hg
annotate mercurial/help/filesets.txt @ 26755:bb0b955d050d
streamclone: support for producing and consuming stream clone bundles
Up to this point, stream clones only existed as a dynamically generated
data format produced and consumed during streaming clones. In order to
support this efficient cloning format with the clone bundles feature, we
need a more formal, on disk representation of the streaming clone data.
This patch introduces a new "bundle" type for streaming clones. Unlike
existing bundles, it does not contain changegroup data. It does,
however, share the same concepts like the 4 byte header which identifies
the type of data that follows and the 2 byte abbreviation for
compression types (of which only "UN" is currently supported).
The new bundle format is essentially the existing stream clone version 1
data format with some headers at the beginning.
Content negotiation at stream clone request time checked for repository
format/requirements compatibility before initiating a stream clone. We
can't do active content negotiation when using clone bundles. So, we put
this set of requirements inside the payload so consumers have a built-in
mechanism for checking compatibility before reading and applying lots of
data. Of course, we will also advertise this requirements set in clone
bundles. But that's for another patch.
We currently don't have a mechanism to produce and consume this new
bundle format. This will be implemented in upcoming patches.
It's worth noting that if a legacy client attempts to `hg unbundle` a
stream clone bundle (with the "HGS1" header), it will abort with:
"unknown bundle version S1," which seems appropriate.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 17 Oct 2015 11:14:52 -0700 |
parents | cf56f7a60b45 |
children | a4bc8fff67fc |
rev | line source |
---|---|
14686 | 1 Mercurial supports a functional language for selecting a set of |
18960
170fc0949fb6
check-code: check txt files for trailing whitespace
Mads Kiilerich <madski@unity3d.com>
parents:
15825
diff
changeset
|
2 files. |
14686 | 3 |
4 Like other file patterns, this pattern type is indicated by a prefix, | |
5 'set:'. The language supports a number of predicates which are joined | |
6 by infix operators. Parenthesis can be used for grouping. | |
7 | |
8 Identifiers such as filenames or patterns must be quoted with single | |
9 or double quotes if they contain characters outside of | |
10 ``[.*{}[]?/\_a-zA-Z0-9\x80-\xff]`` or if they match one of the | |
11 predefined predicates. This generally applies to file patterns other | |
12 than globs and arguments for predicates. | |
13 | |
14 Special characters can be used in quoted identifiers by escaping them, | |
15 e.g., ``\n`` is interpreted as a newline. To prevent them from being | |
16 interpreted, strings can be prefixed with ``r``, e.g. ``r'...'``. | |
17 | |
18 There is a single prefix operator: | |
19 | |
20 ``not x`` | |
21 Files not in x. Short form is ``! x``. | |
22 | |
23 These are the supported infix operators: | |
24 | |
25 ``x and y`` | |
26 The intersection of files in x and y. Short form is ``x & y``. | |
27 | |
28 ``x or y`` | |
29 The union of files in x and y. There are two alternative short | |
30 forms: ``x | y`` and ``x + y``. | |
31 | |
32 ``x - y`` | |
33 Files in x but not in y. | |
34 | |
35 The following predicates are supported: | |
36 | |
37 .. predicatesmarker | |
38 | |
39 Some sample queries: | |
40 | |
41 - Show status of files that appear to be binary in the working directory:: | |
42 | |
43 hg status -A "set:binary()" | |
44 | |
45 - Forget files that are in .hgignore but are already tracked:: | |
46 | |
47 hg forget "set:hgignore() and not ignored()" | |
48 | |
49 - Find text files that contain a string:: | |
50 | |
23109
cf56f7a60b45
help: use "hg files" instead of "hg locate" in "hg help filesets"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18960
diff
changeset
|
51 hg files "set:grep(magic) and not binary()" |
14686 | 52 |
53 - Find C files in a non-standard encoding:: | |
54 | |
23109
cf56f7a60b45
help: use "hg files" instead of "hg locate" in "hg help filesets"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
18960
diff
changeset
|
55 hg files "set:**.c and not encoding('UTF-8')" |
14686 | 56 |
57 - Revert copies of large binary files:: | |
58 | |
59 hg revert "set:copied() and binary() and size('>1M')" | |
60 | |
14829
968c301a1005
help: fileset foo.lst was named files.lst
Arne Babenhauserheide <bab@draketo.de>
parents:
14686
diff
changeset
|
61 - Remove files listed in foo.lst that contain the letter a or b:: |
14686 | 62 |
63 hg remove "set: 'listfile:foo.lst' and (**a* or **b*)" | |
64 | |
65 See also :hg:`help patterns`. |