tests/test-lfs.t
changeset 45055 4c1b4805db57
parent 44111 2928d5af6281
child 45894 9dc1351d0b5f
equal deleted inserted replaced
45054:922dbf0df4f1 45055:4c1b4805db57
   695   > from mercurial import (
   695   > from mercurial import (
   696   >     pycompat,
   696   >     pycompat,
   697   >     revlog,
   697   >     revlog,
   698   > )
   698   > )
   699   > from mercurial.utils import (
   699   > from mercurial.utils import (
       
   700   >     procutil,
   700   >     stringutil,
   701   >     stringutil,
   701   > )
   702   > )
   702   > def hash(rawtext):
   703   > def hash(rawtext):
   703   >     h = hashlib.sha512()
   704   >     h = hashlib.sha512()
   704   >     h.update(rawtext)
   705   >     h.update(rawtext)
   711   >             continue
   712   >             continue
   712   >         sizes = [fl._revlog.rawsize(i) for i in fl]
   713   >         sizes = [fl._revlog.rawsize(i) for i in fl]
   713   >         texts = [fl.rawdata(i) for i in fl]
   714   >         texts = [fl.rawdata(i) for i in fl]
   714   >         flags = [int(fl._revlog.flags(i)) for i in fl]
   715   >         flags = [int(fl._revlog.flags(i)) for i in fl]
   715   >         hashes = [hash(t) for t in texts]
   716   >         hashes = [hash(t) for t in texts]
   716   >         pycompat.stdout.write(b'  %s: rawsizes=%r flags=%r hashes=%s\n'
   717   >         procutil.stdout.write(b'  %s: rawsizes=%r flags=%r hashes=%s\n'
   717   >                               % (name, sizes, flags, stringutil.pprint(hashes)))
   718   >                               % (name, sizes, flags, stringutil.pprint(hashes)))
   718   > EOF
   719   > EOF
   719 
   720 
   720   $ for i in client client2 server repo3 repo4 repo5 repo6 repo7 repo8 repo9 \
   721   $ for i in client client2 server repo3 repo4 repo5 repo6 repo7 repo8 repo9 \
   721   >          repo10; do
   722   >          repo10; do