comparison tests/test-extension.t @ 41584:a4cd77a425a3

extdiff: support tools that can be run simultaneously
author Ludovic Chabant <ludovic@chabant.com>
date Sat, 02 Feb 2019 21:58:49 -0800
parents b0865b5919c6
children 9897e95b0b4a
comparison
equal deleted inserted replaced
41582:7b2580e0dbbd 41584:a4cd77a425a3
821 those revisions. If only one revision is specified then that revision is 821 those revisions. If only one revision is specified then that revision is
822 compared to the working directory, and, when no revisions are specified, 822 compared to the working directory, and, when no revisions are specified,
823 the working directory files are compared to its parent. 823 the working directory files are compared to its parent.
824 824
825 The --per-file option runs the external program repeatedly on each file to 825 The --per-file option runs the external program repeatedly on each file to
826 diff, instead of once on two directories. 826 diff, instead of once on two directories. By default, this happens one by
827 one, where the next file diff is open in the external program only once
828 the previous external program (for the previous file diff) has exited. If
829 the external program has a graphical interface, it can open all the file
830 diffs at once instead of one by one. See 'hg help -e extdiff' for
831 information about how to tell Mercurial that a given program has a
832 graphical interface.
827 833
828 The --confirm option will prompt the user before each invocation of the 834 The --confirm option will prompt the user before each invocation of the
829 external program. It is ignored if --per-file isn't specified. 835 external program. It is ignored if --per-file isn't specified.
830 836
831 (use 'hg help -e extdiff' to show help for the extdiff extension) 837 (use 'hg help -e extdiff' to show help for the extdiff extension)
902 [extdiff] 908 [extdiff]
903 kdiff3 = 909 kdiff3 =
904 910
905 [diff-tools] 911 [diff-tools]
906 kdiff3.diffargs=--L1 '$plabel1' --L2 '$clabel' $parent $child 912 kdiff3.diffargs=--L1 '$plabel1' --L2 '$clabel' $parent $child
913
914 If a program has a graphical interface, it might be interesting to tell
915 Mercurial about it. It will prevent the program from being mistakenly used in
916 a terminal-only environment (such as an SSH terminal session), and will make
917 'hg extdiff --per-file' open multiple file diffs at once instead of one by one
918 (if you still want to open file diffs one by one, you can use the --confirm
919 option).
920
921 Declaring that a tool has a graphical interface can be done with the "gui"
922 flag next to where "diffargs" are specified:
923
924 [diff-tools]
925 kdiff3.diffargs=--L1 '$plabel1' --L2 '$clabel' $parent $child
926 kdiff3.gui = true
907 927
908 You can use -I/-X and list of file or directory names like normal 'hg diff' 928 You can use -I/-X and list of file or directory names like normal 'hg diff'
909 command. The extdiff extension makes snapshots of only needed files, so 929 command. The extdiff extension makes snapshots of only needed files, so
910 running the external diff program will actually be pretty fast (at least 930 running the external diff program will actually be pretty fast (at least
911 faster than having to compare the entire tree). 931 faster than having to compare the entire tree).