diff -r e12c0fa1f65b -r c1b7b2285522 mercurial/util.py --- a/mercurial/util.py Thu Jan 05 17:16:07 2017 +0000 +++ b/mercurial/util.py Tue Jan 10 16:15:21 2017 +0000 @@ -138,6 +138,12 @@ def safehasattr(thing, attr): return getattr(thing, attr, _notset) is not _notset +def bitsfrom(container): + bits = 0 + for bit in container: + bits |= bit + return bits + DIGESTS = { 'md5': hashlib.md5, 'sha1': hashlib.sha1,