Show More
@@ -85,19 +85,20 b' def trywritehiddencache(repo, hideable, ' | |||
|
85 | 85 | """ |
|
86 | 86 | wlock = fh = None |
|
87 | 87 | try: |
|
88 | wlock = repo.wlock(wait=False) | |
|
89 | # write cache to file | |
|
90 | newhash = cachehash(repo, hideable) | |
|
91 | sortedset = sorted(hidden) | |
|
92 | data = struct.pack('>%iI' % len(sortedset), *sortedset) | |
|
93 | fh = repo.vfs.open(cachefile, 'w+b', atomictemp=True) | |
|
94 | fh.write(struct.pack(">H", cacheversion)) | |
|
95 | fh.write(newhash) | |
|
96 |
fh.write( |
|
|
97 | except (IOError, OSError): | |
|
98 | repo.ui.debug('error writing hidden changesets cache') | |
|
99 | except error.LockHeld: | |
|
100 | repo.ui.debug('cannot obtain lock to write hidden changesets cache') | |
|
88 | try: | |
|
89 | wlock = repo.wlock(wait=False) | |
|
90 | # write cache to file | |
|
91 | newhash = cachehash(repo, hideable) | |
|
92 | sortedset = sorted(hidden) | |
|
93 | data = struct.pack('>%iI' % len(sortedset), *sortedset) | |
|
94 | fh = repo.vfs.open(cachefile, 'w+b', atomictemp=True) | |
|
95 | fh.write(struct.pack(">H", cacheversion)) | |
|
96 | fh.write(newhash) | |
|
97 | fh.write(data) | |
|
98 | except (IOError, OSError): | |
|
99 | repo.ui.debug('error writing hidden changesets cache') | |
|
100 | except error.LockHeld: | |
|
101 | repo.ui.debug('cannot obtain lock to write hidden changesets cache') | |
|
101 | 102 | finally: |
|
102 | 103 | if fh: |
|
103 | 104 | fh.close() |
General Comments 0
You need to be logged in to leave comments.
Login now