hgext/mq.py
changeset 8152 08e1baf924ca
parent 8151 127281884959
child 8188 f3abe032fc89
--- a/hgext/mq.py	Wed Apr 22 00:56:06 2009 +0200
+++ b/hgext/mq.py	Wed Apr 22 00:57:28 2009 +0200
@@ -1338,7 +1338,7 @@
                 msg = ''
             return '%s%s' % (patchname, msg)
 
-        applied = dict.fromkeys([p.name for p in self.applied])
+        applied = set([p.name for p in self.applied])
         if length is None:
             length = len(self.series) - start
         if not missing:
@@ -1762,10 +1762,8 @@
         if sr.mq.applied:
             qbase = bin(sr.mq.applied[0].rev)
             if not hg.islocal(dest):
-                heads = dict.fromkeys(sr.heads())
-                for h in sr.heads(qbase):
-                    del heads[h]
-                destrev = heads.keys()
+                heads = set(sr.heads())
+                destrev = list(heads.difference(sr.heads(qbase)))
                 destrev.append(sr.changelog.parents(qbase)[0])
     elif sr.capable('lookup'):
         try: