cleanup: use __builtins__.all instead of util.all
authorAugie Fackler <augie@google.com>
Sat, 16 May 2015 14:34:19 -0400
changeset 25151 6eb4bdad198f
parent 25150 d28cc89d92f0
child 25152 ac2e66f481c9
cleanup: use __builtins__.all instead of util.all
mercurial/dirstate.py
mercurial/manifest.py
mercurial/merge.py
mercurial/setdiscovery.py
--- a/mercurial/dirstate.py	Sat May 16 14:34:04 2015 -0400
+++ b/mercurial/dirstate.py	Sat May 16 14:34:19 2015 -0400
@@ -972,7 +972,7 @@
             # fast path -- filter the other way around, since typically files is
             # much smaller than dmap
             return [f for f in files if f in dmap]
-        if not match.anypats() and util.all(fn in dmap for fn in files):
+        if not match.anypats() and all(fn in dmap for fn in files):
             # fast path -- all the values are known to be files, so just return
             # that
             return list(files)
--- a/mercurial/manifest.py	Sat May 16 14:34:04 2015 -0400
+++ b/mercurial/manifest.py	Sat May 16 14:34:19 2015 -0400
@@ -219,7 +219,7 @@
         files instead of over manifest files.'''
         files = match.files()
         return (len(files) < 100 and (match.isexact() or
-            (not match.anypats() and util.all(fn in self for fn in files))))
+            (not match.anypats() and all(fn in self for fn in files))))
 
     def walk(self, match):
         '''Generates matching file names.
@@ -465,7 +465,7 @@
 
     def _isempty(self):
         return (not self._files and (not self._dirs or
-                util.all(m._isempty() for m in self._dirs.values())))
+                all(m._isempty() for m in self._dirs.values())))
 
     def __str__(self):
         return ('<treemanifest dir=%s, node=%s>' %
--- a/mercurial/merge.py	Sat May 16 14:34:04 2015 -0400
+++ b/mercurial/merge.py	Sat May 16 14:34:19 2015 -0400
@@ -605,7 +605,7 @@
             # Consensus?
             if len(bids) == 1: # all bids are the same kind of method
                 m, l = bids.items()[0]
-                if util.all(a == l[0] for a in l[1:]): # len(bids) is > 1
+                if all(a == l[0] for a in l[1:]): # len(bids) is > 1
                     repo.ui.note(" %s: consensus for %s\n" % (f, m))
                     actions[f] = l[0]
                     continue
@@ -617,7 +617,7 @@
             # If there are gets and they all agree [how could they not?], do it.
             if 'g' in bids:
                 ga0 = bids['g'][0]
-                if util.all(a == ga0 for a in bids['g'][1:]):
+                if all(a == ga0 for a in bids['g'][1:]):
                     repo.ui.note(" %s: picking 'get' action\n" % f)
                     actions[f] = ga0
                     continue
--- a/mercurial/setdiscovery.py	Sat May 16 14:34:04 2015 -0400
+++ b/mercurial/setdiscovery.py	Sat May 16 14:34:19 2015 -0400
@@ -169,7 +169,7 @@
         ui.debug("all remote heads known locally\n")
         return (srvheadhashes, False, srvheadhashes,)
 
-    if sample and len(ownheads) <= initialsamplesize and util.all(yesno):
+    if sample and len(ownheads) <= initialsamplesize and all(yesno):
         ui.note(_("all local heads known remotely\n"))
         ownheadhashes = dag.externalizeall(ownheads)
         return (ownheadhashes, True, srvheadhashes,)