Mercurial > public > mercurial-scm > hg
comparison tests/testlib/ext-sidedata.py @ 45735:edf4fa06df94
upgrade: allow sidedata upgrade to modify revision flag
In the process, we fix the lack of HAS_COPIES_INFO flag on upgrade, and test the
results.
Differential Revision: https://phab.mercurial-scm.org/D9199
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 13 Oct 2020 05:14:37 +0200 |
parents | d7dcc75a3eae |
children | f105c49e89cd |
comparison
equal
deleted
inserted
replaced
45734:53c265a6fc83 | 45735:edf4fa06df94 |
---|---|
68 # text length | 68 # text length |
69 update[sidedata.SD_TEST1] = struct.pack('>I', len(text)) | 69 update[sidedata.SD_TEST1] = struct.pack('>I', len(text)) |
70 # and sha2 hashes | 70 # and sha2 hashes |
71 sha256 = hashlib.sha256(text).digest() | 71 sha256 = hashlib.sha256(text).digest() |
72 update[sidedata.SD_TEST2] = struct.pack('>32s', sha256) | 72 update[sidedata.SD_TEST2] = struct.pack('>32s', sha256) |
73 return False, (), update | 73 return False, (), update, 0, 0 |
74 | 74 |
75 return sidedatacompanion | 75 return sidedatacompanion |
76 | 76 |
77 | 77 |
78 def extsetup(ui): | 78 def extsetup(ui): |