##// END OF EJS Templates
Add documentation about the date formats allowed in the command line
Jose M. Prieto -
r3257:c9cd63a6 default
parent child Browse files
Show More
@@ -127,6 +127,42 b' SPECIFYING MULTIPLE REVISIONS'
127 A range acts as a closed interval. This means that a range of 3:5
127 A range acts as a closed interval. This means that a range of 3:5
128 gives 3, 4 and 5. Similarly, a range of 4:2 gives 4, 3, and 2.
128 gives 3, 4 and 5. Similarly, a range of 4:2 gives 4, 3, and 2.
129
129
130 DATE FORMATS
131 ------------
132
133 Some commands (backout, commit, tag) allow the user to specify a date.
134 Possible formats for dates are:
135
136 YYYY-mm-dd \HH:MM[:SS] [(+|-)NNNN]::
137 This is a subset of ISO 8601, allowing just the recommended notations
138 for date and time. The last part represents the timezone; if omitted,
139 local time is assumed. Examples:
140
141 "2005-08-22 03:27 -0700"
142
143 "2006-04-19 21:39:51"
144
145 aaa bbb dd HH:MM:SS YYYY [(+|-)NNNN]::
146 This is the date format used by the C library. Here, aaa stands for
147 abbreviated weekday name and bbb for abbreviated month name. The last
148 part represents the timezone; if omitted, local time is assumed.
149 Examples:
150
151 "Mon Aug 22 03:27:00 2005 -0700"
152
153 "Wed Apr 19 21:39:51 2006"
154
155 unixtime offset::
156 This is the internal representation format for dates. unixtime is
157 the number of seconds since the epoch (1970-01-01 00:00 UTC). offset
158 is the offset of the local timezone, in seconds west of UTC (negative
159 if the timezone is east of UTC).
160 Examples:
161
162 "1124706420 25200" (2005-08-22 03:27:00 -0700)
163
164 "1145475591 -7200" (2006-04-19 21:39:51 +0200)
165
130 ENVIRONMENT VARIABLES
166 ENVIRONMENT VARIABLES
131 ---------------------
167 ---------------------
132
168
@@ -937,7 +937,9 b' def parsedate(string, formats=None):'
937 else:
937 else:
938 break
938 break
939 else:
939 else:
940 raise ValueError(_('invalid date: %r') % string)
940 raise ValueError(_('invalid date: %r '
941 'see hg(1) manual page for details')
942 % string)
941 # validate explicit (probably user-specified) date and
943 # validate explicit (probably user-specified) date and
942 # time zone offset. values must fit in signed 32 bits for
944 # time zone offset. values must fit in signed 32 bits for
943 # current 32-bit linux runtimes. timezones go from UTC-12
945 # current 32-bit linux runtimes. timezones go from UTC-12
@@ -1,13 +1,13 b''
1 abort: impossible time zone offset: 4444444
1 abort: impossible time zone offset: 4444444
2 transaction abort!
2 transaction abort!
3 rollback completed
3 rollback completed
4 abort: invalid date: '1\t15.1'
4 abort: invalid date: '1\t15.1' see hg(1) manual page for details
5 transaction abort!
5 transaction abort!
6 rollback completed
6 rollback completed
7 abort: invalid date: 'foo bar'
7 abort: invalid date: 'foo bar' see hg(1) manual page for details
8 transaction abort!
8 transaction abort!
9 rollback completed
9 rollback completed
10 abort: invalid date: ' 1 4444'
10 abort: invalid date: ' 1 4444' see hg(1) manual page for details
11 transaction abort!
11 transaction abort!
12 rollback completed
12 rollback completed
13 abort: date exceeds 32 bits: 111111111111
13 abort: date exceeds 32 bits: 111111111111
@@ -3,7 +3,7 b' changeset 3:107ce1ee2b43 backs out chang'
3 merging with changeset 2:e6c3abc120e7
3 merging with changeset 2:e6c3abc120e7
4 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
4 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
5 (branch merge, don't forget to commit)
5 (branch merge, don't forget to commit)
6 abort: invalid date: 'should fail'
6 abort: invalid date: 'should fail' see hg(1) manual page for details
7 transaction abort!
7 transaction abort!
8 rollback completed
8 rollback completed
9 abort: date exceeds 32 bits: 100000000000000000
9 abort: date exceeds 32 bits: 100000000000000000
General Comments 0
You need to be logged in to leave comments. Login now