comparison tests/test-extension.t @ 41487:fa471151d269

extdiff: add --per-file and --confirm options The new options lets the user control how the external program is run. By default, Mercurial passes the 2 snapshot directories as usual, but it can also run the program repeatedly on each file's snapshot pair, and optionally prompt the user each time.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 29 Jan 2019 22:59:15 -0800
parents 28a4fb793ba1
children b0865b5919c6
comparison
equal deleted inserted replaced
41486:f9150901267c 41487:fa471151d269
803 Show differences between revisions for the specified files, using an 803 Show differences between revisions for the specified files, using an
804 external program. The default program used is diff, with default options 804 external program. The default program used is diff, with default options
805 "-Npru". 805 "-Npru".
806 806
807 To select a different program, use the -p/--program option. The program 807 To select a different program, use the -p/--program option. The program
808 will be passed the names of two directories to compare. To pass additional 808 will be passed the names of two directories to compare, unless the --per-
809 options to the program, use -o/--option. These will be passed before the 809 file option is specified (see below). To pass additional options to the
810 names of the directories to compare. 810 program, use -o/--option. These will be passed before the names of the
811 directories or files to compare.
811 812
812 When two revision arguments are given, then changes are shown between 813 When two revision arguments are given, then changes are shown between
813 those revisions. If only one revision is specified then that revision is 814 those revisions. If only one revision is specified then that revision is
814 compared to the working directory, and, when no revisions are specified, 815 compared to the working directory, and, when no revisions are specified,
815 the working directory files are compared to its parent. 816 the working directory files are compared to its parent.
816 817
818 The --per-file option runs the external program repeatedly on each file to
819 diff, instead of once on two directories.
820
821 The --confirm option will prompt the user before each invocation of the
822 external program. It is ignored if --per-file isn't specified.
823
817 (use 'hg help -e extdiff' to show help for the extdiff extension) 824 (use 'hg help -e extdiff' to show help for the extdiff extension)
818 825
819 options ([+] can be repeated): 826 options ([+] can be repeated):
820 827
821 -p --program CMD comparison program to run 828 -p --program CMD comparison program to run
822 -o --option OPT [+] pass option to comparison program 829 -o --option OPT [+] pass option to comparison program
823 -r --rev REV [+] revision 830 -r --rev REV [+] revision
824 -c --change REV change made by revision 831 -c --change REV change made by revision
832 --per-file compare each file instead of revision snapshots
833 --confirm prompt user before each external program invocation
825 --patch compare patches for two revisions 834 --patch compare patches for two revisions
826 -I --include PATTERN [+] include names matching the given patterns 835 -I --include PATTERN [+] include names matching the given patterns
827 -X --exclude PATTERN [+] exclude names matching the given patterns 836 -X --exclude PATTERN [+] exclude names matching the given patterns
828 -S --subrepos recurse into subrepositories 837 -S --subrepos recurse into subrepositories
829 838