annotate mercurial/help.py @ 3811:6fa11a9d7cac

Update dates help topic
author Matt Mackall <mpm@selenic.com>
date Wed, 06 Dec 2006 13:36:23 -0600
parents eb66d76c7746
children dbd828167384
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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 #
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
5 # This software may be used and distributed according to the terms
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
6 # of the GNU General Public License, incorporated herein by reference.
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
7
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
8 helptable = {
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
9 "dates|Date Formats":
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
10 r'''
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
11 Some commands (backout, commit, tag) allow the user to specify a date.
3811
6fa11a9d7cac Update dates help topic
Matt Mackall <mpm@selenic.com>
parents: 3799
diff changeset
12 Many date formats are acceptible. Here are some examples:
3795
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
13
3811
6fa11a9d7cac Update dates help topic
Matt Mackall <mpm@selenic.com>
parents: 3799
diff changeset
14 "Wed Dec 6 13:18:29 2006" (local timezone assumed)
6fa11a9d7cac Update dates help topic
Matt Mackall <mpm@selenic.com>
parents: 3799
diff changeset
15 "Dec 6 13:18 -0600" (year assumed, time offset provided)
6fa11a9d7cac Update dates help topic
Matt Mackall <mpm@selenic.com>
parents: 3799
diff changeset
16 "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000)
6fa11a9d7cac Update dates help topic
Matt Mackall <mpm@selenic.com>
parents: 3799
diff changeset
17 "Dec 6" (midnight)
6fa11a9d7cac Update dates help topic
Matt Mackall <mpm@selenic.com>
parents: 3799
diff changeset
18 "13:18" (today assumed)
6fa11a9d7cac Update dates help topic
Matt Mackall <mpm@selenic.com>
parents: 3799
diff changeset
19 "3:39" (3:39AM assumed)
6fa11a9d7cac Update dates help topic
Matt Mackall <mpm@selenic.com>
parents: 3799
diff changeset
20 "3:39pm" (15:39)
6fa11a9d7cac Update dates help topic
Matt Mackall <mpm@selenic.com>
parents: 3799
diff changeset
21 "2006-12-6 13:18:29" (ISO 8601 format)
6fa11a9d7cac Update dates help topic
Matt Mackall <mpm@selenic.com>
parents: 3799
diff changeset
22 "2006-12-6 13:18"
6fa11a9d7cac Update dates help topic
Matt Mackall <mpm@selenic.com>
parents: 3799
diff changeset
23 "2006-12-6"
6fa11a9d7cac Update dates help topic
Matt Mackall <mpm@selenic.com>
parents: 3799
diff changeset
24 "12-6"
6fa11a9d7cac Update dates help topic
Matt Mackall <mpm@selenic.com>
parents: 3799
diff changeset
25 "12/6"
6fa11a9d7cac Update dates help topic
Matt Mackall <mpm@selenic.com>
parents: 3799
diff changeset
26 "12/6/6" (Dec 6 2006)
6fa11a9d7cac Update dates help topic
Matt Mackall <mpm@selenic.com>
parents: 3799
diff changeset
27 "" (Jan 1 00:00:00 1970 UTC)
3795
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
28
3811
6fa11a9d7cac Update dates help topic
Matt Mackall <mpm@selenic.com>
parents: 3799
diff changeset
29 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
30
3811
6fa11a9d7cac Update dates help topic
Matt Mackall <mpm@selenic.com>
parents: 3799
diff changeset
31 "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
32
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
33 This is the internal representation format for dates. unixtime is
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
34 the number of seconds since the epoch (1970-01-01 00:00 UTC). offset
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
35 is the offset of the local timezone, in seconds west of UTC (negative
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
36 if the timezone is east of UTC).
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
37 ''',
3799
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
38
3798
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
39 'environment|env|Environment Variables':
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
40 r'''
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
41 HGEDITOR::
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
42 This is the name of the editor to use when committing. Defaults to the
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
43 value of EDITOR.
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
44
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
45 (deprecated, use .hgrc)
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
46
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
47 HGENCODING::
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
48 This overrides the default locale setting detected by Mercurial.
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
49 This setting is used to convert data including usernames,
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
50 changeset descriptions, tag names, and branches. This setting can
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
51 be overridden with the --encoding command-line option.
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
52
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
53 HGENCODINGMODE::
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
54 This sets Mercurial's behavior for handling unknown characters
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
55 while transcoding user inputs. The default is "strict", which
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
56 causes Mercurial to abort if it can't translate a character. Other
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
57 settings include "replace", which replaces unknown characters, and
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
58 "ignore", which drops them. This setting can be overridden with
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
59 the --encodingmode command-line option.
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
60
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
61 HGMERGE::
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
62 An executable to use for resolving merge conflicts. The program
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
63 will be executed with three arguments: local file, remote file,
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
64 ancestor file.
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
65
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
66 The default program is "hgmerge", which is a shell script provided
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
67 by Mercurial with some sensible defaults.
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
68
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
69 (deprecated, use .hgrc)
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
70
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
71 HGRCPATH::
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
72 A list of files or directories to search for hgrc files. Item
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
73 separator is ":" on Unix, ";" on Windows. If HGRCPATH is not set,
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
74 platform default search path is used. If empty, only .hg/hgrc of
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
75 current repository is read.
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
76
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
77 For each element in path, if a directory, all entries in directory
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
78 ending with ".rc" are added to path. Else, element itself is
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
79 added to path.
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
80
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
81 HGUSER::
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
82 This is the string used for the author of a commit.
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
83
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
84 (deprecated, use .hgrc)
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
85
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
86 EMAIL::
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
87 If HGUSER is not set, this will be used as the author for a commit.
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
88
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
89 LOGNAME::
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
90 If neither HGUSER nor EMAIL is set, LOGNAME will be used (with
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
91 '@hostname' appended) as the author value for a commit.
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
92
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
93 EDITOR::
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
94 This is the name of the editor used in the hgmerge script. It will be
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
95 used for commit messages if HGEDITOR isn't set. Defaults to 'vi'.
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
96
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
97 PYTHONPATH::
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
98 This is used by Python to find imported modules and may need to be set
6f0c42d50394 move environment topic
Matt Mackall <mpm@selenic.com>
parents: 3795
diff changeset
99 appropriately if Mercurial is not installed system-wide.
3799
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
100 ''',
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
101
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
102 "patterns|File Name Patterns": r'''
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
103 Mercurial accepts several notations for identifying one or more
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
104 files at a time.
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
105
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
106 By default, Mercurial treats filenames as shell-style extended
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
107 glob patterns.
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
108
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
109 Alternate pattern notations must be specified explicitly.
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
110
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
111 To use a plain path name without any pattern matching, start a
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
112 name with "path:". These path names must match completely, from
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
113 the root of the current repository.
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
114
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
115 To use an extended glob, start a name with "glob:". Globs are
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
116 rooted at the current directory; a glob such as "*.c" will match
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
117 files ending in ".c" in the current directory only.
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
118
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
119 The supported glob syntax extensions are "**" to match any string
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
120 across path separators, and "{a,b}" to mean "a or b".
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
121
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
122 To use a Perl/Python regular expression, start a name with "re:".
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
123 Regexp pattern matching is anchored at the root of the repository.
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
124
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
125 Plain examples:
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
126
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
127 path:foo/bar a name bar in a directory named foo in the root of
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
128 the repository
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
129 path:path:name a file or directory named "path:name"
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
130
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
131 Glob examples:
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
132
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
133 glob:*.c any name ending in ".c" in the current directory
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
134 *.c any name ending in ".c" in the current directory
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
135 **.c any name ending in ".c" in the current directory, or
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
136 any subdirectory
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
137 foo/*.c any name ending in ".c" in the directory foo
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
138 foo/**.c any name ending in ".c" in the directory foo, or any
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
139 subdirectory
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
140
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
141 Regexp examples:
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
142
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
143 re:.*\.c$ any name ending in ".c", anywhere in the repository
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
144
eb66d76c7746 move patterns topics
Matt Mackall <mpm@selenic.com>
parents: 3798
diff changeset
145 ''',
3795
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
146 }
17a11f4ff260 Add basic support for help topics and a dates topic
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
147