changeset 1037:2316f2623dd4

Fix for missing mercurial.utils deque mercurial.utils does not always contain deque (e.g. it doesn't in mercurial-2.2.3-1.fc17.x86_64 rpm) Respecting recent commit that uses mercurial.utils for python 2.4 we try default collections deque and fallback to mercurial.utils deque
author Will Thames <will@thames.id.au>
date Wed, 31 Jul 2013 11:25:08 +1000
parents e775ffbcb359
children aa043f64d8b7
files hgsubversion/util.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/util.py
+++ b/hgsubversion/util.py
@@ -9,7 +9,11 @@ from mercurial import error
 from mercurial import hg
 from mercurial import node
 from mercurial import util as hgutil
-from mercurial.util import deque
+
+try:
+    from collections import deque
+except:
+    from mercurial.util import deque
 
 try:
     from mercurial import revset