annotate mercurial/utils/hashutil.py @ 45556:03726f5b6092

merge: use merge.clean_update() when applicable We have had this higher-level function (higher than `merge.update()`, that is) for a while. Let's simply some callers by using it. I don't know why I didn't do this when I introduced the function. After this patch, there are no remaining callers that call `hg.updaterepo()` with `overwrite=True`. We'll clean that up soon. Differential Revision: https://phab.mercurial-scm.org/D9063
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 21 Sep 2020 10:09:39 -0700
parents 7126d8b8e0e6
children 521ac0d7047f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
44059
7126d8b8e0e6 hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff changeset
1 from __future__ import absolute_import
7126d8b8e0e6 hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff changeset
2
7126d8b8e0e6 hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff changeset
3 import hashlib
7126d8b8e0e6 hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff changeset
4
7126d8b8e0e6 hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff changeset
5 try:
7126d8b8e0e6 hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff changeset
6 from ..thirdparty import sha1dc
7126d8b8e0e6 hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff changeset
7
7126d8b8e0e6 hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff changeset
8 sha1 = sha1dc.sha1
7126d8b8e0e6 hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff changeset
9 except (ImportError, AttributeError):
7126d8b8e0e6 hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff changeset
10 sha1 = hashlib.sha1