Show More
@@ -53,7 +53,11 b' def persisted_data(revlog):' | |||||
53 | try: |
|
53 | try: | |
54 | with revlog.opener(filename) as fd: |
|
54 | with revlog.opener(filename) as fd: | |
55 | if use_mmap: |
|
55 | if use_mmap: | |
56 | data = util.buffer(util.mmapread(fd, data_length)) |
|
56 | try: | |
|
57 | data = util.buffer(util.mmapread(fd, data_length)) | |||
|
58 | except ValueError: | |||
|
59 | # raised when the read file is too small | |||
|
60 | data = b'' | |||
57 | else: |
|
61 | else: | |
58 | data = fd.read(data_length) |
|
62 | data = fd.read(data_length) | |
59 | except (IOError, OSError) as e: |
|
63 | except (IOError, OSError) as e: |
@@ -799,9 +799,13 b' truncate the file' | |||||
799 |
|
799 | |||
800 | Check that Mercurial reaction to this event |
|
800 | Check that Mercurial reaction to this event | |
801 |
|
801 | |||
802 | $ hg -R corruption-test-repo log -r . |
|
802 | $ hg -R corruption-test-repo log -r . --traceback | |
803 | abort: index 00changelog.i is corrupted |
|
803 | changeset: 5005:90d5d3ba2fc4 | |
804 | [50] |
|
804 | tag: tip | |
|
805 | user: test | |||
|
806 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
807 | summary: a2 | |||
|
808 | ||||
805 |
|
809 | |||
806 |
|
810 | |||
807 | stream clone |
|
811 | stream clone |
General Comments 0
You need to be logged in to leave comments.
Login now