230 -h --help display help and exit |
230 -h --help display help and exit |
231 |
231 |
232 [+] marked option can be specified multiple times |
232 [+] marked option can be specified multiple times |
233 $ echo 'debugextension = !' >> $HGRCPATH |
233 $ echo 'debugextension = !' >> $HGRCPATH |
234 |
234 |
|
235 Extension module help vs command help: |
|
236 |
|
237 $ echo 'extdiff =' >> $HGRCPATH |
|
238 $ hg help extdiff |
|
239 hg extdiff [OPT]... [FILE]... |
|
240 |
|
241 use external program to diff repository (or selected files) |
|
242 |
|
243 Show differences between revisions for the specified files, using an |
|
244 external program. The default program used is diff, with default options |
|
245 "-Npru". |
|
246 |
|
247 To select a different program, use the -p/--program option. The program |
|
248 will be passed the names of two directories to compare. To pass additional |
|
249 options to the program, use -o/--option. These will be passed before the |
|
250 names of the directories to compare. |
|
251 |
|
252 When two revision arguments are given, then changes are shown between |
|
253 those revisions. If only one revision is specified then that revision is |
|
254 compared to the working directory, and, when no revisions are specified, |
|
255 the working directory files are compared to its parent. |
|
256 |
|
257 options: |
|
258 |
|
259 -p --program CMD comparison program to run |
|
260 -o --option OPT [+] pass option to comparison program |
|
261 -r --rev REV [+] revision |
|
262 -c --change REV change made by revision |
|
263 -I --include PATTERN [+] include names matching the given patterns |
|
264 -X --exclude PATTERN [+] exclude names matching the given patterns |
|
265 |
|
266 [+] marked option can be specified multiple times |
|
267 |
|
268 use "hg -v help extdiff" to show global options |
|
269 |
|
270 $ hg help --extension extdiff |
|
271 extdiff extension - command to allow external programs to compare revisions |
|
272 |
|
273 The extdiff Mercurial extension allows you to use external programs to compare |
|
274 revisions, or revision with working directory. The external diff programs are |
|
275 called with a configurable set of options and two non-option arguments: paths |
|
276 to directories containing snapshots of files to compare. |
|
277 |
|
278 The extdiff extension also allows to configure new diff commands, so you do |
|
279 not need to type "hg extdiff -p kdiff3" always. |
|
280 |
|
281 [extdiff] |
|
282 # add new command that runs GNU diff(1) in 'context diff' mode |
|
283 cdiff = gdiff -Nprc5 |
|
284 ## or the old way: |
|
285 #cmd.cdiff = gdiff |
|
286 #opts.cdiff = -Nprc5 |
|
287 |
|
288 # add new command called vdiff, runs kdiff3 |
|
289 vdiff = kdiff3 |
|
290 |
|
291 # add new command called meld, runs meld (no need to name twice) |
|
292 meld = |
|
293 |
|
294 # add new command called vimdiff, runs gvimdiff with DirDiff plugin |
|
295 # (see http://www.vim.org/scripts/script.php?script_id=102) Non |
|
296 # English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in |
|
297 # your .vimrc |
|
298 vimdiff = gvim -f '+next' '+execute "DirDiff" argv(0) argv(1)' |
|
299 |
|
300 Tool arguments can include variables that are expanded at runtime: |
|
301 |
|
302 $parent1, $plabel1 - filename, descriptive label of first parent |
|
303 $child, $clabel - filename, descriptive label of child revision |
|
304 $parent2, $plabel2 - filename, descriptive label of second parent |
|
305 $root - repository root |
|
306 $parent is an alias for $parent1. |
|
307 |
|
308 The extdiff extension will look in your [diff-tools] and [merge-tools] |
|
309 sections for diff tool arguments, when none are specified in [extdiff]. |
|
310 |
|
311 [extdiff] |
|
312 kdiff3 = |
|
313 |
|
314 [diff-tools] |
|
315 kdiff3.diffargs=--L1 '$plabel1' --L2 '$clabel' $parent $child |
|
316 |
|
317 You can use -I/-X and list of file or directory names like normal "hg diff" |
|
318 command. The extdiff extension makes snapshots of only needed files, so |
|
319 running the external diff program will actually be pretty fast (at least |
|
320 faster than having to compare the entire tree). |
|
321 |
|
322 list of commands: |
|
323 |
|
324 extdiff use external program to diff repository (or selected files) |
|
325 |
|
326 use "hg -v help extdiff" to show builtin aliases and global options |
|
327 |
|
328 $ echo 'extdiff = !' >> $HGRCPATH |
|
329 |
235 Issue811: Problem loading extensions twice (by site and by user) |
330 Issue811: Problem loading extensions twice (by site and by user) |
236 |
331 |
237 $ debugpath=`pwd`/debugissue811.py |
332 $ debugpath=`pwd`/debugissue811.py |
238 $ cat > debugissue811.py <<EOF |
333 $ cat > debugissue811.py <<EOF |
239 > '''show all loaded extensions |
334 > '''show all loaded extensions |