##// END OF EJS Templates
extdiff: wrap docstrings at 70 characters
Martin Geisler -
r9257:50ebe884 default
parent child Browse files
Show More
@@ -7,13 +7,14 b''
7 7
8 8 '''command to allow external programs to compare revisions
9 9
10 The `extdiff' Mercurial extension allows you to use external programs to
11 compare revisions, or revision with working directory. The external diff
12 programs are called with a configurable set of options and two non-option
13 arguments: paths to directories containing snapshots of files to compare.
10 The `extdiff' Mercurial extension allows you to use external programs
11 to compare revisions, or revision with working directory. The external
12 diff programs are called with a configurable set of options and two
13 non-option arguments: paths to directories containing snapshots of
14 files to compare.
14 15
15 The `extdiff' extension also allows to configure new diff commands, so you do
16 not need to type "hg extdiff -p kdiff3" always. ::
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 18
18 19 [extdiff]
19 20 # add new command that runs GNU diff(1) in 'context diff' mode
@@ -28,15 +29,16 b' not need to type "hg extdiff -p kdiff3" '
28 29 # add new command called meld, runs meld (no need to name twice)
29 30 meld =
30 31
31 # add new command called vimdiff, runs gvimdiff with DirDiff plugin (see
32 # http://www.vim.org/scripts/script.php?script_id=102) Non English user, be
33 # sure to put "let g:DirDiffDynamicDiffText = 1" in your .vimrc
32 # add new command called vimdiff, runs gvimdiff with DirDiff plugin
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
35 # your .vimrc
34 36 vimdiff = gvim -f '+next' '+execute "DirDiff" argv(0) argv(1)'
35 37
36 You can use -I/-X and list of file or directory names like normal "hg diff"
37 command. The `extdiff' extension makes snapshots of only needed files, so
38 running the external diff program will actually be pretty fast (at least
39 faster than having to compare the entire tree).
38 You can use -I/-X and list of file or directory names like normal "hg
39 diff" command. The `extdiff' extension makes snapshots of only needed
40 files, so running the external diff program will actually be pretty
41 fast (at least faster than having to compare the entire tree).
40 42 '''
41 43
42 44 from mercurial.i18n import _
@@ -157,20 +159,20 b' def dodiff(ui, repo, diffcmd, diffopts, '
157 159 def extdiff(ui, repo, *pats, **opts):
158 160 '''use external program to diff repository (or selected files)
159 161
160 Show differences between revisions for the specified files, using an
161 external program. The default program used is diff, with default options
162 "-Npru".
162 Show differences between revisions for the specified files, using
163 an external program. The default program used is diff, with
164 default options "-Npru".
163 165
164 To select a different program, use the -p/--program option. The program
165 will be passed the names of two directories to compare. To pass additional
166 options to the program, use -o/--option. These will be passed before the
167 names of the directories to compare.
166 To select a different program, use the -p/--program option. The
167 program will be passed the names of two directories to compare. To
168 pass additional options to the program, use -o/--option. These
169 will be passed before the names of the directories to compare.
168 170
169 When two revision arguments are given, then changes are shown between
170 those revisions. If only one revision is specified then that revision is
171 compared to the working directory, and, when no revisions are specified,
172 the working directory files are compared to its parent.
173 '''
171 When two revision arguments are given, then changes are shown
172 between those revisions. If only one revision is specified then
173 that revision is compared to the working directory, and, when no
174 revisions are specified, the working directory files are compared
175 to its parent.'''
174 176 program = opts['program'] or 'diff'
175 177 if opts['program']:
176 178 option = opts['option']
General Comments 0
You need to be logged in to leave comments. Login now