Mercurial > public > mercurial-scm > hg
comparison hgext/extdiff.py @ 11191:c45a47bc4114
extdiff: fix reST syntax in module docstring
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Mon, 17 May 2010 23:11:27 +0200 |
parents | 7d99edddbaea |
children | 40c06bbf58be |
comparison
equal
deleted
inserted
replaced
11190:43337076ba92 | 11191:c45a47bc4114 |
---|---|
12 diff programs are called with a configurable set of options and two | 12 diff programs are called with a configurable set of options and two |
13 non-option arguments: paths to directories containing snapshots of | 13 non-option arguments: paths to directories containing snapshots of |
14 files to compare. | 14 files to compare. |
15 | 15 |
16 The extdiff extension also allows to configure new diff commands, so | 16 The extdiff extension also allows to configure new diff commands, so |
17 you do not need to type "hg extdiff -p kdiff3" always. :: | 17 you do not need to type :hg:`extdiff -p kdiff3` always. :: |
18 | 18 |
19 [extdiff] | 19 [extdiff] |
20 # add new command that runs GNU diff(1) in 'context diff' mode | 20 # add new command that runs GNU diff(1) in 'context diff' mode |
21 cdiff = gdiff -Nprc5 | 21 cdiff = gdiff -Nprc5 |
22 ## or the old way: | 22 ## or the old way: |
33 # (see http://www.vim.org/scripts/script.php?script_id=102) Non | 33 # (see http://www.vim.org/scripts/script.php?script_id=102) Non |
34 # English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in | 34 # English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in |
35 # your .vimrc | 35 # your .vimrc |
36 vimdiff = gvim -f '+next' '+execute "DirDiff" argv(0) argv(1)' | 36 vimdiff = gvim -f '+next' '+execute "DirDiff" argv(0) argv(1)' |
37 | 37 |
38 Tool arguments can include variables that are expanded at runtime: | 38 Tool arguments can include variables that are expanded at runtime:: |
39 | 39 |
40 $parent1, $plabel1 - filename, descriptive label of first parent | 40 $parent1, $plabel1 - filename, descriptive label of first parent |
41 $child, $clabel - filename, descriptive label of child revision | 41 $child, $clabel - filename, descriptive label of child revision |
42 $parent2, $plabel2 - filename, descriptive label of second parent | 42 $parent2, $plabel2 - filename, descriptive label of second parent |
43 $parent is an alias for $parent1. | 43 $parent is an alias for $parent1. |
44 | 44 |
45 The extdiff extension will look in your [diff-tools] and [merge-tools] | 45 The extdiff extension will look in your [diff-tools] and [merge-tools] |
46 sections for diff tool arguments, when none are specified in [extdiff]. | 46 sections for diff tool arguments, when none are specified in [extdiff]. |
47 | 47 |
48 :: | |
49 | |
48 [extdiff] | 50 [extdiff] |
49 kdiff3 = | 51 kdiff3 = |
50 | 52 |
51 [diff-tools] | 53 [diff-tools] |
52 kdiff3.diffargs=--L1 '$plabel1' --L2 '$clabel' $parent $child | 54 kdiff3.diffargs=--L1 '$plabel1' --L2 '$clabel' $parent $child |
53 | 55 |
54 You can use -I/-X and list of file or directory names like normal "hg | 56 You can use -I/-X and list of file or directory names like normal |
55 diff" command. The extdiff extension makes snapshots of only needed | 57 :hg:`diff` command. The extdiff extension makes snapshots of only |
56 files, so running the external diff program will actually be pretty | 58 needed files, so running the external diff program will actually be |
57 fast (at least faster than having to compare the entire tree). | 59 pretty fast (at least faster than having to compare the entire tree). |
58 ''' | 60 ''' |
59 | 61 |
60 from mercurial.i18n import _ | 62 from mercurial.i18n import _ |
61 from mercurial.node import short, nullid | 63 from mercurial.node import short, nullid |
62 from mercurial import cmdutil, util, commands, encoding | 64 from mercurial import cmdutil, util, commands, encoding |