comparison hgext/win32text.py @ 9217:9cdb6964c3a3

win32text: use reST syntax for literal blocks
author Martin Geisler <mg@lazybytes.net>
date Thu, 23 Jul 2009 00:26:26 +0200
parents 1de6e7e1bb9f
children 703db37d186b
comparison
equal deleted inserted replaced
9216:9b2649b6ce5c 9217:9cdb6964c3a3
5 # This software may be used and distributed according to the terms of the 5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2, incorporated herein by reference. 6 # GNU General Public License version 2, incorporated herein by reference.
7 7
8 '''perform automatic newline conversion 8 '''perform automatic newline conversion
9 9
10 To perform automatic newline conversion, use: 10 To perform automatic newline conversion, use::
11 11
12 [extensions] 12 [extensions]
13 hgext.win32text = 13 hgext.win32text =
14 [encode] 14 [encode]
15 ** = cleverencode: 15 ** = cleverencode:
16 # or ** = macencode: 16 # or ** = macencode:
17 17
18 [decode] 18 [decode]
19 ** = cleverdecode: 19 ** = cleverdecode:
20 # or ** = macdecode: 20 # or ** = macdecode:
21 21
22 If not doing conversion, to make sure you do not commit CRLF/CR by accident: 22 If not doing conversion, to make sure you do not commit CRLF/CR by accident::
23 23
24 [hooks] 24 [hooks]
25 pretxncommit.crlf = python:hgext.win32text.forbidcrlf 25 pretxncommit.crlf = python:hgext.win32text.forbidcrlf
26 # or pretxncommit.cr = python:hgext.win32text.forbidcr 26 # or pretxncommit.cr = python:hgext.win32text.forbidcr
27 27
28 To do the same check on a server to prevent CRLF/CR from being 28 To do the same check on a server to prevent CRLF/CR from being
29 pushed or pulled: 29 pushed or pulled::
30 30
31 [hooks] 31 [hooks]
32 pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf 32 pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf
33 # or pretxnchangegroup.cr = python:hgext.win32text.forbidcr 33 # or pretxnchangegroup.cr = python:hgext.win32text.forbidcr
34 ''' 34 '''
35 35
36 from mercurial.i18n import _ 36 from mercurial.i18n import _
37 from mercurial.node import short 37 from mercurial.node import short
38 from mercurial import util 38 from mercurial import util