view mercurial/utils/hashutil.py @ 44555:05654ea5137c

rebase: accept multiple --source arguments (BC) I think it's a little surprising that `hg rebase -s A -s B` rebases only `B::` and ignores `A`. That's because the `-s` flag is not a repeated flag. This patch makes it a repeated flag. Differential Revision: https://phab.mercurial-scm.org/D8292
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 13 Mar 2020 16:39:32 -0700
parents 7126d8b8e0e6
children 521ac0d7047f
line wrap: on
line source

from __future__ import absolute_import

import hashlib

try:
    from ..thirdparty import sha1dc

    sha1 = sha1dc.sha1
except (ImportError, AttributeError):
    sha1 = hashlib.sha1