date: fixup breakage from ">" fix
authorMatt Mackall <mpm@selenic.com>
Mon, 04 Apr 2011 09:39:22 -0500
changeset 13869 b470894c33f8
parent 13868 38906cf9d15c
child 13870 ce066d424bba
date: fixup breakage from ">" fix
mercurial/util.py
tests/test-log.t
tests/test-parse-date.t
--- a/mercurial/util.py	Mon Apr 04 08:26:08 2011 -0500
+++ b/mercurial/util.py	Mon Apr 04 09:39:22 2011 -0500
@@ -1222,12 +1222,12 @@
     if not date:
         raise Abort(_("dates cannot consist entirely of whitespace"))
     elif date[0] == "<":
-	if not date[1:]:
+        if not date[1:]:
             raise Abort(_("invalid day spec. use '<{datetime}' "))
         when = upper(date[1:])
         return lambda x: x <= when
     elif date[0] == ">":
-	if not date[1:]:
+        if not date[1:]:
             raise Abort(_("invalid day spec. use '>{datetime}' "))
         when = lower(date[1:])
         return lambda x: x >= when
--- a/tests/test-log.t	Mon Apr 04 08:26:08 2011 -0500
+++ b/tests/test-log.t	Mon Apr 04 09:39:22 2011 -0500
@@ -525,13 +525,13 @@
 log -d ">"
 
   $ hg log -d ">"
-  abort: invalid day spec. use '>{datetime}'
+  abort: invalid day spec. use '>{datetime}' 
   [255]
 
 log -d "<"
 
   $ hg log -d "<"
-  abort: invalid day spec. use '<{datetime}'
+  abort: invalid day spec. use '<{datetime}' 
   [255]
 
 
--- a/tests/test-parse-date.t	Mon Apr 04 08:26:08 2011 -0500
+++ b/tests/test-parse-date.t	Mon Apr 04 09:39:22 2011 -0500
@@ -96,52 +96,32 @@
 Test date formats with '>' or '<' accompanied by space characters
 
   $ hg log -d '>' --template '{date|date}\n'
-  Sun Jan 15 13:30:00 2006 +0500
-  Sun Jan 15 13:30:00 2006 -0800
-  Sat Jul 15 13:30:00 2006 +0500
-  Sat Jul 15 13:30:00 2006 -0700
-  Sun Jun 11 00:26:40 2006 -0400
-  Sat Apr 15 13:30:00 2006 +0200
-  Sat Apr 15 13:30:00 2006 +0000
-  Wed Feb 01 13:00:30 2006 -0500
-  Wed Feb 01 13:00:30 2006 +0000
+  abort: invalid day spec. use '>{datetime}' 
+  [255]
   $ hg log -d '<' hg log -d '>' --template '{date|date}\n'
+  abort: invalid day spec. use '>{datetime}' 
+  [255]
 
   $ hg log -d ' >' --template '{date|date}\n'
-  Sun Jan 15 13:30:00 2006 +0500
-  Sun Jan 15 13:30:00 2006 -0800
-  Sat Jul 15 13:30:00 2006 +0500
-  Sat Jul 15 13:30:00 2006 -0700
-  Sun Jun 11 00:26:40 2006 -0400
-  Sat Apr 15 13:30:00 2006 +0200
-  Sat Apr 15 13:30:00 2006 +0000
-  Wed Feb 01 13:00:30 2006 -0500
-  Wed Feb 01 13:00:30 2006 +0000
+  abort: invalid day spec. use '>{datetime}' 
+  [255]
   $ hg log -d ' <' --template '{date|date}\n'
+  abort: invalid day spec. use '<{datetime}' 
+  [255]
 
   $ hg log -d '> ' --template '{date|date}\n'
-  Sun Jan 15 13:30:00 2006 +0500
-  Sun Jan 15 13:30:00 2006 -0800
-  Sat Jul 15 13:30:00 2006 +0500
-  Sat Jul 15 13:30:00 2006 -0700
-  Sun Jun 11 00:26:40 2006 -0400
-  Sat Apr 15 13:30:00 2006 +0200
-  Sat Apr 15 13:30:00 2006 +0000
-  Wed Feb 01 13:00:30 2006 -0500
-  Wed Feb 01 13:00:30 2006 +0000
+  abort: invalid day spec. use '>{datetime}' 
+  [255]
   $ hg log -d '< ' --template '{date|date}\n'
+  abort: invalid day spec. use '<{datetime}' 
+  [255]
 
   $ hg log -d ' > ' --template '{date|date}\n'
-  Sun Jan 15 13:30:00 2006 +0500
-  Sun Jan 15 13:30:00 2006 -0800
-  Sat Jul 15 13:30:00 2006 +0500
-  Sat Jul 15 13:30:00 2006 -0700
-  Sun Jun 11 00:26:40 2006 -0400
-  Sat Apr 15 13:30:00 2006 +0200
-  Sat Apr 15 13:30:00 2006 +0000
-  Wed Feb 01 13:00:30 2006 -0500
-  Wed Feb 01 13:00:30 2006 +0000
+  abort: invalid day spec. use '>{datetime}' 
+  [255]
   $ hg log -d ' < ' --template '{date|date}\n'
+  abort: invalid day spec. use '<{datetime}' 
+  [255]
 
   $ hg log -d '>02/01' --template '{date|date}\n'
   $ hg log -d '<02/01' --template '{date|date}\n'