comparison hgext/eol.py @ 13127:ece1c069ddd6

merge with stable
author Martin Geisler <mg@lazybytes.net>
date Mon, 13 Dec 2010 11:53:17 +0100
parents df7c2f81afd5 cc5f0c0c19bc
children bffa00360e13
comparison
equal deleted inserted replaced
13126:e76701bf4480 13127:ece1c069ddd6
9 configuration file every time you run an ``hg`` command. The 9 configuration file every time you run an ``hg`` command. The
10 ``.hgeol`` file use the same syntax as all other Mercurial 10 ``.hgeol`` file use the same syntax as all other Mercurial
11 configuration files. It uses two sections, ``[patterns]`` and 11 configuration files. It uses two sections, ``[patterns]`` and
12 ``[repository]``. 12 ``[repository]``.
13 13
14 The ``[patterns]`` section specifies the line endings used in the 14 The ``[patterns]`` section specifies how line endings should be
15 working directory. The format is specified by a file pattern. The 15 converted between the working copy and the repository. The format is
16 first match is used, so put more specific patterns first. The 16 specified by a file pattern. The first match is used, so put more
17 available line endings are ``LF``, ``CRLF``, and ``BIN``. 17 specific patterns first. The available line endings are ``LF``,
18 ``CRLF``, and ``BIN``.
18 19
19 Files with the declared format of ``CRLF`` or ``LF`` are always 20 Files with the declared format of ``CRLF`` or ``LF`` are always
20 checked out in that format and files declared to be binary (``BIN``) 21 checked out and stored in the repository in that format and files
21 are left unchanged. Additionally, ``native`` is an alias for the 22 declared to be binary (``BIN``) are left unchanged. Additionally,
22 platform's default line ending: ``LF`` on Unix (including Mac OS X) 23 ``native`` is an alias for checking out in the platform's default line
23 and ``CRLF`` on Windows. Note that ``BIN`` (do nothing to line 24 ending: ``LF`` on Unix (including Mac OS X) and ``CRLF`` on
24 endings) is Mercurial's default behaviour; it is only needed if you 25 Windows. Note that ``BIN`` (do nothing to line endings) is Mercurial's
25 need to override a later, more general pattern. 26 default behaviour; it is only needed if you need to override a later,
27 more general pattern.
26 28
27 The optional ``[repository]`` section specifies the line endings to 29 The optional ``[repository]`` section specifies the line endings to
28 use for files stored in the repository. It has a single setting, 30 use for files stored in the repository. It has a single setting,
29 ``native``, which determines the storage line endings for files 31 ``native``, which determines the storage line endings for files
30 declared as ``native`` in the ``[patterns]`` section. It can be set to 32 declared as ``native`` in the ``[patterns]`` section. It can be set to
43 Makefile = LF 45 Makefile = LF
44 **.jpg = BIN 46 **.jpg = BIN
45 47
46 [repository] 48 [repository]
47 native = LF 49 native = LF
50
51 .. note::
52 The rules will first apply when files are touched in the working
53 copy, e.g. by updating to null and back to tip to touch all files.
48 54
49 The extension uses an optional ``[eol]`` section in your hgrc file 55 The extension uses an optional ``[eol]`` section in your hgrc file
50 (not the ``.hgeol`` file) for settings that control the overall 56 (not the ``.hgeol`` file) for settings that control the overall
51 behavior. There are two settings: 57 behavior. There are two settings:
52 58