diff mercurial/revset.py @ 36636:c6061cadb400

util: extract all date-related utils in utils/dateutil module With this commit, util.py lose 262 lines Note for extensions author, if this commit breaks your extension, you can pull the step-by-step split here to help you more easily pinpoint the renaming that broke your extension: hg pull https://bitbucket.org/octobus/mercurial-devel/ -r ac1f6453010d Differential Revision: https://phab.mercurial-scm.org/D2282
author Boris Feld <boris.feld@octobus.net>
date Thu, 15 Feb 2018 17:18:26 +0100
parents b755eab7e677
children 407934a97bc7
line wrap: on
line diff
--- a/mercurial/revset.py	Thu Feb 08 23:27:24 2018 +0530
+++ b/mercurial/revset.py	Thu Feb 15 17:18:26 2018 +0100
@@ -30,6 +30,7 @@
     smartset,
     util,
 )
+from .utils import dateutil
 
 # helpers for processing parsed tree
 getsymbol = revsetlang.getsymbol
@@ -658,7 +659,7 @@
     """
     # i18n: "date" is a keyword
     ds = getstring(x, _("date requires a string"))
-    dm = util.matchdate(ds)
+    dm = dateutil.matchdate(ds)
     return subset.filter(lambda x: dm(repo[x].date()[0]),
                          condrepr=('<date %r>', ds))