Show More
@@ -2133,7 +2133,7 b' def heads(ui, repo, *branchrevs, **opts)' | |||
|
2133 | 2133 | displayer.show(ctx) |
|
2134 | 2134 | displayer.close() |
|
2135 | 2135 | |
|
2136 | def help_(ui, name=None, with_version=False, unknowncmd=False, full=True): | |
|
2136 | def help_(ui, name=None, with_version=False, unknowncmd=False, full=True, **opts): | |
|
2137 | 2137 | """show help for a given topic or a help overview |
|
2138 | 2138 | |
|
2139 | 2139 | With no arguments, print a list of commands with short help messages. |
@@ -2332,6 +2332,8 b' def help_(ui, name=None, with_version=Fa' | |||
|
2332 | 2332 | i = None |
|
2333 | 2333 | if unknowncmd: |
|
2334 | 2334 | queries = (helpextcmd,) |
|
2335 | elif opts.get('extension'): | |
|
2336 | queries = (helpext,) | |
|
2335 | 2337 | else: |
|
2336 | 2338 | queries = (helptopic, helpcmd, helpext, helpextcmd) |
|
2337 | 2339 | for f in queries: |
@@ -4705,7 +4707,9 b' table = {' | |||
|
4705 | 4707 | _('show normal and closed branch heads')), |
|
4706 | 4708 | ] + templateopts, |
|
4707 | 4709 | _('[-ac] [-r STARTREV] [REV]...')), |
|
4708 |
"help": (help_, |
|
|
4710 | "help": (help_, | |
|
4711 | [('e', 'extension', None, _('show only help for extensions'))], | |
|
4712 | _('[-e] [TOPIC]')), | |
|
4709 | 4713 | "identify|id": |
|
4710 | 4714 | (identify, |
|
4711 | 4715 | [('r', 'rev', '', |
@@ -10,6 +10,6 b'' | |||
|
10 | 10 | $ hg -q help help |
|
11 | 11 | *** failed to import extension badext from $TESTTMP/badext.py: bit bucket overflow |
|
12 | 12 | *** failed to import extension badext2: No module named badext2 |
|
13 | hg help [TOPIC] | |
|
13 | hg help [-e] [TOPIC] | |
|
14 | 14 | |
|
15 | 15 | show help for a given topic or a help overview |
@@ -239,7 +239,7 b' Show all commands + options' | |||
|
239 | 239 | debugwireargs: three, four, five, ssh, remotecmd, insecure |
|
240 | 240 | grep: print0, all, text, follow, ignore-case, files-with-matches, line-number, rev, user, date, include, exclude |
|
241 | 241 | heads: rev, topo, active, closed, style, template |
|
242 | help: | |
|
242 | help: extension | |
|
243 | 243 | identify: rev, num, id, branch, tags, bookmarks |
|
244 | 244 | import: strip, base, force, no-commit, exact, import-branch, message, logfile, date, user, similarity |
|
245 | 245 | incoming: force, newest-first, bundle, rev, bookmarks, branch, patch, git, limit, no-merges, stat, style, template, ssh, remotecmd, insecure, subrepos |
@@ -232,6 +232,101 b" Check hgweb's load order:" | |||
|
232 | 232 | [+] marked option can be specified multiple times |
|
233 | 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 | 330 | Issue811: Problem loading extensions twice (by site and by user) |
|
236 | 331 | |
|
237 | 332 | $ debugpath=`pwd`/debugissue811.py |
General Comments 0
You need to be logged in to leave comments.
Login now