D5599: remotefilelog: import Queue on Python 2, and queue on Python 3

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Wed Jan 16 11:16:09 EST 2019


durin42 created this revision.
Herald added subscribers: mercurial-devel, mjpieters.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5599

AFFECTED FILES
  hgext/remotefilelog/basestore.py

CHANGE DETAILS

diff --git a/hgext/remotefilelog/basestore.py b/hgext/remotefilelog/basestore.py
--- a/hgext/remotefilelog/basestore.py
+++ b/hgext/remotefilelog/basestore.py
@@ -305,7 +305,10 @@
         cachepath = self._path
 
         # prune cache
-        import Queue
+        if pycompat.ispy3:
+            import queue as Queue
+        else:
+            import Queue
         queue = Queue.PriorityQueue()
         originalsize = 0
         size = 0



To: durin42, #hg-reviewers
Cc: mjpieters, mercurial-devel


More information about the Mercurial-devel mailing list