diff -r 46b828b85eb7 -r 18415fc918a1 mercurial/transaction.py --- a/mercurial/transaction.py Wed May 19 13:46:19 2021 +0200 +++ b/mercurial/transaction.py Wed May 19 13:45:34 2021 +0200 @@ -56,7 +56,7 @@ unlink=True, checkambigfiles=None, ): - for f, o in entries: + for f, o in sorted(dict(entries).items()): if o or not unlink: checkambig = checkambigfiles and (f, b'') in checkambigfiles try: