mercurial/scmutil.py
changeset 44060 a61287a95dc3
parent 44038 0750cbffdb3b
child 44063 089255b1341e
equal deleted inserted replaced
44059:7126d8b8e0e6 44060:a61287a95dc3
     7 
     7 
     8 from __future__ import absolute_import
     8 from __future__ import absolute_import
     9 
     9 
    10 import errno
    10 import errno
    11 import glob
    11 import glob
    12 import hashlib
       
    13 import os
    12 import os
    14 import posixpath
    13 import posixpath
    15 import re
    14 import re
    16 import subprocess
    15 import subprocess
    17 import weakref
    16 import weakref
    46     util,
    45     util,
    47     vfs,
    46     vfs,
    48 )
    47 )
    49 
    48 
    50 from .utils import (
    49 from .utils import (
       
    50     hashutil,
    51     procutil,
    51     procutil,
    52     stringutil,
    52     stringutil,
    53 )
    53 )
    54 
    54 
    55 if pycompat.iswindows:
    55 if pycompat.iswindows:
   364     if not cl.filteredrevs:
   364     if not cl.filteredrevs:
   365         return None
   365         return None
   366     key = None
   366     key = None
   367     revs = sorted(r for r in cl.filteredrevs if r <= maxrev)
   367     revs = sorted(r for r in cl.filteredrevs if r <= maxrev)
   368     if revs:
   368     if revs:
   369         s = hashlib.sha1()
   369         s = hashutil.sha1()
   370         for rev in revs:
   370         for rev in revs:
   371             s.update(b'%d;' % rev)
   371             s.update(b'%d;' % rev)
   372         key = s.digest()
   372         key = s.digest()
   373     return key
   373     return key
   374 
   374