5 # This software may be used and distributed according to the terms |
5 # This software may be used and distributed according to the terms |
6 # of the GNU General Public License, incorporated herein by reference. |
6 # of the GNU General Public License, incorporated herein by reference. |
7 |
7 |
8 ''' |
8 ''' |
9 The `extdiff' Mercurial extension allows you to use external programs |
9 The `extdiff' Mercurial extension allows you to use external programs |
10 to compare revisions, or revision with working dir. The external diff |
10 to compare revisions, or revision with working dir. The external diff |
11 programs are called with a configurable set of options and two |
11 programs are called with a configurable set of options and two |
12 non-option arguments: paths to directories containing snapshots of |
12 non-option arguments: paths to directories containing snapshots of |
13 files to compare. |
13 files to compare. |
14 |
14 |
15 To enable this extension: |
15 To enable this extension: |
38 # Non english user, be sure to put "let g:DirDiffDynamicDiffText = 1" in |
38 # Non english user, be sure to put "let g:DirDiffDynamicDiffText = 1" in |
39 # your .vimrc |
39 # your .vimrc |
40 vimdiff = gvim -f '+next' '+execute "DirDiff" argv(0) argv(1)' |
40 vimdiff = gvim -f '+next' '+execute "DirDiff" argv(0) argv(1)' |
41 |
41 |
42 You can use -I/-X and list of file or directory names like normal |
42 You can use -I/-X and list of file or directory names like normal |
43 "hg diff" command. The `extdiff' extension makes snapshots of only |
43 "hg diff" command. The `extdiff' extension makes snapshots of only |
44 needed files, so running the external diff program will actually be |
44 needed files, so running the external diff program will actually be |
45 pretty fast (at least faster than having to compare the entire tree). |
45 pretty fast (at least faster than having to compare the entire tree). |
46 ''' |
46 ''' |
47 |
47 |
48 from mercurial.i18n import _ |
48 from mercurial.i18n import _ |
189 |
189 |
190 def extdiff(ui, repo, *pats, **opts): |
190 def extdiff(ui, repo, *pats, **opts): |
191 '''use external program to diff repository (or selected files) |
191 '''use external program to diff repository (or selected files) |
192 |
192 |
193 Show differences between revisions for the specified files, using |
193 Show differences between revisions for the specified files, using |
194 an external program. The default program used is diff, with |
194 an external program. The default program used is diff, with |
195 default options "-Npru". |
195 default options "-Npru". |
196 |
196 |
197 To select a different program, use the -p option. The program |
197 To select a different program, use the -p option. The program |
198 will be passed the names of two directories to compare. To pass |
198 will be passed the names of two directories to compare. To pass |
199 additional options to the program, use the -o option. These will |
199 additional options to the program, use the -o option. These will |
200 be passed before the names of the directories to compare. |
200 be passed before the names of the directories to compare. |
201 |
201 |
202 When two revision arguments are given, then changes are |
202 When two revision arguments are given, then changes are |
203 shown between those revisions. If only one revision is |
203 shown between those revisions. If only one revision is |
204 specified then that revision is compared to the working |
204 specified then that revision is compared to the working |