Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/revlog.py @ 25113:0ca8410ea345
util: drop alias for collections.deque
Now that util.deque is just an alias for collections.deque, let's just
remove it.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sat, 16 May 2015 11:28:04 -0700 |
parents | 59904edf0a5e |
children | 1635579f9baf |
comparison
equal
deleted
inserted
replaced
25112:3d14c1217117 | 25113:0ca8410ea345 |
---|---|
10 This provides efficient delta storage with O(1) retrieve and append | 10 This provides efficient delta storage with O(1) retrieve and append |
11 and O(changes) merge between branches. | 11 and O(changes) merge between branches. |
12 """ | 12 """ |
13 | 13 |
14 # import stuff from node for others to import from revlog | 14 # import stuff from node for others to import from revlog |
15 import collections | |
15 from node import bin, hex, nullid, nullrev | 16 from node import bin, hex, nullid, nullrev |
16 from i18n import _ | 17 from i18n import _ |
17 import ancestor, mdiff, parsers, error, util, templatefilters | 18 import ancestor, mdiff, parsers, error, util, templatefilters |
18 import struct, zlib, errno | 19 import struct, zlib, errno |
19 | 20 |
483 has.add(nullrev) | 484 has.add(nullrev) |
484 has.update(common) | 485 has.update(common) |
485 | 486 |
486 # take all ancestors from heads that aren't in has | 487 # take all ancestors from heads that aren't in has |
487 missing = set() | 488 missing = set() |
488 visit = util.deque(r for r in heads if r not in has) | 489 visit = collections.deque(r for r in heads if r not in has) |
489 while visit: | 490 while visit: |
490 r = visit.popleft() | 491 r = visit.popleft() |
491 if r in missing: | 492 if r in missing: |
492 continue | 493 continue |
493 else: | 494 else: |