##// END OF EJS Templates
Correct a bug on date formats with '>' or '<' accompanied by space characters.
Justin Peng -
r7953:8c6f823e default
parent child Browse files
Show More
@@ -1315,6 +1315,7 b' def matchdate(date):'
1315 1315 d["d"] = "28"
1316 1316 return parsedate(date, extendeddateformats, d)[0]
1317 1317
1318 date = date.strip()
1318 1319 if date[0] == "<":
1319 1320 when = upper(date[1:])
1320 1321 return lambda x: x <= when
@@ -43,3 +43,41 b' hg debugdate "1000000000 15300" # -0415'
43 43 hg debugdate "1000000000 16200" # -0430
44 44 hg debugdate "Sat Sep 08 21:16:40 2001 +0430"
45 45 hg debugdate "Sat Sep 08 21:16:40 2001 -0430"
46
47 #Test date formats with '>' or '<' accompanied by space characters
48 hg log -d '>' --template '{date|date}\n'
49 hg log -d '<' hg log -d '>' --template '{date|date}\n'
50
51 hg log -d ' >' --template '{date|date}\n'
52 hg log -d ' <' --template '{date|date}\n'
53
54 hg log -d '> ' --template '{date|date}\n'
55 hg log -d '< ' --template '{date|date}\n'
56
57 hg log -d ' > ' --template '{date|date}\n'
58 hg log -d ' < ' --template '{date|date}\n'
59
60
61 hg log -d '>02/01' --template '{date|date}\n'
62 hg log -d '<02/01' --template '{date|date}\n'
63
64 hg log -d ' >02/01' --template '{date|date}\n'
65 hg log -d ' <02/01' --template '{date|date}\n'
66
67 hg log -d '> 02/01' --template '{date|date}\n'
68 hg log -d '< 02/01' --template '{date|date}\n'
69
70 hg log -d ' > 02/01' --template '{date|date}\n'
71 hg log -d ' < 02/01' --template '{date|date}\n'
72
73 hg log -d '>02/01 ' --template '{date|date}\n'
74 hg log -d '<02/01 ' --template '{date|date}\n'
75
76 hg log -d ' >02/01 ' --template '{date|date}\n'
77 hg log -d ' <02/01 ' --template '{date|date}\n'
78
79 hg log -d '> 02/01 ' --template '{date|date}\n'
80 hg log -d '< 02/01 ' --template '{date|date}\n'
81
82 hg log -d ' > 02/01 ' --template '{date|date}\n'
83 hg log -d ' < 02/01 ' --template '{date|date}\n' No newline at end of file
@@ -34,3 +34,111 b' internal: 999967600 -16200'
34 34 standard: Sat Sep 08 21:16:40 2001 +0430
35 35 internal: 1000000000 16200
36 36 standard: Sat Sep 08 21:16:40 2001 -0430
37 Sun Jan 15 13:30:00 2006 +0500
38 Sun Jan 15 13:30:00 2006 -0800
39 Sat Jul 15 13:30:00 2006 +0500
40 Sat Jul 15 13:30:00 2006 -0700
41 Sun Jun 11 00:26:40 2006 -0400
42 Sat Apr 15 13:30:00 2006 +0200
43 Sat Apr 15 13:30:00 2006 +0000
44 Wed Feb 01 13:00:30 2006 -0500
45 Wed Feb 01 13:00:30 2006 +0000
46 Sun Jan 15 13:30:00 2006 +0500
47 Sun Jan 15 13:30:00 2006 -0800
48 Sat Jul 15 13:30:00 2006 +0500
49 Sat Jul 15 13:30:00 2006 -0700
50 Sun Jun 11 00:26:40 2006 -0400
51 Sat Apr 15 13:30:00 2006 +0200
52 Sat Apr 15 13:30:00 2006 +0000
53 Wed Feb 01 13:00:30 2006 -0500
54 Wed Feb 01 13:00:30 2006 +0000
55 Sun Jan 15 13:30:00 2006 +0500
56 Sun Jan 15 13:30:00 2006 -0800
57 Sat Jul 15 13:30:00 2006 +0500
58 Sat Jul 15 13:30:00 2006 -0700
59 Sun Jun 11 00:26:40 2006 -0400
60 Sat Apr 15 13:30:00 2006 +0200
61 Sat Apr 15 13:30:00 2006 +0000
62 Wed Feb 01 13:00:30 2006 -0500
63 Wed Feb 01 13:00:30 2006 +0000
64 Sun Jan 15 13:30:00 2006 +0500
65 Sun Jan 15 13:30:00 2006 -0800
66 Sat Jul 15 13:30:00 2006 +0500
67 Sat Jul 15 13:30:00 2006 -0700
68 Sun Jun 11 00:26:40 2006 -0400
69 Sat Apr 15 13:30:00 2006 +0200
70 Sat Apr 15 13:30:00 2006 +0000
71 Wed Feb 01 13:00:30 2006 -0500
72 Wed Feb 01 13:00:30 2006 +0000
73 Sun Jan 15 13:30:00 2006 +0500
74 Sun Jan 15 13:30:00 2006 -0800
75 Sat Jul 15 13:30:00 2006 +0500
76 Sat Jul 15 13:30:00 2006 -0700
77 Sun Jun 11 00:26:40 2006 -0400
78 Sat Apr 15 13:30:00 2006 +0200
79 Sat Apr 15 13:30:00 2006 +0000
80 Wed Feb 01 13:00:30 2006 -0500
81 Wed Feb 01 13:00:30 2006 +0000
82 Sun Jan 15 13:30:00 2006 +0500
83 Sun Jan 15 13:30:00 2006 -0800
84 Sat Jul 15 13:30:00 2006 +0500
85 Sat Jul 15 13:30:00 2006 -0700
86 Sun Jun 11 00:26:40 2006 -0400
87 Sat Apr 15 13:30:00 2006 +0200
88 Sat Apr 15 13:30:00 2006 +0000
89 Wed Feb 01 13:00:30 2006 -0500
90 Wed Feb 01 13:00:30 2006 +0000
91 Sun Jan 15 13:30:00 2006 +0500
92 Sun Jan 15 13:30:00 2006 -0800
93 Sat Jul 15 13:30:00 2006 +0500
94 Sat Jul 15 13:30:00 2006 -0700
95 Sun Jun 11 00:26:40 2006 -0400
96 Sat Apr 15 13:30:00 2006 +0200
97 Sat Apr 15 13:30:00 2006 +0000
98 Wed Feb 01 13:00:30 2006 -0500
99 Wed Feb 01 13:00:30 2006 +0000
100 Sun Jan 15 13:30:00 2006 +0500
101 Sun Jan 15 13:30:00 2006 -0800
102 Sat Jul 15 13:30:00 2006 +0500
103 Sat Jul 15 13:30:00 2006 -0700
104 Sun Jun 11 00:26:40 2006 -0400
105 Sat Apr 15 13:30:00 2006 +0200
106 Sat Apr 15 13:30:00 2006 +0000
107 Wed Feb 01 13:00:30 2006 -0500
108 Wed Feb 01 13:00:30 2006 +0000
109 Sun Jan 15 13:30:00 2006 +0500
110 Sun Jan 15 13:30:00 2006 -0800
111 Sat Jul 15 13:30:00 2006 +0500
112 Sat Jul 15 13:30:00 2006 -0700
113 Sun Jun 11 00:26:40 2006 -0400
114 Sat Apr 15 13:30:00 2006 +0200
115 Sat Apr 15 13:30:00 2006 +0000
116 Wed Feb 01 13:00:30 2006 -0500
117 Wed Feb 01 13:00:30 2006 +0000
118 Sun Jan 15 13:30:00 2006 +0500
119 Sun Jan 15 13:30:00 2006 -0800
120 Sat Jul 15 13:30:00 2006 +0500
121 Sat Jul 15 13:30:00 2006 -0700
122 Sun Jun 11 00:26:40 2006 -0400
123 Sat Apr 15 13:30:00 2006 +0200
124 Sat Apr 15 13:30:00 2006 +0000
125 Wed Feb 01 13:00:30 2006 -0500
126 Wed Feb 01 13:00:30 2006 +0000
127 Sun Jan 15 13:30:00 2006 +0500
128 Sun Jan 15 13:30:00 2006 -0800
129 Sat Jul 15 13:30:00 2006 +0500
130 Sat Jul 15 13:30:00 2006 -0700
131 Sun Jun 11 00:26:40 2006 -0400
132 Sat Apr 15 13:30:00 2006 +0200
133 Sat Apr 15 13:30:00 2006 +0000
134 Wed Feb 01 13:00:30 2006 -0500
135 Wed Feb 01 13:00:30 2006 +0000
136 Sun Jan 15 13:30:00 2006 +0500
137 Sun Jan 15 13:30:00 2006 -0800
138 Sat Jul 15 13:30:00 2006 +0500
139 Sat Jul 15 13:30:00 2006 -0700
140 Sun Jun 11 00:26:40 2006 -0400
141 Sat Apr 15 13:30:00 2006 +0200
142 Sat Apr 15 13:30:00 2006 +0000
143 Wed Feb 01 13:00:30 2006 -0500
144 Wed Feb 01 13:00:30 2006 +0000
General Comments 0
You need to be logged in to leave comments. Login now