Mercurial > public > mercurial-scm > hg-stable
annotate mercurial/help.py @ 8865:37d8a5ddd499
help: expand the extensions topic
author | C?dric Duval <cedricduval@free.fr> |
---|---|
date | Sat, 20 Jun 2009 20:55:50 +0200 |
parents | cad6370a15cb |
children | 20a25042fadc |
rev | line source |
---|---|
3795
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
1 # help.py - help data for mercurial |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
2 # |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
3 # Copyright 2006 Matt Mackall <mpm@selenic.com> |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
4 # |
8225
46293a0c7e9f
updated license to be explicit about GPL version 2
Martin Geisler <mg@lazybytes.net>
parents:
8159
diff
changeset
|
5 # This software may be used and distributed according to the terms of the |
46293a0c7e9f
updated license to be explicit about GPL version 2
Martin Geisler <mg@lazybytes.net>
parents:
8159
diff
changeset
|
6 # GNU General Public License version 2, incorporated herein by reference. |
3795
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
7 |
8863
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
8 import os, sys |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
9 from i18n import _, gettext |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
10 import extensions |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
11 |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
12 |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
13 # borrowed from pydoc |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
14 def pathdirs(): |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
15 '''Convert sys.path into a list of absolute, existing, unique paths.''' |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
16 dirs = [] |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
17 normdirs = [] |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
18 for dir in sys.path: |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
19 dir = os.path.abspath(dir or '.') |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
20 normdir = os.path.normcase(dir) |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
21 if normdir not in normdirs and os.path.isdir(dir): |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
22 dirs.append(dir) |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
23 normdirs.append(normdir) |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
24 return dirs |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
25 |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
26 # loosely inspired by pydoc.source_synopsis() |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
27 # rewritten to handle ''' as well as """ |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
28 # and to return the whole text instead of just the synopsis |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
29 def moduledoc(file): |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
30 '''Return the top python documentation for the given file''' |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
31 result = [] |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
32 |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
33 line = file.readline() |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
34 while line[:1] == '#' or not line.strip(): |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
35 line = file.readline() |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
36 if not line: break |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
37 |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
38 start = line[:3] |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
39 if start == '"""' or start == "'''": |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
40 line = line[3:] |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
41 while line: |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
42 if line.rstrip().endswith(start): |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
43 line = line.split(start)[0] |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
44 if line: |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
45 result.append(line) |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
46 break |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
47 elif not line: |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
48 return None # unmatched delimiter |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
49 result.append(line) |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
50 line = file.readline() |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
51 else: |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
52 return None |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
53 |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
54 return ''.join(result) |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
55 |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
56 def additionalextensions(): |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
57 '''Find the extensions shipped with Mercurial but not enabled |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
58 |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
59 Returns extensions names and descriptions, and the max name length |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
60 ''' |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
61 exts = {} |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
62 maxlength = 0 |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
63 |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
64 for dir in filter(os.path.isdir, |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
65 (os.path.join(pd, 'hgext') for pd in pathdirs())): |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
66 for e in os.listdir(dir): |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
67 if e.endswith('.py'): |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
68 name = e.rsplit('.', 1)[0] |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
69 path = os.path.join(dir, e) |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
70 else: |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
71 name = e |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
72 path = os.path.join(dir, e, '__init__.py') |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
73 |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
74 if name in exts or name == '__init__' or not os.path.exists(path): |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
75 continue |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
76 |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
77 try: |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
78 extensions.find(name) |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
79 except KeyError: |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
80 pass |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
81 else: |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
82 continue # enabled extension |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
83 |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
84 try: |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
85 file = open(path) |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
86 except IOError: |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
87 continue |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
88 else: |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
89 doc = moduledoc(file) |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
90 file.close() |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
91 |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
92 if doc: # extracting localized synopsis |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
93 exts[name] = gettext(doc).splitlines()[0] |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
94 else: |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
95 exts[name] = _('(no help text available)') |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
96 if len(name) > maxlength: |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
97 maxlength = len(name) |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
98 |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
99 return exts, maxlength |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
100 |
8864
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
101 def enabledextensions(): |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
102 '''Return the list of enabled extensions, and max name length''' |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
103 enabled = list(extensions.extensions()) |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
104 exts = {} |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
105 maxlength = 0 |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
106 |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
107 if enabled: |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
108 exthelps = [] |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
109 for ename, ext in enabled: |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
110 doc = (gettext(ext.__doc__) or _('(no help text available)')) |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
111 ename = ename.split('.')[-1] |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
112 maxlength = max(len(ename), maxlength) |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
113 exts[ename] = doc.splitlines(0)[0].strip() |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
114 |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
115 return exts, maxlength |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
116 |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
117 def extensionslisting(header, exts, maxlength): |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
118 '''Return a text listing of the given extensions''' |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
119 result = '' |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
120 |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
121 if exts: |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
122 result += '\n%s\n\n' % header |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
123 for name, desc in sorted(exts.iteritems()): |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
124 result += ' %s %s\n' % (name.ljust(maxlength), desc) |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
125 |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
126 return result |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
127 |
8863
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
128 def topicextensions(): |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
129 doc = _(r''' |
8865
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
130 Mercurial has a mechanism for adding new features through the |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
131 use of extensions. Extensions may bring new commands, or new |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
132 hooks, or change some behaviors of Mercurial. |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
133 |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
134 Extensions are not loaded by default for a variety of reasons, |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
135 they may be meant for an advanced usage or provide potentially |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
136 dangerous commands (eg. mq or rebase allow to rewrite history), |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
137 they might not be yet ready for prime-time, or they may alter |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
138 some usual behaviors of stock Mercurial. It is thus up to the |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
139 user to activate the extensions as needed. |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
140 |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
141 To enable an extension "foo" which is either shipped with |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
142 Mercurial or in the Python search path, create an entry for |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
143 it in your hgrc, like this: |
8863
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
144 |
8865
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
145 [extensions] |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
146 foo = |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
147 |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
148 You may also specify the full path where an extension resides: |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
149 |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
150 [extensions] |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
151 myfeature = ~/.hgext/myfeature.py |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
152 |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
153 To explicitly disable an extension which is enabled in an hgrc |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
154 of broader scope, prepend its path with !: |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
155 |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
156 [extensions] |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
157 # disabling extension bar residing in /ext/path |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
158 hgext.bar = !/path/to/extension/bar.py |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
159 # ditto, but no path was supplied for extension baz |
37d8a5ddd499
help: expand the extensions topic
C?dric Duval <cedricduval@free.fr>
parents:
8864
diff
changeset
|
160 hgext.baz = ! |
8863
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
161 ''') |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
162 |
8864
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
163 exts, maxlength = enabledextensions() |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
164 doc += extensionslisting(_('enabled extensions:'), exts, maxlength) |
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
165 |
8863
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
166 exts, maxlength = additionalextensions() |
8864
cad6370a15cb
help: refactor extensions listing, and show enabled ones in the dedicated topic
C?dric Duval <cedricduval@free.fr>
parents:
8863
diff
changeset
|
167 doc += extensionslisting(_('non-enabled extensions:'), exts, maxlength) |
8863
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
168 |
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
169 return doc |
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
170 |
6654
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
171 helptable = ( |
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
172 (["dates"], _("Date Formats"), |
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
173 _(r''' |
7764
14a42208d8af
help: better formatting in "Date Formats" section
timeless <timeless@gmail.com>
parents:
7693
diff
changeset
|
174 Some commands allow the user to specify a date, e.g.: |
14a42208d8af
help: better formatting in "Date Formats" section
timeless <timeless@gmail.com>
parents:
7693
diff
changeset
|
175 * backout, commit, import, tag: Specify the commit date. |
14a42208d8af
help: better formatting in "Date Formats" section
timeless <timeless@gmail.com>
parents:
7693
diff
changeset
|
176 * log, revert, update: Select revision(s) by date. |
6163
1f733c2f0165
Document log date ranges and mention 'hg help dates' for all commands (issue998)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
6009
diff
changeset
|
177 |
1f733c2f0165
Document log date ranges and mention 'hg help dates' for all commands (issue998)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
6009
diff
changeset
|
178 Many date formats are valid. Here are some examples: |
3795
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
179 |
3811 | 180 "Wed Dec 6 13:18:29 2006" (local timezone assumed) |
181 "Dec 6 13:18 -0600" (year assumed, time offset provided) | |
182 "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000) | |
183 "Dec 6" (midnight) | |
184 "13:18" (today assumed) | |
185 "3:39" (3:39AM assumed) | |
186 "3:39pm" (15:39) | |
6773 | 187 "2006-12-06 13:18:29" (ISO 8601 format) |
3811 | 188 "2006-12-6 13:18" |
189 "2006-12-6" | |
190 "12-6" | |
191 "12/6" | |
192 "12/6/6" (Dec 6 2006) | |
3795
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
193 |
3811 | 194 Lastly, there is Mercurial's internal format: |
3795
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
195 |
3811 | 196 "1165432709 0" (Wed Dec 6 13:18:29 2006 UTC) |
3795
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
197 |
17a11f4ff260
Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
198 This is the internal representation format for dates. unixtime is |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
199 the number of seconds since the epoch (1970-01-01 00:00 UTC). |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
200 offset is the offset of the local timezone, in seconds west of UTC |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
201 (negative if the timezone is east of UTC). |
6163
1f733c2f0165
Document log date ranges and mention 'hg help dates' for all commands (issue998)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
6009
diff
changeset
|
202 |
1f733c2f0165
Document log date ranges and mention 'hg help dates' for all commands (issue998)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
6009
diff
changeset
|
203 The log command also accepts date ranges: |
1f733c2f0165
Document log date ranges and mention 'hg help dates' for all commands (issue998)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
6009
diff
changeset
|
204 |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
205 "<{datetime}" - at or before a given date/time |
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
206 ">{datetime}" - on or after a given date/time |
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
207 "{datetime} to {datetime}" - a date range, inclusive |
6163
1f733c2f0165
Document log date ranges and mention 'hg help dates' for all commands (issue998)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
6009
diff
changeset
|
208 "-{days}" - within a given number of days of today |
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
209 ''')), |
6654
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
210 |
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
211 (["patterns"], _("File Name Patterns"), |
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
212 _(r''' |
6654
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
213 Mercurial accepts several notations for identifying one or more |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
214 files at a time. |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
215 |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
216 By default, Mercurial treats filenames as shell-style extended |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
217 glob patterns. |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
218 |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
219 Alternate pattern notations must be specified explicitly. |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
220 |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
221 To use a plain path name without any pattern matching, start it |
7808
5b010dae99c3
help: get rid of double spaces
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7806
diff
changeset
|
222 with "path:". These path names must completely match starting at |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
223 the current repository root. |
6654
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
224 |
7808
5b010dae99c3
help: get rid of double spaces
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7806
diff
changeset
|
225 To use an extended glob, start a name with "glob:". Globs are |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
226 rooted at the current directory; a glob such as "*.c" will only |
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
227 match files in the current directory ending with ".c". |
6654
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
228 |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
229 The supported glob syntax extensions are "**" to match any string |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
230 across path separators and "{a,b}" to mean "a or b". |
3799 | 231 |
6654
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
232 To use a Perl/Python regular expression, start a name with "re:". |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
233 Regexp pattern matching is anchored at the root of the repository. |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
234 |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
235 Plain examples: |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
236 |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
237 path:foo/bar a name bar in a directory named foo in the root of |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
238 the repository |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
239 path:path:name a file or directory named "path:name" |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
240 |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
241 Glob examples: |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
242 |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
243 glob:*.c any name ending in ".c" in the current directory |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
244 *.c any name ending in ".c" in the current directory |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
245 **.c any name ending in ".c" in any subdirectory of the |
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
246 current directory including itself. |
6654
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
247 foo/*.c any name ending in ".c" in the directory foo |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
248 foo/**.c any name ending in ".c" in any subdirectory of foo |
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
249 including itself. |
6654
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
250 |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
251 Regexp examples: |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
252 |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
253 re:.*\.c$ any name ending in ".c", anywhere in the repository |
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
254 |
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
255 ''')), |
6654
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
256 |
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
257 (['environment', 'env'], _('Environment Variables'), |
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
258 _(r''' |
4686
849f011dbf79
Remember path to 'hg' executable and pass to external tools and hooks as $HG.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3913
diff
changeset
|
259 HG:: |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
260 Path to the 'hg' executable, automatically passed when running |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
261 hooks, extensions or external tools. If unset or empty, this is |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
262 the hg executable's name if it's frozen, or an executable named |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
263 'hg' (with %PATHEXT% [defaulting to COM/EXE/BAT/CMD] extensions on |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
264 Windows) is searched. |
4686
849f011dbf79
Remember path to 'hg' executable and pass to external tools and hooks as $HG.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3913
diff
changeset
|
265 |
3798 | 266 HGEDITOR:: |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
267 This is the name of the editor to run when committing. See EDITOR. |
3798 | 268 |
269 (deprecated, use .hgrc) | |
270 | |
271 HGENCODING:: | |
272 This overrides the default locale setting detected by Mercurial. | |
273 This setting is used to convert data including usernames, | |
274 changeset descriptions, tag names, and branches. This setting can | |
275 be overridden with the --encoding command-line option. | |
276 | |
277 HGENCODINGMODE:: | |
278 This sets Mercurial's behavior for handling unknown characters | |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
279 while transcoding user input. The default is "strict", which |
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
280 causes Mercurial to abort if it can't map a character. Other |
3798 | 281 settings include "replace", which replaces unknown characters, and |
282 "ignore", which drops them. This setting can be overridden with | |
283 the --encodingmode command-line option. | |
284 | |
285 HGMERGE:: | |
286 An executable to use for resolving merge conflicts. The program | |
287 will be executed with three arguments: local file, remote file, | |
288 ancestor file. | |
289 | |
290 (deprecated, use .hgrc) | |
291 | |
292 HGRCPATH:: | |
7808
5b010dae99c3
help: get rid of double spaces
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7806
diff
changeset
|
293 A list of files or directories to search for hgrc files. Item |
5b010dae99c3
help: get rid of double spaces
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7806
diff
changeset
|
294 separator is ":" on Unix, ";" on Windows. If HGRCPATH is not set, |
5b010dae99c3
help: get rid of double spaces
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7806
diff
changeset
|
295 platform default search path is used. If empty, only the .hg/hgrc |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
296 from the current repository is read. |
3798 | 297 |
7805
cf6ec23a1bb5
help: better explanation for some of the environment variables
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7804
diff
changeset
|
298 For each element in HGRCPATH: |
7904
fef5f3ef84c4
Clarify the usage of HGRCPATH
Dongsheng Song <dongsheng.song@gmail.com>
parents:
7888
diff
changeset
|
299 * if it's a directory, all files ending with .rc are added |
fef5f3ef84c4
Clarify the usage of HGRCPATH
Dongsheng Song <dongsheng.song@gmail.com>
parents:
7888
diff
changeset
|
300 * otherwise, the file itself will be added |
3798 | 301 |
302 HGUSER:: | |
7805
cf6ec23a1bb5
help: better explanation for some of the environment variables
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7804
diff
changeset
|
303 This is the string used as the author of a commit. If not set, |
cf6ec23a1bb5
help: better explanation for some of the environment variables
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7804
diff
changeset
|
304 available values will be considered in this order: |
cf6ec23a1bb5
help: better explanation for some of the environment variables
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7804
diff
changeset
|
305 |
cf6ec23a1bb5
help: better explanation for some of the environment variables
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7804
diff
changeset
|
306 * HGUSER (deprecated) |
cf6ec23a1bb5
help: better explanation for some of the environment variables
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7804
diff
changeset
|
307 * hgrc files from the HGRCPATH |
cf6ec23a1bb5
help: better explanation for some of the environment variables
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7804
diff
changeset
|
308 * EMAIL |
cf6ec23a1bb5
help: better explanation for some of the environment variables
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7804
diff
changeset
|
309 * interactive prompt |
cf6ec23a1bb5
help: better explanation for some of the environment variables
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7804
diff
changeset
|
310 * LOGNAME (with '@hostname' appended) |
3798 | 311 |
312 (deprecated, use .hgrc) | |
313 | |
314 EMAIL:: | |
7805
cf6ec23a1bb5
help: better explanation for some of the environment variables
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7804
diff
changeset
|
315 May be used as the author of a commit; see HGUSER. |
3798 | 316 |
317 LOGNAME:: | |
7805
cf6ec23a1bb5
help: better explanation for some of the environment variables
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7804
diff
changeset
|
318 May be used as the author of a commit; see HGUSER. |
3798 | 319 |
5660
3c80ecdc1bcd
Use VISUAL in addition to EDITOR when choosing the editor to use.
Osku Salerma <osku@iki.fi>
parents:
5062
diff
changeset
|
320 VISUAL:: |
3c80ecdc1bcd
Use VISUAL in addition to EDITOR when choosing the editor to use.
Osku Salerma <osku@iki.fi>
parents:
5062
diff
changeset
|
321 This is the name of the editor to use when committing. See EDITOR. |
3c80ecdc1bcd
Use VISUAL in addition to EDITOR when choosing the editor to use.
Osku Salerma <osku@iki.fi>
parents:
5062
diff
changeset
|
322 |
3798 | 323 EDITOR:: |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
324 Sometimes Mercurial needs to open a text file in an editor for a |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
325 user to modify, for example when writing commit messages. The |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
326 editor it uses is determined by looking at the environment |
6009
f077815932ce
filemerge: remove the hgmerge script
Matt Mackall <mpm@selenic.com>
parents:
5660
diff
changeset
|
327 variables HGEDITOR, VISUAL and EDITOR, in that order. The first |
f077815932ce
filemerge: remove the hgmerge script
Matt Mackall <mpm@selenic.com>
parents:
5660
diff
changeset
|
328 non-empty one is chosen. If all of them are empty, the editor |
5660
3c80ecdc1bcd
Use VISUAL in addition to EDITOR when choosing the editor to use.
Osku Salerma <osku@iki.fi>
parents:
5062
diff
changeset
|
329 defaults to 'vi'. |
3798 | 330 |
331 PYTHONPATH:: | |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
332 This is used by Python to find imported modules and may need to be |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
333 set appropriately if this Mercurial is not installed system-wide. |
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
334 ''')), |
6655
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
335 |
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
336 (['revs', 'revisions'], _('Specifying Single Revisions'), |
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
337 _(r''' |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
338 Mercurial supports several ways to specify individual revisions. |
6655
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
339 |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
340 A plain integer is treated as a revision number. Negative integers |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
341 are treated as topological offsets from the tip, with -1 denoting |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
342 the tip. As such, negative numbers are only useful if you've |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
343 memorized your local tree numbers and want to save typing a single |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
344 digit. This editor suggests copy and paste. |
6655
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
345 |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
346 A 40-digit hexadecimal string is treated as a unique revision |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
347 identifier. |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
348 |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
349 A hexadecimal string less than 40 characters long is treated as a |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
350 unique revision identifier, and referred to as a short-form |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
351 identifier. A short-form identifier is only valid if it is the |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
352 prefix of exactly one full-length identifier. |
6655
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
353 |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
354 Any other string is treated as a tag name, which is a symbolic |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
355 name associated with a revision identifier. Tag names may not |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
356 contain the ":" character. |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
357 |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
358 The reserved name "tip" is a special tag that always identifies |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
359 the most recent revision. |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
360 |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
361 The reserved name "null" indicates the null revision. This is the |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
362 revision of an empty repository, and the parent of revision 0. |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
363 |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
364 The reserved name "." indicates the working directory parent. If |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
365 no working directory is checked out, it is equivalent to null. If |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
366 an uncommitted merge is in progress, "." is the revision of the |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
367 first parent. |
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
368 ''')), |
6655
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
369 |
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
370 (['mrevs', 'multirevs'], _('Specifying Multiple Revisions'), |
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
371 _(r''' |
6655
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
372 When Mercurial accepts more than one revision, they may be |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
373 specified individually, or provided as a topologically continuous |
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
374 range, separated by the ":" character. |
6655
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
375 |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
376 The syntax of range notation is [BEGIN]:[END], where BEGIN and END |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
377 are revision identifiers. Both BEGIN and END are optional. If |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
378 BEGIN is not specified, it defaults to revision number 0. If END |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
379 is not specified, it defaults to the tip. The range ":" thus means |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
380 "all revisions". |
6655
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
381 |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
382 If BEGIN is greater than END, revisions are treated in reverse |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
383 order. |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
384 |
ab798a37b846
help: move "revision syntax" help topics into online help
Johannes Stezenbach <js@sig21.net>
parents:
6654
diff
changeset
|
385 A range acts as a closed interval. This means that a range of 3:5 |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
386 gives 3, 4 and 5. Similarly, a range of 9:6 gives 9, 8, 7, and 6. |
7013
f56e788fa292
i18n: mark help strings for translation
Martin Geisler <mg@daimi.au.dk>
parents:
7012
diff
changeset
|
387 ''')), |
7293
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
388 |
7387 | 389 (['diffs'], _('Diff Formats'), |
7293
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
390 _(r''' |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
391 Mercurial's default format for showing changes between two |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
392 versions of a file is compatible with the unified format of GNU |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
393 diff, which can be used by GNU patch and many other standard |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
394 tools. |
7293
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
395 |
7387 | 396 While this standard format is often enough, it does not encode the |
397 following information: | |
7328
3909e2c2622b
Enhance gitdiffs help text
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7298
diff
changeset
|
398 |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
399 - executable status and other permission bits |
7328
3909e2c2622b
Enhance gitdiffs help text
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7298
diff
changeset
|
400 - copy or rename information |
3909e2c2622b
Enhance gitdiffs help text
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7298
diff
changeset
|
401 - changes in binary files |
3909e2c2622b
Enhance gitdiffs help text
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7298
diff
changeset
|
402 - creation or deletion of empty files |
7293
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
403 |
7387 | 404 Mercurial also supports the extended diff format from the git VCS |
405 which addresses these limitations. The git diff format is not | |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
406 produced by default because a few widespread tools still do not |
7387 | 407 understand this format. |
7328
3909e2c2622b
Enhance gitdiffs help text
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7298
diff
changeset
|
408 |
7387 | 409 This means that when generating diffs from a Mercurial repository |
7328
3909e2c2622b
Enhance gitdiffs help text
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7298
diff
changeset
|
410 (e.g. with "hg export"), you should be careful about things like |
3909e2c2622b
Enhance gitdiffs help text
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7298
diff
changeset
|
411 file copies and renames or other things mentioned above, because |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
412 when applying a standard diff to a different repository, this |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
413 extra information is lost. Mercurial's internal operations (like |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
414 push and pull) are not affected by this, because they use an |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
415 internal binary format for communicating changes. |
7328
3909e2c2622b
Enhance gitdiffs help text
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7298
diff
changeset
|
416 |
3909e2c2622b
Enhance gitdiffs help text
Thomas Arendsen Hein <thomas@intevation.de>
parents:
7298
diff
changeset
|
417 To make Mercurial produce the git extended diff format, use the |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
418 --git option available for many commands, or set 'git = True' in |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
419 the [diff] section of your hgrc. You do not need to set this |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
420 option when importing diffs in this format or using them in the mq |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
421 extension. |
7293
3549659450e6
help: add a topic on git diffs (issue1352)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7013
diff
changeset
|
422 ''')), |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
423 (['templating'], _('Template Usage'), |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
424 _(r''' |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
425 Mercurial allows you to customize output of commands through |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
426 templates. You can either pass in a template from the command |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
427 line, via the --template option, or select an existing |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
428 template-style (--style). |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
429 |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
430 You can customize output for any "log-like" command: log, |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
431 outgoing, incoming, tip, parents, heads and glog. |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
432 |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
433 Three styles are packaged with Mercurial: default (the style used |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
434 when no explicit preference is passed), compact and changelog. |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
435 Usage: |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
436 |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
437 $ hg log -r1 --style changelog |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
438 |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
439 A template is a piece of text, with markup to invoke variable |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
440 expansion: |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
441 |
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
442 $ hg log -r1 --template "{node}\n" |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
443 b56ce7b07c52de7d5fd79fb89701ea538af65746 |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
444 |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
445 Strings in curly braces are called keywords. The availability of |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
446 keywords depends on the exact context of the templater. These |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
447 keywords are usually available for templating a log-like command: |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
448 |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
449 - author: String. The unmodified author of the changeset. |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
450 - branches: String. The name of the branch on which the changeset |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
451 was committed. Will be empty if the branch name was default. |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
452 - date: Date information. The date when the changeset was committed. |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
453 - desc: String. The text of the changeset description. |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
454 - diffstat: String. Statistics of changes with the following |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
455 format: "modified files: +added/-removed lines" |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
456 - files: List of strings. All files modified, added, or removed by |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
457 this changeset. |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
458 - file_adds: List of strings. Files added by this changeset. |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
459 - file_mods: List of strings. Files modified by this changeset. |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
460 - file_dels: List of strings. Files removed by this changeset. |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
461 - node: String. The changeset identification hash, as a |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
462 40-character hexadecimal string. |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
463 - parents: List of strings. The parents of the changeset. |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
464 - rev: Integer. The repository-local changeset revision number. |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
465 - tags: List of strings. Any tags associated with the changeset. |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
466 |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
467 The "date" keyword does not produce human-readable output. If you |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
468 want to use a date in your output, you can use a filter to process |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
469 it. Filters are functions which return a string based on the input |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
470 variable. You can also use a chain of filters to get the desired |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
471 output: |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
472 |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
473 $ hg tip --template "{date|isodate}\n" |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
474 2008-08-21 18:22 +0000 |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
475 |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
476 List of filters: |
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
477 |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
478 - addbreaks: Any text. Add an XHTML "<br />" tag before the end of |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
479 every line except the last. |
7806
6d0cf2a2acad
help: better explanations for some of the template filters
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7805
diff
changeset
|
480 - age: Date. Returns a human-readable date/time difference between |
6d0cf2a2acad
help: better explanations for some of the template filters
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7805
diff
changeset
|
481 the given date/time and the current date/time. |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
482 - basename: Any text. Treats the text as a path, and returns the |
7806
6d0cf2a2acad
help: better explanations for some of the template filters
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7805
diff
changeset
|
483 last component of the path after splitting by the path |
8668
aea3a23151bd
fixed typos found in translatable strings
Martin Geisler <mg@lazybytes.net>
parents:
8591
diff
changeset
|
484 separator (ignoring trailing separators). For example, |
7806
6d0cf2a2acad
help: better explanations for some of the template filters
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7805
diff
changeset
|
485 "foo/bar/baz" becomes "baz" and "foo/bar//" becomes "bar". |
8159
19f22977e635
help: document stripdir template filter
Martin Geisler <mg@lazybytes.net>
parents:
8005
diff
changeset
|
486 - stripdir: Treat the text as path and strip a directory level, if |
19f22977e635
help: document stripdir template filter
Martin Geisler <mg@lazybytes.net>
parents:
8005
diff
changeset
|
487 possible. For example, "foo" and "foo/bar" becomes "foo". |
7806
6d0cf2a2acad
help: better explanations for some of the template filters
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7805
diff
changeset
|
488 - date: Date. Returns a date in a Unix date format, including |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
489 the timezone: "Mon Sep 04 15:13:13 2006 0700". |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
490 - domain: Any text. Finds the first string that looks like an |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
491 email address, and extracts just the domain component. |
7806
6d0cf2a2acad
help: better explanations for some of the template filters
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7805
diff
changeset
|
492 Example: 'User <user@example.com>' becomes 'example.com'. |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
493 - email: Any text. Extracts the first string that looks like an |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
494 email address. Example: 'User <user@example.com>' becomes |
7806
6d0cf2a2acad
help: better explanations for some of the template filters
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7805
diff
changeset
|
495 'user@example.com'. |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
496 - escape: Any text. Replaces the special XML/XHTML characters "&", |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
497 "<" and ">" with XML entities. |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
498 - fill68: Any text. Wraps the text to fit in 68 columns. |
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
499 - fill76: Any text. Wraps the text to fit in 76 columns. |
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
500 - firstline: Any text. Returns the first line of text. |
8237
1320459daa91
help: document nonempty template filter.
Martin Geisler <mg@lazybytes.net>
parents:
8225
diff
changeset
|
501 - nonempty: Any text. Returns '(none)' if the string is empty. |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
502 - hgdate: Date. Returns the date as a pair of numbers: |
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
503 "1157407993 25200" (Unix timestamp, timezone offset). |
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
504 - isodate: Date. Returns the date in ISO 8601 format. |
8591
08c93b07f5ad
templatefilters: add filter to convert date to local date (issue1674)
Henrik Stuart <hg@hstuart.dk>
parents:
8237
diff
changeset
|
505 - localdate: Date. Converts a date to local date. |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
506 - obfuscate: Any text. Returns the input text rendered as a |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
507 sequence of XML entities. |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
508 - person: Any text. Returns the text before an email address. |
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
509 - rfc822date: Date. Returns a date using the same format used |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
510 in email headers. |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
511 - short: Changeset hash. Returns the short form of a changeset |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
512 hash, i.e. a 12-byte hexadecimal string. |
7806
6d0cf2a2acad
help: better explanations for some of the template filters
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7805
diff
changeset
|
513 - shortdate: Date. Returns a date like "2006-09-18". |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
514 - strip: Any text. Strips all leading and trailing whitespace. |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
515 - tabindent: Any text. Returns the text, with every line except |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
516 the first starting with a tab character. |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
517 - urlescape: Any text. Escapes all "special" characters. For |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
518 example, "foo bar" becomes "foo%20bar". |
7678
b19850c7908a
help: some improvements for the templating topic
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7677
diff
changeset
|
519 - user: Any text. Returns the user portion of an email address. |
7677
6a0bc2dc9da6
help: add a topic about some of the templating features
Alexander Solovyov <piranha@piranha.org.ua>
parents:
7387
diff
changeset
|
520 ''')), |
7693
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
521 |
7979
6b04f12d2831
commands, help: consistently write 'URL' in upper-case
Martin Geisler <mg@daimi.au.dk>
parents:
7978
diff
changeset
|
522 (['urls'], _('URL Paths'), |
7693
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
523 _(r''' |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
524 Valid URLs are of the form: |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
525 |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
526 local/filesystem/path (or file://local/filesystem/path) |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
527 http://[user[:pass]@]host[:port]/[path] |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
528 https://[user[:pass]@]host[:port]/[path] |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
529 ssh://[user[:pass]@]host[:port]/[path] |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
530 |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
531 Paths in the local filesystem can either point to Mercurial |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
532 repositories or to bundle files (as created by 'hg bundle' or |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
533 'hg incoming --bundle'). |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
534 |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
535 An optional identifier after # indicates a particular branch, tag, |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
536 or changeset to use from the remote repository. |
7693
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
537 |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
538 Some features, such as pushing to http:// and https:// URLs are |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
539 only possible if the feature is explicitly enabled on the remote |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
540 Mercurial server. |
7693
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
541 |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
542 Some notes about using SSH with Mercurial: |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
543 - SSH requires an accessible shell account on the destination |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
544 machine and a copy of hg in the remote path or specified with as |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
545 remotecmd. |
7693
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
546 - path is relative to the remote user's home directory by default. |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
547 Use an extra slash at the start of a path to specify an absolute path: |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
548 ssh://example.com//tmp/repository |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
549 - Mercurial doesn't use its own compression via SSH; the right |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
550 thing to do is to configure it in your ~/.ssh/config, e.g.: |
7693
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
551 Host *.mylocalnetwork.example.com |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
552 Compression no |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
553 Host * |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
554 Compression yes |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
555 Alternatively specify "ssh -C" as your ssh command in your hgrc |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
556 or with the --ssh command line option. |
7693
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
557 |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
558 These URLs can all be stored in your hgrc with path aliases under |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
559 the [paths] section like so: |
7693
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
560 [paths] |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
561 alias1 = URL1 |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
562 alias2 = URL2 |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
563 ... |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
564 |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
565 You can then use the alias for any command that uses a URL (for |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
566 example 'hg pull alias1' would pull from the 'alias1' path). |
7693
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
567 |
7804
06afe0f9dbf8
help: some language fixes for help topics
timeless <timeless@gmail.com>
parents:
7764
diff
changeset
|
568 Two path aliases are special because they are used as defaults |
7979
6b04f12d2831
commands, help: consistently write 'URL' in upper-case
Martin Geisler <mg@daimi.au.dk>
parents:
7978
diff
changeset
|
569 when you do not provide the URL to a command: |
7693
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
570 |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
571 default: |
8005
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
572 When you create a repository with hg clone, the clone command |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
573 saves the location of the source repository as the new |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
574 repository's 'default' path. This is then used when you omit |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
575 path from push- and pull-like commands (including incoming and |
595baa7c726f
help: word-wrap help texts at 70 characters
Martin Geisler <mg@daimi.au.dk>
parents:
7979
diff
changeset
|
576 outgoing). |
7693
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
577 |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
578 default-push: |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
579 The push command will look for a path named 'default-push', and |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
580 prefer it over 'default' if both are defined. |
e040f9d6b2f3
consolidated url help into urls help topic and added information about path aliases
Bill Barry <after.fallout@gmail.com>
parents:
7678
diff
changeset
|
581 ''')), |
8863
7b19c3c0172b
help: adding a new help topic about extensions
C?dric Duval <cedricduval@free.fr>
parents:
8668
diff
changeset
|
582 (["extensions"], _("Using additional features"), topicextensions), |
6654
2713e42dcf4e
help: helptable is an ordered collection
Johannes Stezenbach <js@sig21.net>
parents:
6163
diff
changeset
|
583 ) |